1import { aZ as NOOP, a_ as extend, a$ as isString, b0 as NO, b1 as isSymbol, b2 as isBuiltInDirective, b3 as capitalize, b4 as camelize, b5 as EMPTY_OBJ, b6 as isObject, b7 as toHandlerKey, b8 as isArray, b9 as isOn, ba as isReservedProp, bb as isVoidTag, bc as isHTMLTag, bd as isSVGTag, be as isMathMLTag, bf as parseStringStyle, bg as makeMap, bh as generateCodeFrame, bi as runtimeDom_esmBundler, bj as shared_esmBundler } from "#entry"; 2function getDefaultExportFromCjs(x) { 3 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; 4} 5function getAugmentedNamespace(n) { 6 if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n; 7 var f = n.default; 8 if (typeof f == "function") { 9 var a = function a2() { 10 var isInstance = false; 11 try { 12 isInstance = this instanceof a2; 13 } catch { 14 } 15 if (isInstance) { 16 return Reflect.construct(f, arguments, this.constructor); 17 } 18 return f.apply(this, arguments); 19 }; 20 a.prototype = f.prototype; 21 } else a = {}; 22 Object.defineProperty(a, "__esModule", { value: true }); 23 Object.keys(n).forEach(function(k) { 24 var d = Object.getOwnPropertyDescriptor(n, k); 25 Object.defineProperty(a, k, d.get ? d : { 26 enumerable: true, 27 get: function() { 28 return n[k]; 29 } 30 }); 31 }); 32 return a; 33} 34var LightGalleryVue_common = { exports: {} }; 35var vue = { exports: {} }; 36var vue_cjs_prod = {}; 37const FRAGMENT = /* @__PURE__ */ Symbol(``); 38const TELEPORT = /* @__PURE__ */ Symbol(``); 39const SUSPENSE = /* @__PURE__ */ Symbol(``); 40const KEEP_ALIVE = /* @__PURE__ */ Symbol(``); 41const BASE_TRANSITION = /* @__PURE__ */ Symbol( 42 `` 43); 44const OPEN_BLOCK = /* @__PURE__ */ Symbol(``); 45const CREATE_BLOCK = /* @__PURE__ */ Symbol(``); 46const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol( 47 `` 48); 49const CREATE_VNODE = /* @__PURE__ */ Symbol(``); 50const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol( 51 `` 52); 53const CREATE_COMMENT = /* @__PURE__ */ Symbol( 54 `` 55); 56const CREATE_TEXT = /* @__PURE__ */ Symbol( 57 `` 58); 59const CREATE_STATIC = /* @__PURE__ */ Symbol( 60 `` 61); 62const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol( 63 `` 64); 65const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol( 66 `` 67); 68const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol( 69 `` 70); 71const RESOLVE_FILTER = /* @__PURE__ */ Symbol( 72 `` 73); 74const WITH_DIRECTIVES = /* @__PURE__ */ Symbol( 75 `` 76); 77const RENDER_LIST = /* @__PURE__ */ Symbol(``); 78const RENDER_SLOT = /* @__PURE__ */ Symbol(``); 79const CREATE_SLOTS = /* @__PURE__ */ Symbol(``); 80const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol( 81 `` 82); 83const MERGE_PROPS = /* @__PURE__ */ Symbol(``); 84const NORMALIZE_CLASS = /* @__PURE__ */ Symbol( 85 `` 86); 87const NORMALIZE_STYLE = /* @__PURE__ */ Symbol( 88 `` 89); 90const NORMALIZE_PROPS = /* @__PURE__ */ Symbol( 91 `` 92); 93const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol( 94 `` 95); 96const TO_HANDLERS = /* @__PURE__ */ Symbol(``); 97const CAMELIZE = /* @__PURE__ */ Symbol(``); 98const CAPITALIZE = /* @__PURE__ */ Symbol(``); 99const TO_HANDLER_KEY = /* @__PURE__ */ Symbol( 100 `` 101); 102const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol( 103 `` 104); 105const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(``); 106const POP_SCOPE_ID = /* @__PURE__ */ Symbol(``); 107const WITH_CTX = /* @__PURE__ */ Symbol(``); 108const UNREF = /* @__PURE__ */ Symbol(``); 109const IS_REF = /* @__PURE__ */ Symbol(``); 110const WITH_MEMO = /* @__PURE__ */ Symbol(``); 111const IS_MEMO_SAME = /* @__PURE__ */ Symbol(``); 112const helperNameMap = { 113 [FRAGMENT]: `Fragment`, 114 [TELEPORT]: `Teleport`, 115 [SUSPENSE]: `Suspense`, 116 [KEEP_ALIVE]: `KeepAlive`, 117 [BASE_TRANSITION]: `BaseTransition`, 118 [OPEN_BLOCK]: `openBlock`, 119 [CREATE_BLOCK]: `createBlock`, 120 [CREATE_ELEMENT_BLOCK]: `createElementBlock`, 121 [CREATE_VNODE]: `createVNode`, 122 [CREATE_ELEMENT_VNODE]: `createElementVNode`, 123 [CREATE_COMMENT]: `createCommentVNode`, 124 [CREATE_TEXT]: `createTextVNode`, 125 [CREATE_STATIC]: `createStaticVNode`, 126 [RESOLVE_COMPONENT]: `resolveComponent`, 127 [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, 128 [RESOLVE_DIRECTIVE]: `resolveDirective`, 129 [RESOLVE_FILTER]: `resolveFilter`, 130 [WITH_DIRECTIVES]: `withDirectives`, 131 [RENDER_LIST]: `renderList`, 132 [RENDER_SLOT]: `renderSlot`, 133 [CREATE_SLOTS]: `createSlots`, 134 [TO_DISPLAY_STRING]: `toDisplayString`, 135 [MERGE_PROPS]: `mergeProps`, 136 [NORMALIZE_CLASS]: `normalizeClass`, 137 [NORMALIZE_STYLE]: `normalizeStyle`, 138 [NORMALIZE_PROPS]: `normalizeProps`,
vendor: 5,070 bytes, lines 139-372
139 [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, 140 [TO_HANDLERS]: `toHandlers`, 141 [CAMELIZE]: `camelize`, 142 [CAPITALIZE]: `capitalize`, 143 [TO_HANDLER_KEY]: `toHandlerKey`, 144 [SET_BLOCK_TRACKING]: `setBlockTracking`, 145 [PUSH_SCOPE_ID]: `pushScopeId`, 146 [POP_SCOPE_ID]: `popScopeId`, 147 [WITH_CTX]: `withCtx`, 148 [UNREF]: `unref`, 149 [IS_REF]: `isRef`, 150 [WITH_MEMO]: `withMemo`, 151 [IS_MEMO_SAME]: `isMemoSame` 152}; 153function registerRuntimeHelpers(helpers) { 154 Object.getOwnPropertySymbols(helpers).forEach((s) => { 155 helperNameMap[s] = helpers[s]; 156 }); 157} 158const Namespaces = { 159 "HTML": 0, 160 "0": "HTML", 161 "SVG": 1, 162 "1": "SVG", 163 "MATH_ML": 2, 164 "2": "MATH_ML" 165}; 166const NodeTypes = { 167 "ROOT": 0, 168 "0": "ROOT", 169 "ELEMENT": 1, 170 "1": "ELEMENT", 171 "TEXT": 2, 172 "2": "TEXT", 173 "COMMENT": 3, 174 "3": "COMMENT", 175 "SIMPLE_EXPRESSION": 4, 176 "4": "SIMPLE_EXPRESSION", 177 "INTERPOLATION": 5, 178 "5": "INTERPOLATION", 179 "ATTRIBUTE": 6, 180 "6": "ATTRIBUTE", 181 "DIRECTIVE": 7, 182 "7": "DIRECTIVE", 183 "COMPOUND_EXPRESSION": 8, 184 "8": "COMPOUND_EXPRESSION", 185 "IF": 9, 186 "9": "IF", 187 "IF_BRANCH": 10, 188 "10": "IF_BRANCH", 189 "FOR": 11, 190 "11": "FOR", 191 "TEXT_CALL": 12, 192 "12": "TEXT_CALL", 193 "VNODE_CALL": 13, 194 "13": "VNODE_CALL", 195 "JS_CALL_EXPRESSION": 14, 196 "14": "JS_CALL_EXPRESSION", 197 "JS_OBJECT_EXPRESSION": 15, 198 "15": "JS_OBJECT_EXPRESSION", 199 "JS_PROPERTY": 16, 200 "16": "JS_PROPERTY", 201 "JS_ARRAY_EXPRESSION": 17, 202 "17": "JS_ARRAY_EXPRESSION", 203 "JS_FUNCTION_EXPRESSION": 18, 204 "18": "JS_FUNCTION_EXPRESSION", 205 "JS_CONDITIONAL_EXPRESSION": 19, 206 "19": "JS_CONDITIONAL_EXPRESSION", 207 "JS_CACHE_EXPRESSION": 20, 208 "20": "JS_CACHE_EXPRESSION", 209 "JS_BLOCK_STATEMENT": 21, 210 "21": "JS_BLOCK_STATEMENT", 211 "JS_TEMPLATE_LITERAL": 22, 212 "22": "JS_TEMPLATE_LITERAL", 213 "JS_IF_STATEMENT": 23, 214 "23": "JS_IF_STATEMENT", 215 "JS_ASSIGNMENT_EXPRESSION": 24, 216 "24": "JS_ASSIGNMENT_EXPRESSION", 217 "JS_SEQUENCE_EXPRESSION": 25, 218 "25": "JS_SEQUENCE_EXPRESSION", 219 "JS_RETURN_STATEMENT": 26, 220 "26": "JS_RETURN_STATEMENT" 221}; 222const ElementTypes = { 223 "ELEMENT": 0, 224 "0": "ELEMENT", 225 "COMPONENT": 1, 226 "1": "COMPONENT", 227 "SLOT": 2, 228 "2": "SLOT", 229 "TEMPLATE": 3, 230 "3": "TEMPLATE" 231}; 232const ConstantTypes = { 233 "NOT_CONSTANT": 0, 234 "0": "NOT_CONSTANT", 235 "CAN_SKIP_PATCH": 1, 236 "1": "CAN_SKIP_PATCH", 237 "CAN_CACHE": 2, 238 "2": "CAN_CACHE", 239 "CAN_STRINGIFY": 3, 240 "3": "CAN_STRINGIFY" 241}; 242const locStub = { 243 start: { line: 1, column: 1, offset: 0 }, 244 end: { line: 1, column: 1, offset: 0 }, 245 source: "" 246}; 247function createRoot(children, source = "") { 248 return { 249 type: 0, 250 source, 251 children, 252 helpers: /* @__PURE__ */ new Set(), 253 components: [], 254 directives: [], 255 hoists: [], 256 imports: [], 257 cached: [], 258 temps: 0, 259 codegenNode: void 0, 260 loc: locStub 261 }; 262} 263function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent2 = false, loc = locStub) { 264 if (context) { 265 if (isBlock) { 266 context.helper(OPEN_BLOCK); 267 context.helper(getVNodeBlockHelper(context.inSSR, isComponent2)); 268 } else { 269 context.helper(getVNodeHelper(context.inSSR, isComponent2)); 270 } 271 if (directives) { 272 context.helper(WITH_DIRECTIVES); 273 } 274 } 275 return { 276 type: 13, 277 tag, 278 props, 279 children, 280 patchFlag, 281 dynamicProps, 282 directives, 283 isBlock, 284 disableTracking, 285 isComponent: isComponent2, 286 loc 287 }; 288} 289function createArrayExpression(elements, loc = locStub) { 290 return { 291 type: 17, 292 loc, 293 elements 294 }; 295} 296function createObjectExpression(properties, loc = locStub) { 297 return { 298 type: 15, 299 loc, 300 properties 301 }; 302} 303function createObjectProperty(key, value) { 304 return { 305 type: 16, 306 loc: locStub, 307 key: isString(key) ? createSimpleExpression(key, true) : key, 308 value 309 }; 310} 311function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { 312 return { 313 type: 4, 314 loc, 315 content, 316 isStatic, 317 constType: isStatic ? 3 : constType 318 }; 319} 320function createInterpolation(content, loc) { 321 return { 322 type: 5, 323 loc, 324 content: isString(content) ? createSimpleExpression(content, false, loc) : content 325 }; 326} 327function createCompoundExpression(children, loc = locStub) { 328 return { 329 type: 8, 330 loc, 331 children 332 }; 333} 334function createCallExpression(callee, args = [], loc = locStub) { 335 return { 336 type: 14, 337 loc, 338 callee, 339 arguments: args 340 }; 341} 342function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { 343 return { 344 type: 18, 345 params, 346 returns, 347 newline, 348 isSlot, 349 loc 350 }; 351} 352function createConditionalExpression(test, consequent, alternate, newline = true) { 353 return { 354 type: 19, 355 test, 356 consequent, 357 alternate, 358 newline, 359 loc: locStub 360 }; 361} 362function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) { 363 return { 364 type: 20, 365 index, 366 value, 367 needPauseTracking, 368 inVOnce, 369 needArraySpread: false, 370 loc: locStub 371 }; 372}
vendor: 6,265 bytes, lines 373-622
373function createBlockStatement(body) { 374 return { 375 type: 21, 376 body, 377 loc: locStub 378 }; 379} 380function createTemplateLiteral(elements) { 381 return { 382 type: 22, 383 elements, 384 loc: locStub 385 }; 386} 387function createIfStatement(test, consequent, alternate) { 388 return { 389 type: 23, 390 test, 391 consequent, 392 alternate, 393 loc: locStub 394 }; 395} 396function createAssignmentExpression(left, right) { 397 return { 398 type: 24, 399 left, 400 right, 401 loc: locStub 402 }; 403} 404function createSequenceExpression(expressions) { 405 return { 406 type: 25, 407 expressions, 408 loc: locStub 409 }; 410} 411function createReturnStatement(returns) { 412 return { 413 type: 26, 414 returns, 415 loc: locStub 416 }; 417} 418function getVNodeHelper(ssr, isComponent2) { 419 return ssr || isComponent2 ? CREATE_VNODE : CREATE_ELEMENT_VNODE; 420} 421function getVNodeBlockHelper(ssr, isComponent2) { 422 return ssr || isComponent2 ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; 423} 424function convertToBlock(node, { helper, removeHelper, inSSR }) { 425 if (!node.isBlock) { 426 node.isBlock = true; 427 removeHelper(getVNodeHelper(inSSR, node.isComponent)); 428 helper(OPEN_BLOCK); 429 helper(getVNodeBlockHelper(inSSR, node.isComponent)); 430 } 431} 432const defaultDelimitersOpen = new Uint8Array([123, 123]); 433const defaultDelimitersClose = new Uint8Array([125, 125]); 434function isTagStartChar(c) { 435 return c >= 97 && c <= 122 || c >= 65 && c <= 90; 436} 437function isWhitespace(c) { 438 return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; 439} 440function isEndOfTagSection(c) { 441 return c === 47 || c === 62 || isWhitespace(c); 442} 443function toCharCodes(str) { 444 const ret = new Uint8Array(str.length); 445 for (let i = 0; i < str.length; i++) { 446 ret[i] = str.charCodeAt(i); 447 } 448 return ret; 449} 450const Sequences = { 451 Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), 452 // CDATA[ 453 CdataEnd: new Uint8Array([93, 93, 62]), 454 // ]]> 455 CommentEnd: new Uint8Array([45, 45, 62]), 456 // `-->` 457 ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), 458 // `<\/script` 459 StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), 460 // `</style` 461 TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), 462 // `</title` 463 TextareaEnd: new Uint8Array([ 464 60, 465 47, 466 116, 467 101, 468 120, 469 116, 470 97, 471 114, 472 101, 473 97 474 ]) 475 // `</textarea 476}; 477class Tokenizer { 478 constructor(stack2, cbs) { 479 this.stack = stack2; 480 this.cbs = cbs; 481 this.state = 1; 482 this.buffer = ""; 483 this.sectionStart = 0; 484 this.index = 0; 485 this.entityStart = 0; 486 this.baseState = 1; 487 this.inRCDATA = false; 488 this.inXML = false; 489 this.inVPre = false; 490 this.newlines = []; 491 this.mode = 0; 492 this.delimiterOpen = defaultDelimitersOpen; 493 this.delimiterClose = defaultDelimitersClose; 494 this.delimiterIndex = -1; 495 this.currentSequence = void 0; 496 this.sequenceIndex = 0; 497 } 498 get inSFCRoot() { 499 return this.mode === 2 && this.stack.length === 0; 500 } 501 reset() { 502 this.state = 1; 503 this.mode = 0; 504 this.buffer = ""; 505 this.sectionStart = 0; 506 this.index = 0; 507 this.baseState = 1; 508 this.inRCDATA = false; 509 this.currentSequence = void 0; 510 this.newlines.length = 0; 511 this.delimiterOpen = defaultDelimitersOpen; 512 this.delimiterClose = defaultDelimitersClose; 513 } 514 /** 515 * Generate Position object with line / column information using recorded 516 * newline positions. We know the index is always going to be an already 517 * processed index, so all the newlines up to this index should have been 518 * recorded. 519 */ 520 getPos(index) { 521 let line = 1; 522 let column = index + 1; 523 const length = this.newlines.length; 524 let j = -1; 525 if (length > 100) { 526 let l = -1; 527 let r = length; 528 while (l + 1 < r) { 529 const m = l + r >>> 1; 530 this.newlines[m] < index ? l = m : r = m; 531 } 532 j = l; 533 } else { 534 for (let i = length - 1; i >= 0; i--) { 535 if (index > this.newlines[i]) { 536 j = i; 537 break; 538 } 539 } 540 } 541 if (j >= 0) { 542 line = j + 2; 543 column = index - this.newlines[j]; 544 } 545 return { 546 column, 547 line, 548 offset: index 549 }; 550 } 551 peek() { 552 return this.buffer.charCodeAt(this.index + 1); 553 } 554 stateText(c) { 555 if (c === 60) { 556 if (this.index > this.sectionStart) { 557 this.cbs.ontext(this.sectionStart, this.index); 558 } 559 this.state = 5; 560 this.sectionStart = this.index; 561 } else if (!this.inVPre && c === this.delimiterOpen[0]) { 562 this.state = 2; 563 this.delimiterIndex = 0; 564 this.stateInterpolationOpen(c); 565 } 566 } 567 stateInterpolationOpen(c) { 568 if (c === this.delimiterOpen[this.delimiterIndex]) { 569 if (this.delimiterIndex === this.delimiterOpen.length - 1) { 570 const start = this.index + 1 - this.delimiterOpen.length; 571 if (start > this.sectionStart) { 572 this.cbs.ontext(this.sectionStart, start); 573 } 574 this.state = 3; 575 this.sectionStart = start; 576 } else { 577 this.delimiterIndex++; 578 } 579 } else if (this.inRCDATA) { 580 this.state = 32; 581 this.stateInRCDATA(c); 582 } else { 583 this.state = 1; 584 this.stateText(c); 585 } 586 } 587 stateInterpolation(c) { 588 if (c === this.delimiterClose[0]) { 589 this.state = 4; 590 this.delimiterIndex = 0; 591 this.stateInterpolationClose(c); 592 } 593 } 594 stateInterpolationClose(c) { 595 if (c === this.delimiterClose[this.delimiterIndex]) { 596 if (this.delimiterIndex === this.delimiterClose.length - 1) { 597 this.cbs.oninterpolation(this.sectionStart, this.index + 1); 598 if (this.inRCDATA) { 599 this.state = 32; 600 } else { 601 this.state = 1; 602 } 603 this.sectionStart = this.index + 1; 604 } else { 605 this.delimiterIndex++; 606 } 607 } else { 608 this.state = 3; 609 this.stateInterpolation(c); 610 } 611 } 612 stateSpecialStartSequence(c) { 613 const isEnd = this.sequenceIndex === this.currentSequence.length; 614 const isMatch = isEnd ? ( 615 // If we are at the end of the sequence, make sure the tag name has ended 616 isEndOfTagSection(c) 617 ) : ( 618 // Otherwise, do a case-insensitive comparison 619 (c | 32) === this.currentSequence[this.sequenceIndex] 620 ); 621 if (!isMatch) { 622 this.inRCDATA = false;
vendor: 16,245 bytes, lines 623-1214
623 } else if (!isEnd) { 624 this.sequenceIndex++; 625 return; 626 } 627 this.sequenceIndex = 0; 628 this.state = 6; 629 this.stateInTagName(c); 630 } 631 /** Look for an end tag. For <title> and <textarea>, also decode entities. */ 632 stateInRCDATA(c) { 633 if (this.sequenceIndex === this.currentSequence.length) { 634 if (c === 62 || isWhitespace(c)) { 635 const endOfText = this.index - this.currentSequence.length; 636 if (this.sectionStart < endOfText) { 637 const actualIndex = this.index; 638 this.index = endOfText; 639 this.cbs.ontext(this.sectionStart, endOfText); 640 this.index = actualIndex; 641 } 642 this.sectionStart = endOfText + 2; 643 this.stateInClosingTagName(c); 644 this.inRCDATA = false; 645 return; 646 } 647 this.sequenceIndex = 0; 648 } 649 if ((c | 32) === this.currentSequence[this.sequenceIndex]) { 650 this.sequenceIndex += 1; 651 } else if (this.sequenceIndex === 0) { 652 if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { 653 if (!this.inVPre && c === this.delimiterOpen[0]) { 654 this.state = 2; 655 this.delimiterIndex = 0; 656 this.stateInterpolationOpen(c); 657 } 658 } else if (this.fastForwardTo(60)) { 659 this.sequenceIndex = 1; 660 } 661 } else { 662 this.sequenceIndex = Number(c === 60); 663 } 664 } 665 stateCDATASequence(c) { 666 if (c === Sequences.Cdata[this.sequenceIndex]) { 667 if (++this.sequenceIndex === Sequences.Cdata.length) { 668 this.state = 28; 669 this.currentSequence = Sequences.CdataEnd; 670 this.sequenceIndex = 0; 671 this.sectionStart = this.index + 1; 672 } 673 } else { 674 this.sequenceIndex = 0; 675 this.state = 23; 676 this.stateInDeclaration(c); 677 } 678 } 679 /** 680 * When we wait for one specific character, we can speed things up 681 * by skipping through the buffer until we find it. 682 * 683 * @returns Whether the character was found. 684 */ 685 fastForwardTo(c) { 686 while (++this.index < this.buffer.length) { 687 const cc = this.buffer.charCodeAt(this.index); 688 if (cc === 10) { 689 this.newlines.push(this.index); 690 } 691 if (cc === c) { 692 return true; 693 } 694 } 695 this.index = this.buffer.length - 1; 696 return false; 697 } 698 /** 699 * Comments and CDATA end with `-->` and `]]>`. 700 * 701 * Their common qualities are: 702 * - Their end sequences have a distinct character they start with. 703 * - That character is then repeated, so we have to check multiple repeats. 704 * - All characters but the start character of the sequence can be skipped. 705 */ 706 stateInCommentLike(c) { 707 if (c === this.currentSequence[this.sequenceIndex]) { 708 if (++this.sequenceIndex === this.currentSequence.length) { 709 if (this.currentSequence === Sequences.CdataEnd) { 710 this.cbs.oncdata(this.sectionStart, this.index - 2); 711 } else { 712 this.cbs.oncomment(this.sectionStart, this.index - 2); 713 } 714 this.sequenceIndex = 0; 715 this.sectionStart = this.index + 1; 716 this.state = 1; 717 } 718 } else if (this.sequenceIndex === 0) { 719 if (this.fastForwardTo(this.currentSequence[0])) { 720 this.sequenceIndex = 1; 721 } 722 } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { 723 this.sequenceIndex = 0; 724 } 725 } 726 startSpecial(sequence, offset) { 727 this.enterRCDATA(sequence, offset); 728 this.state = 31; 729 } 730 enterRCDATA(sequence, offset) { 731 this.inRCDATA = true; 732 this.currentSequence = sequence; 733 this.sequenceIndex = offset; 734 } 735 stateBeforeTagName(c) { 736 if (c === 33) { 737 this.state = 22; 738 this.sectionStart = this.index + 1; 739 } else if (c === 63) { 740 this.state = 24; 741 this.sectionStart = this.index + 1; 742 } else if (isTagStartChar(c)) { 743 this.sectionStart = this.index; 744 if (this.mode === 0) { 745 this.state = 6; 746 } else if (this.inSFCRoot) { 747 this.state = 34; 748 } else if (!this.inXML) { 749 if (c === 116) { 750 this.state = 30; 751 } else { 752 this.state = c === 115 ? 29 : 6; 753 } 754 } else { 755 this.state = 6; 756 } 757 } else if (c === 47) { 758 this.state = 8; 759 } else { 760 this.state = 1; 761 this.stateText(c); 762 } 763 } 764 stateInTagName(c) { 765 if (isEndOfTagSection(c)) { 766 this.handleTagName(c); 767 } 768 } 769 stateInSFCRootTagName(c) { 770 if (isEndOfTagSection(c)) { 771 const tag = this.buffer.slice(this.sectionStart, this.index); 772 if (tag !== "template") { 773 this.enterRCDATA(toCharCodes(`</` + tag), 0); 774 } 775 this.handleTagName(c); 776 } 777 } 778 handleTagName(c) { 779 this.cbs.onopentagname(this.sectionStart, this.index); 780 this.sectionStart = -1; 781 this.state = 11; 782 this.stateBeforeAttrName(c); 783 } 784 stateBeforeClosingTagName(c) { 785 if (isWhitespace(c)) ; 786 else if (c === 62) { 787 this.state = 1; 788 this.sectionStart = this.index + 1; 789 } else { 790 this.state = isTagStartChar(c) ? 9 : 27; 791 this.sectionStart = this.index; 792 } 793 } 794 stateInClosingTagName(c) { 795 if (c === 62 || isWhitespace(c)) { 796 this.cbs.onclosetag(this.sectionStart, this.index); 797 this.sectionStart = -1; 798 this.state = 10; 799 this.stateAfterClosingTagName(c); 800 } 801 } 802 stateAfterClosingTagName(c) { 803 if (c === 62) { 804 this.state = 1; 805 this.sectionStart = this.index + 1; 806 } 807 } 808 stateBeforeAttrName(c) { 809 if (c === 62) { 810 this.cbs.onopentagend(this.index); 811 if (this.inRCDATA) { 812 this.state = 32; 813 } else { 814 this.state = 1; 815 } 816 this.sectionStart = this.index + 1; 817 } else if (c === 47) { 818 this.state = 7; 819 } else if (c === 60 && this.peek() === 47) { 820 this.cbs.onopentagend(this.index); 821 this.state = 5; 822 this.sectionStart = this.index; 823 } else if (!isWhitespace(c)) { 824 this.handleAttrStart(c); 825 } 826 } 827 handleAttrStart(c) { 828 if (c === 118 && this.peek() === 45) { 829 this.state = 13; 830 this.sectionStart = this.index; 831 } else if (c === 46 || c === 58 || c === 64 || c === 35) { 832 this.cbs.ondirname(this.index, this.index + 1); 833 this.state = 14; 834 this.sectionStart = this.index + 1; 835 } else { 836 this.state = 12; 837 this.sectionStart = this.index; 838 } 839 } 840 stateInSelfClosingTag(c) { 841 if (c === 62) { 842 this.cbs.onselfclosingtag(this.index); 843 this.state = 1; 844 this.sectionStart = this.index + 1; 845 this.inRCDATA = false; 846 } else if (!isWhitespace(c)) { 847 this.state = 11; 848 this.stateBeforeAttrName(c); 849 } 850 } 851 stateInAttrName(c) { 852 if (c === 61 || isEndOfTagSection(c)) { 853 this.cbs.onattribname(this.sectionStart, this.index); 854 this.handleAttrNameEnd(c); 855 } 856 } 857 stateInDirName(c) { 858 if (c === 61 || isEndOfTagSection(c)) { 859 this.cbs.ondirname(this.sectionStart, this.index); 860 this.handleAttrNameEnd(c); 861 } else if (c === 58) { 862 this.cbs.ondirname(this.sectionStart, this.index); 863 this.state = 14; 864 this.sectionStart = this.index + 1; 865 } else if (c === 46) { 866 this.cbs.ondirname(this.sectionStart, this.index); 867 this.state = 16; 868 this.sectionStart = this.index + 1; 869 } 870 } 871 stateInDirArg(c) { 872 if (c === 61 || isEndOfTagSection(c)) { 873 this.cbs.ondirarg(this.sectionStart, this.index); 874 this.handleAttrNameEnd(c); 875 } else if (c === 91) { 876 this.state = 15; 877 } else if (c === 46) { 878 this.cbs.ondirarg(this.sectionStart, this.index); 879 this.state = 16; 880 this.sectionStart = this.index + 1; 881 } 882 } 883 stateInDynamicDirArg(c) { 884 if (c === 93) { 885 this.state = 14; 886 } else if (c === 61 || isEndOfTagSection(c)) { 887 this.cbs.ondirarg(this.sectionStart, this.index + 1); 888 this.handleAttrNameEnd(c); 889 } 890 } 891 stateInDirModifier(c) { 892 if (c === 61 || isEndOfTagSection(c)) { 893 this.cbs.ondirmodifier(this.sectionStart, this.index); 894 this.handleAttrNameEnd(c); 895 } else if (c === 46) { 896 this.cbs.ondirmodifier(this.sectionStart, this.index); 897 this.sectionStart = this.index + 1; 898 } 899 } 900 handleAttrNameEnd(c) { 901 this.sectionStart = this.index; 902 this.state = 17; 903 this.cbs.onattribnameend(this.index); 904 this.stateAfterAttrName(c); 905 } 906 stateAfterAttrName(c) { 907 if (c === 61) { 908 this.state = 18; 909 } else if (c === 47 || c === 62) { 910 this.cbs.onattribend(0, this.sectionStart); 911 this.sectionStart = -1; 912 this.state = 11; 913 this.stateBeforeAttrName(c); 914 } else if (!isWhitespace(c)) { 915 this.cbs.onattribend(0, this.sectionStart); 916 this.handleAttrStart(c); 917 } 918 } 919 stateBeforeAttrValue(c) { 920 if (c === 34) { 921 this.state = 19; 922 this.sectionStart = this.index + 1; 923 } else if (c === 39) { 924 this.state = 20; 925 this.sectionStart = this.index + 1; 926 } else if (!isWhitespace(c)) { 927 this.sectionStart = this.index; 928 this.state = 21; 929 this.stateInAttrValueNoQuotes(c); 930 } 931 } 932 handleInAttrValue(c, quote) { 933 if (c === quote || this.fastForwardTo(quote)) { 934 this.cbs.onattribdata(this.sectionStart, this.index); 935 this.sectionStart = -1; 936 this.cbs.onattribend( 937 quote === 34 ? 3 : 2, 938 this.index + 1 939 ); 940 this.state = 11; 941 } 942 } 943 stateInAttrValueDoubleQuotes(c) { 944 this.handleInAttrValue(c, 34); 945 } 946 stateInAttrValueSingleQuotes(c) { 947 this.handleInAttrValue(c, 39); 948 } 949 stateInAttrValueNoQuotes(c) { 950 if (isWhitespace(c) || c === 62) { 951 this.cbs.onattribdata(this.sectionStart, this.index); 952 this.sectionStart = -1; 953 this.cbs.onattribend(1, this.index); 954 this.state = 11; 955 this.stateBeforeAttrName(c); 956 } else if (c === 39 || c === 60 || c === 61 || c === 96) { 957 this.cbs.onerr( 958 18, 959 this.index 960 ); 961 } else ; 962 } 963 stateBeforeDeclaration(c) { 964 if (c === 91) { 965 this.state = 26; 966 this.sequenceIndex = 0; 967 } else { 968 this.state = c === 45 ? 25 : 23; 969 } 970 } 971 stateInDeclaration(c) { 972 if (c === 62 || this.fastForwardTo(62)) { 973 this.state = 1; 974 this.sectionStart = this.index + 1; 975 } 976 } 977 stateInProcessingInstruction(c) { 978 if (c === 62 || this.fastForwardTo(62)) { 979 this.cbs.onprocessinginstruction(this.sectionStart, this.index); 980 this.state = 1; 981 this.sectionStart = this.index + 1; 982 } 983 } 984 stateBeforeComment(c) { 985 if (c === 45) { 986 this.state = 28; 987 this.currentSequence = Sequences.CommentEnd; 988 this.sequenceIndex = 2; 989 this.sectionStart = this.index + 1; 990 } else { 991 this.state = 23; 992 } 993 } 994 stateInSpecialComment(c) { 995 if (c === 62 || this.fastForwardTo(62)) { 996 this.cbs.oncomment(this.sectionStart, this.index); 997 this.state = 1; 998 this.sectionStart = this.index + 1; 999 } 1000 } 1001 stateBeforeSpecialS(c) { 1002 if (c === Sequences.ScriptEnd[3]) { 1003 this.startSpecial(Sequences.ScriptEnd, 4); 1004 } else if (c === Sequences.StyleEnd[3]) { 1005 this.startSpecial(Sequences.StyleEnd, 4); 1006 } else { 1007 this.state = 6; 1008 this.stateInTagName(c); 1009 } 1010 } 1011 stateBeforeSpecialT(c) { 1012 if (c === Sequences.TitleEnd[3]) { 1013 this.startSpecial(Sequences.TitleEnd, 4); 1014 } else if (c === Sequences.TextareaEnd[3]) { 1015 this.startSpecial(Sequences.TextareaEnd, 4); 1016 } else { 1017 this.state = 6; 1018 this.stateInTagName(c); 1019 } 1020 } 1021 startEntity() { 1022 } 1023 stateInEntity() { 1024 } 1025 /** 1026 * Iterates through the buffer, calling the function corresponding to the current state. 1027 * 1028 * States that are more likely to be hit are higher up, as a performance improvement. 1029 */ 1030 parse(input) { 1031 this.buffer = input; 1032 while (this.index < this.buffer.length) { 1033 const c = this.buffer.charCodeAt(this.index); 1034 if (c === 10 && this.state !== 33) { 1035 this.newlines.push(this.index); 1036 } 1037 switch (this.state) { 1038 case 1: { 1039 this.stateText(c); 1040 break; 1041 } 1042 case 2: { 1043 this.stateInterpolationOpen(c); 1044 break; 1045 } 1046 case 3: { 1047 this.stateInterpolation(c); 1048 break; 1049 } 1050 case 4: { 1051 this.stateInterpolationClose(c); 1052 break; 1053 } 1054 case 31: { 1055 this.stateSpecialStartSequence(c); 1056 break; 1057 } 1058 case 32: { 1059 this.stateInRCDATA(c); 1060 break; 1061 } 1062 case 26: { 1063 this.stateCDATASequence(c); 1064 break; 1065 } 1066 case 19: { 1067 this.stateInAttrValueDoubleQuotes(c); 1068 break; 1069 } 1070 case 12: { 1071 this.stateInAttrName(c); 1072 break; 1073 } 1074 case 13: { 1075 this.stateInDirName(c); 1076 break; 1077 } 1078 case 14: { 1079 this.stateInDirArg(c); 1080 break; 1081 } 1082 case 15: { 1083 this.stateInDynamicDirArg(c); 1084 break; 1085 } 1086 case 16: { 1087 this.stateInDirModifier(c); 1088 break; 1089 } 1090 case 28: { 1091 this.stateInCommentLike(c); 1092 break; 1093 } 1094 case 27: { 1095 this.stateInSpecialComment(c); 1096 break; 1097 } 1098 case 11: { 1099 this.stateBeforeAttrName(c); 1100 break; 1101 } 1102 case 6: { 1103 this.stateInTagName(c); 1104 break; 1105 } 1106 case 34: { 1107 this.stateInSFCRootTagName(c); 1108 break; 1109 } 1110 case 9: { 1111 this.stateInClosingTagName(c); 1112 break; 1113 } 1114 case 5: { 1115 this.stateBeforeTagName(c); 1116 break; 1117 } 1118 case 17: { 1119 this.stateAfterAttrName(c); 1120 break; 1121 } 1122 case 20: { 1123 this.stateInAttrValueSingleQuotes(c); 1124 break; 1125 } 1126 case 18: { 1127 this.stateBeforeAttrValue(c); 1128 break; 1129 } 1130 case 8: { 1131 this.stateBeforeClosingTagName(c); 1132 break; 1133 } 1134 case 10: { 1135 this.stateAfterClosingTagName(c); 1136 break; 1137 } 1138 case 29: { 1139 this.stateBeforeSpecialS(c); 1140 break; 1141 } 1142 case 30: { 1143 this.stateBeforeSpecialT(c); 1144 break; 1145 } 1146 case 21: { 1147 this.stateInAttrValueNoQuotes(c); 1148 break; 1149 } 1150 case 7: { 1151 this.stateInSelfClosingTag(c); 1152 break; 1153 } 1154 case 23: { 1155 this.stateInDeclaration(c); 1156 break; 1157 } 1158 case 22: { 1159 this.stateBeforeDeclaration(c); 1160 break; 1161 } 1162 case 25: { 1163 this.stateBeforeComment(c); 1164 break; 1165 } 1166 case 24: { 1167 this.stateInProcessingInstruction(c); 1168 break; 1169 } 1170 case 33: { 1171 this.stateInEntity(); 1172 break; 1173 } 1174 } 1175 this.index++; 1176 } 1177 this.cleanup(); 1178 this.finish(); 1179 } 1180 /** 1181 * Remove data that has already been consumed from the buffer. 1182 */ 1183 cleanup() { 1184 if (this.sectionStart !== this.index) { 1185 if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { 1186 this.cbs.ontext(this.sectionStart, this.index); 1187 this.sectionStart = this.index; 1188 } else if (this.state === 19 || this.state === 20 || this.state === 21) { 1189 this.cbs.onattribdata(this.sectionStart, this.index); 1190 this.sectionStart = this.index; 1191 } 1192 } 1193 } 1194 finish() { 1195 this.handleTrailingData(); 1196 this.cbs.onend(); 1197 } 1198 /** Handle any trailing data. */ 1199 handleTrailingData() { 1200 const endIndex = this.buffer.length; 1201 if (this.sectionStart >= endIndex) { 1202 return; 1203 } 1204 if (this.state === 28) { 1205 if (this.currentSequence === Sequences.CdataEnd) { 1206 this.cbs.oncdata(this.sectionStart, endIndex); 1207 } else { 1208 this.cbs.oncomment(this.sectionStart, endIndex); 1209 } 1210 } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; 1211 else { 1212 this.cbs.ontext(this.sectionStart, endIndex); 1213 } 1214 }
1215 emitCodePoint(cp, consumed) { 1216 } 1217}
vendor: 3,291 bytes, lines 1217-1276
1217 1218const CompilerDeprecationTypes = { 1219 "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", 1220 "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", 1221 "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", 1222 "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", 1223 "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", 1224 "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", 1225 "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", 1226 "COMPILER_FILTERS": "COMPILER_FILTERS" 1227}; 1228const deprecationData = { 1229 ["COMPILER_IS_ON_ELEMENT"]: { 1230 message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, 1231 link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` 1232 }, 1233 ["COMPILER_V_BIND_SYNC"]: { 1234 message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, 1235 link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` 1236 }, 1237 ["COMPILER_V_BIND_OBJECT_ORDER"]: { 1238 message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, 1239 link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` 1240 }, 1241 ["COMPILER_V_ON_NATIVE"]: { 1242 message: `.native modifier for v-on has been removed as is no longer necessary.`, 1243 link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` 1244 }, 1245 ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { 1246 message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, 1247 link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` 1248 }, 1249 ["COMPILER_NATIVE_TEMPLATE"]: { 1250 message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` 1251 }, 1252 ["COMPILER_INLINE_TEMPLATE"]: { 1253 message: `"inline-template" has been removed in Vue 3.`, 1254 link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` 1255 }, 1256 ["COMPILER_FILTERS"]: { 1257 message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, 1258 link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` 1259 } 1260}; 1261function getCompatValue(key, { compatConfig }) { 1262 const value = compatConfig && compatConfig[key]; 1263 if (key === "MODE") { 1264 return value || 3; 1265 } else { 1266 return value; 1267 } 1268} 1269function isCompatEnabled(key, context) { 1270 const mode = getCompatValue("MODE", context); 1271 const value = getCompatValue(key, context); 1272 return mode === 3 ? value === true : value !== false; 1273} 1274function checkCompatEnabled(key, context, loc, ...args) { 1275 const enabled = isCompatEnabled(key, context); 1276
vendor: 4,221 bytes, lines 1276-1396
1276return enabled; 1277} 1278function warnDeprecation(key, context, loc, ...args) { 1279 const val = getCompatValue(key, context); 1280 if (val === "suppress-warning") { 1281 return; 1282 } 1283 const { message, link } = deprecationData[key]; 1284 const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` 1285 Details: ${link}` : ``}`; 1286 const err = new SyntaxError(msg); 1287 err.code = key; 1288 if (loc) err.loc = loc; 1289 context.onWarn(err); 1290} 1291function defaultOnError(error) { 1292 throw error; 1293} 1294function defaultOnWarn(msg) { 1295} 1296function createCompilerError(code, loc, messages, additionalMessage) { 1297 const msg = `https://vuejs.org/error-reference/#compiler-${code}`; 1298 const error = new SyntaxError(String(msg)); 1299 error.code = code; 1300 error.loc = loc; 1301 return error; 1302} 1303const ErrorCodes = { 1304 "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, 1305 "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", 1306 "CDATA_IN_HTML_CONTENT": 1, 1307 "1": "CDATA_IN_HTML_CONTENT", 1308 "DUPLICATE_ATTRIBUTE": 2, 1309 "2": "DUPLICATE_ATTRIBUTE", 1310 "END_TAG_WITH_ATTRIBUTES": 3, 1311 "3": "END_TAG_WITH_ATTRIBUTES", 1312 "END_TAG_WITH_TRAILING_SOLIDUS": 4, 1313 "4": "END_TAG_WITH_TRAILING_SOLIDUS", 1314 "EOF_BEFORE_TAG_NAME": 5, 1315 "5": "EOF_BEFORE_TAG_NAME", 1316 "EOF_IN_CDATA": 6, 1317 "6": "EOF_IN_CDATA", 1318 "EOF_IN_COMMENT": 7, 1319 "7": "EOF_IN_COMMENT", 1320 "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, 1321 "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", 1322 "EOF_IN_TAG": 9, 1323 "9": "EOF_IN_TAG", 1324 "INCORRECTLY_CLOSED_COMMENT": 10, 1325 "10": "INCORRECTLY_CLOSED_COMMENT", 1326 "INCORRECTLY_OPENED_COMMENT": 11, 1327 "11": "INCORRECTLY_OPENED_COMMENT", 1328 "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, 1329 "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", 1330 "MISSING_ATTRIBUTE_VALUE": 13, 1331 "13": "MISSING_ATTRIBUTE_VALUE", 1332 "MISSING_END_TAG_NAME": 14, 1333 "14": "MISSING_END_TAG_NAME", 1334 "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, 1335 "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", 1336 "NESTED_COMMENT": 16, 1337 "16": "NESTED_COMMENT", 1338 "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, 1339 "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", 1340 "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, 1341 "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", 1342 "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, 1343 "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", 1344 "UNEXPECTED_NULL_CHARACTER": 20, 1345 "20": "UNEXPECTED_NULL_CHARACTER", 1346 "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, 1347 "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", 1348 "UNEXPECTED_SOLIDUS_IN_TAG": 22, 1349 "22": "UNEXPECTED_SOLIDUS_IN_TAG", 1350 "X_INVALID_END_TAG": 23, 1351 "23": "X_INVALID_END_TAG", 1352 "X_MISSING_END_TAG": 24, 1353 "24": "X_MISSING_END_TAG", 1354 "X_MISSING_INTERPOLATION_END": 25, 1355 "25": "X_MISSING_INTERPOLATION_END", 1356 "X_MISSING_DIRECTIVE_NAME": 26, 1357 "26": "X_MISSING_DIRECTIVE_NAME", 1358 "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, 1359 "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", 1360 "X_V_IF_NO_EXPRESSION": 28, 1361 "28": "X_V_IF_NO_EXPRESSION", 1362 "X_V_IF_SAME_KEY": 29, 1363 "29": "X_V_IF_SAME_KEY", 1364 "X_V_ELSE_NO_ADJACENT_IF": 30, 1365 "30": "X_V_ELSE_NO_ADJACENT_IF", 1366 "X_V_FOR_NO_EXPRESSION": 31, 1367 "31": "X_V_FOR_NO_EXPRESSION", 1368 "X_V_FOR_MALFORMED_EXPRESSION": 32, 1369 "32": "X_V_FOR_MALFORMED_EXPRESSION", 1370 "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, 1371 "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", 1372 "X_V_BIND_NO_EXPRESSION": 34, 1373 "34": "X_V_BIND_NO_EXPRESSION", 1374 "X_V_ON_NO_EXPRESSION": 35, 1375 "35": "X_V_ON_NO_EXPRESSION", 1376 "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, 1377 "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", 1378 "X_V_SLOT_MIXED_SLOT_USAGE": 37, 1379 "37": "X_V_SLOT_MIXED_SLOT_USAGE", 1380 "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, 1381 "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", 1382 "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, 1383 "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", 1384 "X_V_SLOT_MISPLACED": 40, 1385 "40": "X_V_SLOT_MISPLACED", 1386 "X_V_MODEL_NO_EXPRESSION": 41, 1387 "41": "X_V_MODEL_NO_EXPRESSION", 1388 "X_V_MODEL_MALFORMED_EXPRESSION": 42, 1389 "42": "X_V_MODEL_MALFORMED_EXPRESSION", 1390 "X_V_MODEL_ON_SCOPE_VARIABLE": 43, 1391 "43": "X_V_MODEL_ON_SCOPE_VARIABLE", 1392 "X_V_MODEL_ON_PROPS": 44, 1393 "44": "X_V_MODEL_ON_PROPS", 1394 "X_V_MODEL_ON_CONST": 45, 1395 "45": "X_V_MODEL_ON_CONST", 1396 "X_INVALID_EXPRESSION": 46,
1397 "46": "X_INVALID_EXPRESSION", 1398 "X_KEEP_ALIVE_INVALID_CHILDREN": 47, 1399 "47": "X_KEEP_ALIVE_INVALID_CHILDREN", 1400 "X_PREFIX_ID_NOT_SUPPORTED": 48, 1401 "48": "X_PREFIX_ID_NOT_SUPPORTED", 1402 "X_MODULE_MODE_NOT_SUPPORTED": 49, 1403 "49": "X_MODULE_MODE_NOT_SUPPORTED", 1404 "X_CACHE_HANDLER_NOT_SUPPORTED": 50, 1405 "50": "X_CACHE_HANDLER_NOT_SUPPORTED", 1406 "X_SCOPE_ID_NOT_SUPPORTED": 51, 1407 "51": "X_SCOPE_ID_NOT_SUPPORTED", 1408 "X_VNODE_HOOKS": 52, 1409 "52": "X_VNODE_HOOKS", 1410 "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 53, 1411 "53": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", 1412 "__EXTEND_POINT__": 54, 1413 "54": "__EXTEND_POINT__" 1414}; 1415const errorMessages = { 1416 // parse errors 1417 [0]: "Illegal comment.", 1418 [1]: "CDATA section is allowed only in XML context.", 1419 [2]: "Duplicate attribute.", 1420 [3]: "End tag cannot have attributes.", 1421 [4]: "Illegal '/' in tags.", 1422 [5]: "Unexpected EOF in tag.", 1423 [6]: "Unexpected EOF in CDATA section.", 1424 [7]: "Unexpected EOF in comment.", 1425 [8]: "Unexpected EOF in script.", 1426 [9]: "Unexpected EOF in tag.", 1427 [10]: "Incorrectly closed comment.", 1428 [11]: "Incorrectly opened comment.", 1429 [12]: "Illegal tag name. Use '<' to print '<'.", 1430 [13]: "Attribute value was expected.", 1431 [14]: "End tag name was expected.", 1432 [15]: "Whitespace was expected.", 1433 [16]: "Unexpected '<!--' in comment.", 1434 [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, 1435 [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", 1436 [19]: "Attribute name cannot start with '='.", 1437 [21]: "'<?' is allowed only in XML context.", 1438 [20]: `Unexpected null character.`, 1439 [22]: "Illegal '/' in tags.", 1440 // Vue-specific parse errors 1441 [23]: "Invalid end tag.", 1442 [24]: "Element is missing end tag.", 1443 [25]: "Interpolation end sign was not found.", 1444 [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", 1445 [26]: "Legal directive name was expected.", 1446 // transform errors 1447 [28]: `v-if/v-else-if is missing expression.`, 1448 [29]: `v-if/else branches must use unique keys.`, 1449 [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, 1450 [31]: `v-for is missing expression.`, 1451 [32]: `v-for has invalid expression.`, 1452 [33]: `<template v-for> key should be placed on the <template> tag.`, 1453 [34]: `v-bind is missing expression.`, 1454 [53]: `v-bind with same-name shorthand only allows static argument.`, 1455 [35]: `v-on is missing expression.`, 1456 [36]: `Unexpected custom directive on <slot> outlet.`, 1457 [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, 1458 [38]: `Duplicate slot names found. `, 1459 [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, 1460 [40]: `v-slot can only be used on components or <template> tags.`, 1461 [41]: `v-model is missing expression.`, 1462 [42]: `v-model value must be a valid JavaScript member expression.`, 1463 [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, 1464 [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. 1465Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, 1466 [45]: `v-model cannot be used on a const binding because it is not writable.`, 1467 [46]: `Error parsing JavaScript expression: `, 1468 [47]: `<KeepAlive> expects exactly one child component.`, 1469 [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, 1470 // generic errors 1471 [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`, 1472 [49]: `ES module mode is not supported in this build of compiler.`, 1473 [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, 1474 [51]: `"scopeId" option is only supported in module mode.`, 1475 // just to fulfill types 1476 [54]: `` 1477}; 1478function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { 1479 { 1480 return; 1481 } 1482} 1483function isReferencedIdentifier(id, parent, parentStack) { 1484 { 1485 return false;
vendor: 11,085 bytes, lines 1486-1847
1486 } 1487} 1488function isInDestructureAssignment(parent, parentStack) { 1489 if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { 1490 let i = parentStack.length; 1491 while (i--) { 1492 const p = parentStack[i]; 1493 if (p.type === "AssignmentExpression") { 1494 return true; 1495 } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { 1496 break; 1497 } 1498 } 1499 } 1500 return false; 1501} 1502function isInNewExpression(parentStack) { 1503 let i = parentStack.length; 1504 while (i--) { 1505 const p = parentStack[i]; 1506 if (p.type === "NewExpression") { 1507 return true; 1508 } else if (p.type !== "MemberExpression") { 1509 break; 1510 } 1511 } 1512 return false; 1513} 1514function walkFunctionParams(node, onIdent) { 1515 for (const p of node.params) { 1516 for (const id of extractIdentifiers(p)) { 1517 onIdent(id); 1518 } 1519 } 1520} 1521function walkBlockDeclarations(block, onIdent) { 1522 const body = block.type === "SwitchCase" ? block.consequent : block.body; 1523 for (const stmt of body) { 1524 if (stmt.type === "VariableDeclaration") { 1525 if (stmt.declare) continue; 1526 for (const decl of stmt.declarations) { 1527 for (const id of extractIdentifiers(decl.id)) { 1528 onIdent(id); 1529 } 1530 } 1531 } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { 1532 if (stmt.declare || !stmt.id) continue; 1533 onIdent(stmt.id); 1534 } else if (isForStatement(stmt)) { 1535 walkForStatement(stmt, true, onIdent); 1536 } else if (stmt.type === "SwitchStatement") { 1537 walkSwitchStatement(stmt, true, onIdent); 1538 } 1539 } 1540} 1541function isForStatement(stmt) { 1542 return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement"; 1543} 1544function walkForStatement(stmt, isVar, onIdent) { 1545 const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; 1546 if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) { 1547 for (const decl of variable.declarations) { 1548 for (const id of extractIdentifiers(decl.id)) { 1549 onIdent(id); 1550 } 1551 } 1552 } 1553} 1554function walkSwitchStatement(stmt, isVar, onIdent) { 1555 for (const cs of stmt.cases) { 1556 for (const stmt2 of cs.consequent) { 1557 if (stmt2.type === "VariableDeclaration" && (stmt2.kind === "var" ? isVar : !isVar)) { 1558 for (const decl of stmt2.declarations) { 1559 for (const id of extractIdentifiers(decl.id)) { 1560 onIdent(id); 1561 } 1562 } 1563 } 1564 } 1565 walkBlockDeclarations(cs, onIdent); 1566 } 1567} 1568function extractIdentifiers(param, nodes = []) { 1569 switch (param.type) { 1570 case "Identifier": 1571 nodes.push(param); 1572 break; 1573 case "MemberExpression": 1574 let object = param; 1575 while (object.type === "MemberExpression") { 1576 object = object.object; 1577 } 1578 nodes.push(object); 1579 break; 1580 case "ObjectPattern": 1581 for (const prop of param.properties) { 1582 if (prop.type === "RestElement") { 1583 extractIdentifiers(prop.argument, nodes); 1584 } else { 1585 extractIdentifiers(prop.value, nodes); 1586 } 1587 } 1588 break; 1589 case "ArrayPattern": 1590 param.elements.forEach((element) => { 1591 if (element) extractIdentifiers(element, nodes); 1592 }); 1593 break; 1594 case "RestElement": 1595 extractIdentifiers(param.argument, nodes); 1596 break; 1597 case "AssignmentPattern": 1598 extractIdentifiers(param.left, nodes); 1599 break; 1600 } 1601 return nodes; 1602} 1603const isFunctionType = (node) => { 1604 return /Function(?:Expression|Declaration)$|Method$/.test(node.type); 1605}; 1606const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; 1607const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; 1608const TS_NODE_TYPES = [ 1609 "TSAsExpression", 1610 // foo as number 1611 "TSTypeAssertion", 1612 // (<number>foo) 1613 "TSNonNullExpression", 1614 // foo! 1615 "TSInstantiationExpression", 1616 // foo<string> 1617 "TSSatisfiesExpression" 1618 // foo satisfies T 1619]; 1620function unwrapTSNode(node) { 1621 if (TS_NODE_TYPES.includes(node.type)) { 1622 return unwrapTSNode(node.expression); 1623 } else { 1624 return node; 1625 } 1626} 1627const isStaticExp = (p) => p.type === 4 && p.isStatic; 1628function isCoreComponent(tag) { 1629 switch (tag) { 1630 case "Teleport": 1631 case "teleport": 1632 return TELEPORT; 1633 case "Suspense": 1634 case "suspense": 1635 return SUSPENSE; 1636 case "KeepAlive": 1637 case "keep-alive": 1638 return KEEP_ALIVE; 1639 case "BaseTransition": 1640 case "base-transition": 1641 return BASE_TRANSITION; 1642 } 1643} 1644const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/; 1645const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); 1646const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; 1647const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; 1648const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; 1649const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source; 1650const isMemberExpressionBrowser = (exp) => { 1651 const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim()); 1652 let state = 0; 1653 let stateStack = []; 1654 let currentOpenBracketCount = 0; 1655 let currentOpenParensCount = 0; 1656 let currentStringType = null; 1657 for (let i = 0; i < path.length; i++) { 1658 const char = path.charAt(i); 1659 switch (state) { 1660 case 0: 1661 if (char === "[") { 1662 stateStack.push(state); 1663 state = 1; 1664 currentOpenBracketCount++; 1665 } else if (char === "(") { 1666 stateStack.push(state); 1667 state = 2; 1668 currentOpenParensCount++; 1669 } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { 1670 return false; 1671 } 1672 break; 1673 case 1: 1674 if (char === `'` || char === `"` || char === "`") { 1675 stateStack.push(state); 1676 state = 3; 1677 currentStringType = char; 1678 } else if (char === `[`) { 1679 currentOpenBracketCount++; 1680 } else if (char === `]`) { 1681 if (!--currentOpenBracketCount) { 1682 state = stateStack.pop(); 1683 } 1684 } 1685 break; 1686 case 2: 1687 if (char === `'` || char === `"` || char === "`") { 1688 stateStack.push(state); 1689 state = 3; 1690 currentStringType = char; 1691 } else if (char === `(`) { 1692 currentOpenParensCount++; 1693 } else if (char === `)`) { 1694 if (i === path.length - 1) { 1695 return false; 1696 } 1697 if (!--currentOpenParensCount) { 1698 state = stateStack.pop(); 1699 } 1700 } 1701 break; 1702 case 3: 1703 if (char === currentStringType) { 1704 state = stateStack.pop(); 1705 currentStringType = null; 1706 } 1707 break; 1708 } 1709 } 1710 return !currentOpenBracketCount && !currentOpenParensCount; 1711}; 1712const isMemberExpressionNode = NOOP; 1713const isMemberExpression = isMemberExpressionBrowser; 1714const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/; 1715const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp)); 1716const isFnExpressionNode = NOOP; 1717const isFnExpression = isFnExpressionBrowser; 1718function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { 1719 return advancePositionWithMutation( 1720 { 1721 offset: pos.offset, 1722 line: pos.line, 1723 column: pos.column 1724 }, 1725 source, 1726 numberOfCharacters 1727 ); 1728} 1729function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { 1730 let linesCount = 0; 1731 let lastNewLinePos = -1; 1732 for (let i = 0; i < numberOfCharacters; i++) { 1733 if (source.charCodeAt(i) === 10) { 1734 linesCount++; 1735 lastNewLinePos = i; 1736 } 1737 } 1738 pos.offset += numberOfCharacters; 1739 pos.line += linesCount; 1740 pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; 1741 return pos; 1742} 1743function assert(condition, msg) { 1744 if (!condition) { 1745 throw new Error(msg || `unexpected compiler condition`); 1746 } 1747} 1748function findDir(node, name, allowEmpty = false) { 1749 for (let i = 0; i < node.props.length; i++) { 1750 const p = node.props[i]; 1751 if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { 1752 return p; 1753 } 1754 } 1755} 1756function findProp(node, name, dynamicOnly = false, allowEmpty = false) { 1757 for (let i = 0; i < node.props.length; i++) { 1758 const p = node.props[i]; 1759 if (p.type === 6) { 1760 if (dynamicOnly) continue; 1761 if (p.name === name && (p.value || allowEmpty)) { 1762 return p; 1763 } 1764 } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { 1765 return p; 1766 } 1767 } 1768} 1769function isStaticArgOf(arg, name) { 1770 return !!(arg && isStaticExp(arg) && arg.content === name); 1771} 1772function hasDynamicKeyVBind(node) { 1773 return node.props.some( 1774 (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" 1775 p.arg.type !== 4 || // v-bind:[_ctx.foo] 1776 !p.arg.isStatic) 1777 // v-bind:[foo] 1778 ); 1779} 1780function isText$1(node) { 1781 return node.type === 5 || node.type === 2; 1782} 1783function isVPre(p) { 1784 return p.type === 7 && p.name === "pre"; 1785} 1786function isVSlot(p) { 1787 return p.type === 7 && p.name === "slot"; 1788} 1789function isTemplateNode(node) { 1790 return node.type === 1 && node.tagType === 3; 1791} 1792function isSlotOutlet(node) { 1793 return node.type === 1 && node.tagType === 2; 1794} 1795const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); 1796function getUnnormalizedProps(props, callPath = []) { 1797 if (props && !isString(props) && props.type === 14) { 1798 const callee = props.callee; 1799 if (!isString(callee) && propsHelperSet.has(callee)) { 1800 return getUnnormalizedProps( 1801 props.arguments[0], 1802 callPath.concat(props) 1803 ); 1804 } 1805 } 1806 return [props, callPath]; 1807} 1808function injectProp(node, prop, context) { 1809 let propsWithInjection; 1810 let props = node.type === 13 ? node.props : node.arguments[2]; 1811 let callPath = []; 1812 let parentCall; 1813 if (props && !isString(props) && props.type === 14) { 1814 const ret = getUnnormalizedProps(props); 1815 props = ret[0]; 1816 callPath = ret[1]; 1817 parentCall = callPath[callPath.length - 1]; 1818 } 1819 if (props == null || isString(props)) { 1820 propsWithInjection = createObjectExpression([prop]); 1821 } else if (props.type === 14) { 1822 const first = props.arguments[0]; 1823 if (!isString(first) && first.type === 15) { 1824 if (!hasProp(prop, first)) { 1825 first.properties.unshift(prop); 1826 } 1827 } else { 1828 if (props.callee === TO_HANDLERS) { 1829 propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ 1830 createObjectExpression([prop]), 1831 props 1832 ]); 1833 } else { 1834 props.arguments.unshift(createObjectExpression([prop])); 1835 } 1836 } 1837 !propsWithInjection && (propsWithInjection = props); 1838 } else if (props.type === 15) { 1839 if (!hasProp(prop, props)) { 1840 props.properties.unshift(prop); 1841 } 1842 propsWithInjection = props; 1843 } else { 1844 propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ 1845 createObjectExpression([prop]), 1846 props 1847 ]);
vendor: 4,569 bytes, lines 1848-2015
1848 if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { 1849 parentCall = callPath[callPath.length - 2]; 1850 } 1851 } 1852 if (node.type === 13) { 1853 if (parentCall) { 1854 parentCall.arguments[0] = propsWithInjection; 1855 } else { 1856 node.props = propsWithInjection; 1857 } 1858 } else { 1859 if (parentCall) { 1860 parentCall.arguments[0] = propsWithInjection; 1861 } else { 1862 node.arguments[2] = propsWithInjection; 1863 } 1864 } 1865} 1866function hasProp(prop, props) { 1867 let result = false; 1868 if (prop.key.type === 4) { 1869 const propKeyName = prop.key.content; 1870 result = props.properties.some( 1871 (p) => p.key.type === 4 && p.key.content === propKeyName 1872 ); 1873 } 1874 return result; 1875} 1876function toValidAssetId(name, type) { 1877 return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { 1878 return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); 1879 })}`; 1880} 1881function hasScopeRef(node, ids) { 1882 if (!node || Object.keys(ids).length === 0) { 1883 return false; 1884 } 1885 switch (node.type) { 1886 case 1: 1887 for (let i = 0; i < node.props.length; i++) { 1888 const p = node.props[i]; 1889 if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { 1890 return true; 1891 } 1892 } 1893 return node.children.some((c) => hasScopeRef(c, ids)); 1894 case 11: 1895 if (hasScopeRef(node.source, ids)) { 1896 return true; 1897 } 1898 return node.children.some((c) => hasScopeRef(c, ids)); 1899 case 9: 1900 return node.branches.some((b) => hasScopeRef(b, ids)); 1901 case 10: 1902 if (hasScopeRef(node.condition, ids)) { 1903 return true; 1904 } 1905 return node.children.some((c) => hasScopeRef(c, ids)); 1906 case 4: 1907 return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; 1908 case 8: 1909 return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); 1910 case 5: 1911 case 12: 1912 return hasScopeRef(node.content, ids); 1913 case 2: 1914 case 3: 1915 case 20: 1916 return false; 1917 default: 1918 return false; 1919 } 1920} 1921function getMemoedVNodeCall(node) { 1922 if (node.type === 14 && node.callee === WITH_MEMO) { 1923 return node.arguments[1].returns; 1924 } else { 1925 return node; 1926 } 1927} 1928const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/; 1929function isAllWhitespace(str) { 1930 for (let i = 0; i < str.length; i++) { 1931 if (!isWhitespace(str.charCodeAt(i))) { 1932 return false; 1933 } 1934 } 1935 return true; 1936} 1937function isWhitespaceText(node) { 1938 return node.type === 2 && isAllWhitespace(node.content) || node.type === 12 && isWhitespaceText(node.content); 1939} 1940function isCommentOrWhitespace(node) { 1941 return node.type === 3 || isWhitespaceText(node); 1942} 1943const defaultParserOptions = { 1944 parseMode: "base", 1945 ns: 0, 1946 delimiters: [`{{`, `}}`], 1947 getNamespace: () => 0, 1948 isVoidTag: NO, 1949 isPreTag: NO, 1950 isIgnoreNewlineTag: NO, 1951 isCustomElement: NO, 1952 onError: defaultOnError, 1953 onWarn: defaultOnWarn, 1954 comments: false, 1955 prefixIdentifiers: false 1956}; 1957let currentOptions = defaultParserOptions; 1958let currentRoot = null; 1959let currentInput = ""; 1960let currentOpenTag = null; 1961let currentProp = null; 1962let currentAttrValue = ""; 1963let currentAttrStartIndex = -1; 1964let currentAttrEndIndex = -1; 1965let inPre = 0; 1966let inVPre = false; 1967let currentVPreBoundary = null; 1968const stack = []; 1969const tokenizer = new Tokenizer(stack, { 1970 onerr: emitError, 1971 ontext(start, end) { 1972 onText(getSlice(start, end), start, end); 1973 }, 1974 ontextentity(char, start, end) { 1975 onText(char, start, end); 1976 }, 1977 oninterpolation(start, end) { 1978 if (inVPre) { 1979 return onText(getSlice(start, end), start, end); 1980 } 1981 let innerStart = start + tokenizer.delimiterOpen.length; 1982 let innerEnd = end - tokenizer.delimiterClose.length; 1983 while (isWhitespace(currentInput.charCodeAt(innerStart))) { 1984 innerStart++; 1985 } 1986 while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { 1987 innerEnd--; 1988 } 1989 let exp = getSlice(innerStart, innerEnd); 1990 if (exp.includes("&")) { 1991 { 1992 exp = currentOptions.decodeEntities(exp, false); 1993 } 1994 } 1995 addNode({ 1996 type: 5, 1997 content: createExp(exp, false, getLoc(innerStart, innerEnd)), 1998 loc: getLoc(start, end) 1999 }); 2000 }, 2001 onopentagname(start, end) { 2002 const name = getSlice(start, end); 2003 currentOpenTag = { 2004 type: 1, 2005 tag: name, 2006 ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), 2007 tagType: 0, 2008 // will be refined on tag close 2009 props: [], 2010 children: [], 2011 loc: getLoc(start - 1, end), 2012 codegenNode: void 0 2013 }; 2014 }, 2015 onopentagend(end) {
vendor: 12,158 bytes, lines 2016-2431
2016 endOpenTag(end); 2017 }, 2018 onclosetag(start, end) { 2019 const name = getSlice(start, end); 2020 if (!currentOptions.isVoidTag(name)) { 2021 let found = false; 2022 for (let i = 0; i < stack.length; i++) { 2023 const e = stack[i]; 2024 if (e.tag.toLowerCase() === name.toLowerCase()) { 2025 found = true; 2026 if (i > 0) { 2027 emitError(24, stack[0].loc.start.offset); 2028 } 2029 for (let j = 0; j <= i; j++) { 2030 const el = stack.shift(); 2031 onCloseTag(el, end, j < i); 2032 } 2033 break; 2034 } 2035 } 2036 if (!found) { 2037 emitError(23, backTrack(start, 60)); 2038 } 2039 } 2040 }, 2041 onselfclosingtag(end) { 2042 const name = currentOpenTag.tag; 2043 currentOpenTag.isSelfClosing = true; 2044 endOpenTag(end); 2045 if (stack[0] && stack[0].tag === name) { 2046 onCloseTag(stack.shift(), end); 2047 } 2048 }, 2049 onattribname(start, end) { 2050 currentProp = { 2051 type: 6, 2052 name: getSlice(start, end), 2053 nameLoc: getLoc(start, end), 2054 value: void 0, 2055 loc: getLoc(start) 2056 }; 2057 }, 2058 ondirname(start, end) { 2059 const raw = getSlice(start, end); 2060 const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); 2061 if (!inVPre && name === "") { 2062 emitError(26, start); 2063 } 2064 if (inVPre || name === "") { 2065 currentProp = { 2066 type: 6, 2067 name: raw, 2068 nameLoc: getLoc(start, end), 2069 value: void 0, 2070 loc: getLoc(start) 2071 }; 2072 } else { 2073 currentProp = { 2074 type: 7, 2075 name, 2076 rawName: raw, 2077 exp: void 0, 2078 arg: void 0, 2079 modifiers: raw === "." ? [createSimpleExpression("prop")] : [], 2080 loc: getLoc(start) 2081 }; 2082 if (name === "pre") { 2083 inVPre = tokenizer.inVPre = true; 2084 currentVPreBoundary = currentOpenTag; 2085 const props = currentOpenTag.props; 2086 for (let i = 0; i < props.length; i++) { 2087 if (props[i].type === 7) { 2088 props[i] = dirToAttr(props[i]); 2089 } 2090 } 2091 } 2092 } 2093 }, 2094 ondirarg(start, end) { 2095 if (start === end) return; 2096 const arg = getSlice(start, end); 2097 if (inVPre && !isVPre(currentProp)) { 2098 currentProp.name += arg; 2099 setLocEnd(currentProp.nameLoc, end); 2100 } else { 2101 const isStatic = arg[0] !== `[`; 2102 currentProp.arg = createExp( 2103 isStatic ? arg : arg.slice(1, -1), 2104 isStatic, 2105 getLoc(start, end), 2106 isStatic ? 3 : 0 2107 ); 2108 } 2109 }, 2110 ondirmodifier(start, end) { 2111 const mod = getSlice(start, end); 2112 if (inVPre && !isVPre(currentProp)) { 2113 currentProp.name += "." + mod; 2114 setLocEnd(currentProp.nameLoc, end); 2115 } else if (currentProp.name === "slot") { 2116 const arg = currentProp.arg; 2117 if (arg) { 2118 arg.content += "." + mod; 2119 setLocEnd(arg.loc, end); 2120 } 2121 } else { 2122 const exp = createSimpleExpression(mod, true, getLoc(start, end)); 2123 currentProp.modifiers.push(exp); 2124 } 2125 }, 2126 onattribdata(start, end) { 2127 currentAttrValue += getSlice(start, end); 2128 if (currentAttrStartIndex < 0) currentAttrStartIndex = start; 2129 currentAttrEndIndex = end; 2130 }, 2131 onattribentity(char, start, end) { 2132 currentAttrValue += char; 2133 if (currentAttrStartIndex < 0) currentAttrStartIndex = start; 2134 currentAttrEndIndex = end; 2135 }, 2136 onattribnameend(end) { 2137 const start = currentProp.loc.start.offset; 2138 const name = getSlice(start, end); 2139 if (currentProp.type === 7) { 2140 currentProp.rawName = name; 2141 } 2142 if (currentOpenTag.props.some( 2143 (p) => (p.type === 7 ? p.rawName : p.name) === name 2144 )) { 2145 emitError(2, start); 2146 } 2147 }, 2148 onattribend(quote, end) { 2149 if (currentOpenTag && currentProp) { 2150 setLocEnd(currentProp.loc, end); 2151 if (quote !== 0) { 2152 if (currentAttrValue.includes("&")) { 2153 currentAttrValue = currentOptions.decodeEntities( 2154 currentAttrValue, 2155 true 2156 ); 2157 } 2158 if (currentProp.type === 6) { 2159 if (currentProp.name === "class") { 2160 currentAttrValue = condense(currentAttrValue).trim(); 2161 } 2162 if (quote === 1 && !currentAttrValue) { 2163 emitError(13, end); 2164 } 2165 currentProp.value = { 2166 type: 2, 2167 content: currentAttrValue, 2168 loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) 2169 }; 2170 if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { 2171 tokenizer.enterRCDATA(toCharCodes(`</template`), 0); 2172 } 2173 } else { 2174 let expParseMode = 0; 2175 currentProp.exp = createExp( 2176 currentAttrValue, 2177 false, 2178 getLoc(currentAttrStartIndex, currentAttrEndIndex), 2179 0, 2180 expParseMode 2181 ); 2182 if (currentProp.name === "for") { 2183 currentProp.forParseResult = parseForExpression(currentProp.exp); 2184 } 2185 let syncIndex = -1; 2186 if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex( 2187 (mod) => mod.content === "sync" 2188 )) > -1 && checkCompatEnabled( 2189 "COMPILER_V_BIND_SYNC", 2190 currentOptions, 2191 currentProp.loc, 2192 currentProp.arg.loc.source 2193 )) { 2194 currentProp.name = "model"; 2195 currentProp.modifiers.splice(syncIndex, 1); 2196 } 2197 } 2198 } 2199 if (currentProp.type !== 7 || currentProp.name !== "pre") { 2200 currentOpenTag.props.push(currentProp); 2201 } 2202 } 2203 currentAttrValue = ""; 2204 currentAttrStartIndex = currentAttrEndIndex = -1; 2205 }, 2206 oncomment(start, end) { 2207 if (currentOptions.comments) { 2208 addNode({ 2209 type: 3, 2210 content: getSlice(start, end), 2211 loc: getLoc(start - 4, end + 3) 2212 }); 2213 } 2214 }, 2215 onend() { 2216 const end = currentInput.length; 2217 for (let index = 0; index < stack.length; index++) { 2218 onCloseTag(stack[index], end - 1); 2219 emitError(24, stack[index].loc.start.offset); 2220 } 2221 }, 2222 oncdata(start, end) { 2223 if (stack[0].ns !== 0) { 2224 onText(getSlice(start, end), start, end); 2225 } else { 2226 emitError(1, start - 9); 2227 } 2228 }, 2229 onprocessinginstruction(start) { 2230 if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { 2231 emitError( 2232 21, 2233 start - 1 2234 ); 2235 } 2236 } 2237}); 2238const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; 2239const stripParensRE = /^\(|\)$/g; 2240function parseForExpression(input) { 2241 const loc = input.loc; 2242 const exp = input.content; 2243 const inMatch = exp.match(forAliasRE); 2244 if (!inMatch) return; 2245 const [, LHS, RHS] = inMatch; 2246 const createAliasExpression = (content, offset, asParam = false) => { 2247 const start = loc.start.offset + offset; 2248 const end = start + content.length; 2249 return createExp( 2250 content, 2251 false, 2252 getLoc(start, end), 2253 0, 2254 asParam ? 1 : 0 2255 /* Normal */ 2256 ); 2257 }; 2258 const result = { 2259 source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), 2260 value: void 0, 2261 key: void 0, 2262 index: void 0, 2263 finalized: false 2264 }; 2265 let valueContent = LHS.trim().replace(stripParensRE, "").trim(); 2266 const trimmedOffset = LHS.indexOf(valueContent); 2267 const iteratorMatch = valueContent.match(forIteratorRE); 2268 if (iteratorMatch) { 2269 valueContent = valueContent.replace(forIteratorRE, "").trim(); 2270 const keyContent = iteratorMatch[1].trim(); 2271 let keyOffset; 2272 if (keyContent) { 2273 keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); 2274 result.key = createAliasExpression(keyContent, keyOffset, true); 2275 } 2276 if (iteratorMatch[2]) { 2277 const indexContent = iteratorMatch[2].trim(); 2278 if (indexContent) { 2279 result.index = createAliasExpression( 2280 indexContent, 2281 exp.indexOf( 2282 indexContent, 2283 result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length 2284 ), 2285 true 2286 ); 2287 } 2288 } 2289 } 2290 if (valueContent) { 2291 result.value = createAliasExpression(valueContent, trimmedOffset, true); 2292 } 2293 return result; 2294} 2295function getSlice(start, end) { 2296 return currentInput.slice(start, end); 2297} 2298function endOpenTag(end) { 2299 if (tokenizer.inSFCRoot) { 2300 currentOpenTag.innerLoc = getLoc(end + 1, end + 1); 2301 } 2302 addNode(currentOpenTag); 2303 const { tag, ns } = currentOpenTag; 2304 if (ns === 0 && currentOptions.isPreTag(tag)) { 2305 inPre++; 2306 } 2307 if (currentOptions.isVoidTag(tag)) { 2308 onCloseTag(currentOpenTag, end); 2309 } else { 2310 stack.unshift(currentOpenTag); 2311 if (ns === 1 || ns === 2) { 2312 tokenizer.inXML = true; 2313 } 2314 } 2315 currentOpenTag = null; 2316} 2317function onText(content, start, end) { 2318 { 2319 const tag = stack[0] && stack[0].tag; 2320 if (tag !== "script" && tag !== "style" && content.includes("&")) { 2321 content = currentOptions.decodeEntities(content, false); 2322 } 2323 } 2324 const parent = stack[0] || currentRoot; 2325 const lastNode = parent.children[parent.children.length - 1]; 2326 if (lastNode && lastNode.type === 2) { 2327 lastNode.content += content; 2328 setLocEnd(lastNode.loc, end); 2329 } else { 2330 parent.children.push({ 2331 type: 2, 2332 content, 2333 loc: getLoc(start, end) 2334 }); 2335 } 2336} 2337function onCloseTag(el, end, isImplied = false) { 2338 if (isImplied) { 2339 setLocEnd(el.loc, backTrack(end, 60)); 2340 } else { 2341 setLocEnd(el.loc, lookAhead(end, 62) + 1); 2342 } 2343 if (tokenizer.inSFCRoot) { 2344 if (el.children.length) { 2345 el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); 2346 } else { 2347 el.innerLoc.end = extend({}, el.innerLoc.start); 2348 } 2349 el.innerLoc.source = getSlice( 2350 el.innerLoc.start.offset, 2351 el.innerLoc.end.offset 2352 ); 2353 } 2354 const { tag, ns, children } = el; 2355 if (!inVPre) { 2356 if (tag === "slot") { 2357 el.tagType = 2; 2358 } else if (isFragmentTemplate(el)) { 2359 el.tagType = 3; 2360 } else if (isComponent(el)) { 2361 el.tagType = 1; 2362 } 2363 } 2364 if (!tokenizer.inRCDATA) { 2365 el.children = condenseWhitespace(children); 2366 } 2367 if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) { 2368 const first = children[0]; 2369 if (first && first.type === 2) { 2370 first.content = first.content.replace(/^\r?\n/, ""); 2371 } 2372 } 2373 if (ns === 0 && currentOptions.isPreTag(tag)) { 2374 inPre--; 2375 } 2376 if (currentVPreBoundary === el) { 2377 inVPre = tokenizer.inVPre = false; 2378 currentVPreBoundary = null; 2379 } 2380 if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { 2381 tokenizer.inXML = false; 2382 } 2383 { 2384 const props = el.props; 2385 if (!tokenizer.inSFCRoot && isCompatEnabled( 2386 "COMPILER_NATIVE_TEMPLATE", 2387 currentOptions 2388 ) && el.tag === "template" && !isFragmentTemplate(el)) { 2389 const parent = stack[0] || currentRoot; 2390 const index = parent.children.indexOf(el); 2391 parent.children.splice(index, 1, ...el.children); 2392 } 2393 const inlineTemplateProp = props.find( 2394 (p) => p.type === 6 && p.name === "inline-template" 2395 ); 2396 if (inlineTemplateProp && checkCompatEnabled( 2397 "COMPILER_INLINE_TEMPLATE", 2398 currentOptions, 2399 inlineTemplateProp.loc 2400 ) && el.children.length) { 2401 inlineTemplateProp.value = { 2402 type: 2, 2403 content: getSlice( 2404 el.children[0].loc.start.offset, 2405 el.children[el.children.length - 1].loc.end.offset 2406 ), 2407 loc: inlineTemplateProp.loc 2408 }; 2409 } 2410 } 2411} 2412function lookAhead(index, c) { 2413 let i = index; 2414 while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++; 2415 return i; 2416} 2417function backTrack(index, c) { 2418 let i = index; 2419 while (currentInput.charCodeAt(i) !== c && i >= 0) i--; 2420 return i; 2421} 2422const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); 2423function isFragmentTemplate({ tag, props }) { 2424 if (tag === "template") { 2425 for (let i = 0; i < props.length; i++) { 2426 if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { 2427 return true; 2428 } 2429 } 2430 } 2431 return false;
vendor: 4,132 bytes, lines 2432-2581
2432} 2433function isComponent({ tag, props }) { 2434 if (currentOptions.isCustomElement(tag)) { 2435 return false; 2436 } 2437 if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { 2438 return true; 2439 } 2440 for (let i = 0; i < props.length; i++) { 2441 const p = props[i]; 2442 if (p.type === 6) { 2443 if (p.name === "is" && p.value) { 2444 if (p.value.content.startsWith("vue:")) { 2445 return true; 2446 } else if (checkCompatEnabled( 2447 "COMPILER_IS_ON_ELEMENT", 2448 currentOptions, 2449 p.loc 2450 )) { 2451 return true; 2452 } 2453 } 2454 } else if ( 2455 // :is on plain element - only treat as component in compat mode 2456 p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( 2457 "COMPILER_IS_ON_ELEMENT", 2458 currentOptions, 2459 p.loc 2460 ) 2461 ) { 2462 return true; 2463 } 2464 } 2465 return false; 2466} 2467function isUpperCase(c) { 2468 return c > 64 && c < 91; 2469} 2470const windowsNewlineRE = /\r\n/g; 2471function condenseWhitespace(nodes) { 2472 const shouldCondense = currentOptions.whitespace !== "preserve"; 2473 let removedWhitespace = false; 2474 for (let i = 0; i < nodes.length; i++) { 2475 const node = nodes[i]; 2476 if (node.type === 2) { 2477 if (!inPre) { 2478 if (isAllWhitespace(node.content)) { 2479 const prev = nodes[i - 1] && nodes[i - 1].type; 2480 const next = nodes[i + 1] && nodes[i + 1].type; 2481 if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { 2482 removedWhitespace = true; 2483 nodes[i] = null; 2484 } else { 2485 node.content = " "; 2486 } 2487 } else if (shouldCondense) { 2488 node.content = condense(node.content); 2489 } 2490 } else { 2491 node.content = node.content.replace(windowsNewlineRE, "\n"); 2492 } 2493 } 2494 } 2495 return removedWhitespace ? nodes.filter(Boolean) : nodes; 2496} 2497function hasNewlineChar(str) { 2498 for (let i = 0; i < str.length; i++) { 2499 const c = str.charCodeAt(i); 2500 if (c === 10 || c === 13) { 2501 return true; 2502 } 2503 } 2504 return false; 2505} 2506function condense(str) { 2507 let ret = ""; 2508 let prevCharIsWhitespace = false; 2509 for (let i = 0; i < str.length; i++) { 2510 if (isWhitespace(str.charCodeAt(i))) { 2511 if (!prevCharIsWhitespace) { 2512 ret += " "; 2513 prevCharIsWhitespace = true; 2514 } 2515 } else { 2516 ret += str[i]; 2517 prevCharIsWhitespace = false; 2518 } 2519 } 2520 return ret; 2521} 2522function addNode(node) { 2523 (stack[0] || currentRoot).children.push(node); 2524} 2525function getLoc(start, end) { 2526 return { 2527 start: tokenizer.getPos(start), 2528 // @ts-expect-error allow late attachment 2529 end: end == null ? end : tokenizer.getPos(end), 2530 // @ts-expect-error allow late attachment 2531 source: end == null ? end : getSlice(start, end) 2532 }; 2533} 2534function cloneLoc(loc) { 2535 return getLoc(loc.start.offset, loc.end.offset); 2536} 2537function setLocEnd(loc, end) { 2538 loc.end = tokenizer.getPos(end); 2539 loc.source = getSlice(loc.start.offset, end); 2540} 2541function dirToAttr(dir) { 2542 const attr = { 2543 type: 6, 2544 name: dir.rawName, 2545 nameLoc: getLoc( 2546 dir.loc.start.offset, 2547 dir.loc.start.offset + dir.rawName.length 2548 ), 2549 value: void 0, 2550 loc: dir.loc 2551 }; 2552 if (dir.exp) { 2553 const loc = dir.exp.loc; 2554 if (loc.end.offset < dir.loc.end.offset) { 2555 loc.start.offset--; 2556 loc.start.column--; 2557 loc.end.offset++; 2558 loc.end.column++; 2559 } 2560 attr.value = { 2561 type: 2, 2562 content: dir.exp.content, 2563 loc 2564 }; 2565 } 2566 return attr; 2567} 2568function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0) { 2569 const exp = createSimpleExpression(content, isStatic, loc, constType); 2570 return exp; 2571} 2572function emitError(code, index, message) { 2573 currentOptions.onError( 2574 createCompilerError(code, getLoc(index, index)) 2575 ); 2576} 2577function reset() { 2578 tokenizer.reset(); 2579 currentOpenTag = null; 2580 currentProp = null; 2581 currentAttrValue = "";
vendor: 3,048 bytes, lines 2582-2672
2582 currentAttrStartIndex = -1; 2583 currentAttrEndIndex = -1; 2584 stack.length = 0; 2585} 2586function baseParse(input, options) { 2587 reset(); 2588 currentInput = input; 2589 currentOptions = extend({}, defaultParserOptions); 2590 if (options) { 2591 let key; 2592 for (key in options) { 2593 if (options[key] != null) { 2594 currentOptions[key] = options[key]; 2595 } 2596 } 2597 } 2598 tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; 2599 tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; 2600 const delimiters = options && options.delimiters; 2601 if (delimiters) { 2602 tokenizer.delimiterOpen = toCharCodes(delimiters[0]); 2603 tokenizer.delimiterClose = toCharCodes(delimiters[1]); 2604 } 2605 const root = currentRoot = createRoot([], input); 2606 tokenizer.parse(currentInput); 2607 root.loc = getLoc(0, input.length); 2608 root.children = condenseWhitespace(root.children); 2609 currentRoot = null; 2610 return root; 2611} 2612function cacheStatic(root, context) { 2613 walk( 2614 root, 2615 void 0, 2616 context, 2617 // Root node is unfortunately non-hoistable due to potential parent 2618 // fallthrough attributes. 2619 !!getSingleElementRoot(root) 2620 ); 2621} 2622function getSingleElementRoot(root) { 2623 const children = root.children.filter((x) => x.type !== 3); 2624 return children.length === 1 && children[0].type === 1 && !isSlotOutlet(children[0]) ? children[0] : null; 2625} 2626function walk(node, parent, context, doNotHoistNode = false, inFor = false) { 2627 const { children } = node; 2628 const toCache = []; 2629 for (let i = 0; i < children.length; i++) { 2630 const child = children[i]; 2631 if (child.type === 1 && child.tagType === 0) { 2632 const constantType = doNotHoistNode ? 0 : getConstantType(child, context); 2633 if (constantType > 0) { 2634 if (constantType >= 2) { 2635 child.codegenNode.patchFlag = -1; 2636 toCache.push(child); 2637 continue; 2638 } 2639 } else { 2640 const codegenNode = child.codegenNode; 2641 if (codegenNode.type === 13) { 2642 const flag = codegenNode.patchFlag; 2643 if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { 2644 const props = getNodeProps(child); 2645 if (props) { 2646 codegenNode.props = context.hoist(props); 2647 } 2648 } 2649 if (codegenNode.dynamicProps) { 2650 codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); 2651 } 2652 } 2653 } 2654 } else if (child.type === 12) { 2655 const constantType = doNotHoistNode ? 0 : getConstantType(child, context); 2656 if (constantType >= 2) { 2657 if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) { 2658 child.codegenNode.arguments.push( 2659 `-1` 2660 ); 2661 } 2662 toCache.push(child); 2663 continue; 2664 } 2665 } 2666 if (child.type === 1) { 2667 const isComponent2 = child.tagType === 1; 2668 if (isComponent2) { 2669 context.scopes.vSlot++; 2670 } 2671 walk(child, node, context, false, inFor); 2672 if (isComponent2
vendor: 7,101 bytes, lines 2672-2898
2672) { 2673 context.scopes.vSlot--; 2674 } 2675 } else if (child.type === 11) { 2676 walk(child, node, context, child.children.length === 1, true); 2677 } else if (child.type === 9) { 2678 for (let i2 = 0; i2 < child.branches.length; i2++) { 2679 walk( 2680 child.branches[i2], 2681 node, 2682 context, 2683 child.branches[i2].children.length === 1, 2684 inFor 2685 ); 2686 } 2687 } 2688 } 2689 let cachedAsArray = false; 2690 if (toCache.length === children.length && node.type === 1) { 2691 if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { 2692 node.codegenNode.children = getCacheExpression( 2693 createArrayExpression(node.codegenNode.children) 2694 ); 2695 cachedAsArray = true; 2696 } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) { 2697 const slot = getSlotNode(node.codegenNode, "default"); 2698 if (slot) { 2699 slot.returns = getCacheExpression( 2700 createArrayExpression(slot.returns) 2701 ); 2702 cachedAsArray = true; 2703 } 2704 } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) { 2705 const slotName = findDir(node, "slot", true); 2706 const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg); 2707 if (slot) { 2708 slot.returns = getCacheExpression( 2709 createArrayExpression(slot.returns) 2710 ); 2711 cachedAsArray = true; 2712 } 2713 } 2714 } 2715 if (!cachedAsArray) { 2716 for (const child of toCache) { 2717 child.codegenNode = context.cache(child.codegenNode); 2718 } 2719 } 2720 function getCacheExpression(value) { 2721 const exp = context.cache(value); 2722 exp.needArraySpread = true; 2723 return exp; 2724 } 2725 function getSlotNode(node2, name) { 2726 if (node2.children && !isArray(node2.children) && node2.children.type === 15) { 2727 const slot = node2.children.properties.find( 2728 (p) => p.key === name || p.key.content === name 2729 ); 2730 return slot && slot.value; 2731 } 2732 } 2733 if (toCache.length && context.transformHoist) { 2734 context.transformHoist(children, context, node); 2735 } 2736} 2737function getConstantType(node, context) { 2738 const { constantCache } = context; 2739 switch (node.type) { 2740 case 1: 2741 if (node.tagType !== 0) { 2742 return 0; 2743 } 2744 const cached = constantCache.get(node); 2745 if (cached !== void 0) { 2746 return cached; 2747 } 2748 const codegenNode = node.codegenNode; 2749 if (codegenNode.type !== 13) { 2750 return 0; 2751 } 2752 if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject" && node.tag !== "math") { 2753 return 0; 2754 } 2755 if (codegenNode.patchFlag === void 0) { 2756 let returnType2 = 3; 2757 const generatedPropsType = getGeneratedPropsConstantType(node, context); 2758 if (generatedPropsType === 0) { 2759 constantCache.set(node, 0); 2760 return 0; 2761 } 2762 if (generatedPropsType < returnType2) { 2763 returnType2 = generatedPropsType; 2764 } 2765 for (let i = 0; i < node.children.length; i++) { 2766 const childType = getConstantType(node.children[i], context); 2767 if (childType === 0) { 2768 constantCache.set(node, 0); 2769 return 0; 2770 } 2771 if (childType < returnType2) { 2772 returnType2 = childType; 2773 } 2774 } 2775 if (returnType2 > 1) { 2776 for (let i = 0; i < node.props.length; i++) { 2777 const p = node.props[i]; 2778 if (p.type === 7 && p.name === "bind" && p.exp) { 2779 const expType = getConstantType(p.exp, context); 2780 if (expType === 0) { 2781 constantCache.set(node, 0); 2782 return 0; 2783 } 2784 if (expType < returnType2) { 2785 returnType2 = expType; 2786 } 2787 } 2788 } 2789 } 2790 if (codegenNode.isBlock) { 2791 for (let i = 0; i < node.props.length; i++) { 2792 const p = node.props[i]; 2793 if (p.type === 7) { 2794 constantCache.set(node, 0); 2795 return 0; 2796 } 2797 } 2798 context.removeHelper(OPEN_BLOCK); 2799 context.removeHelper( 2800 getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) 2801 ); 2802 codegenNode.isBlock = false; 2803 context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); 2804 } 2805 constantCache.set(node, returnType2); 2806 return returnType2; 2807 } else { 2808 constantCache.set(node, 0); 2809 return 0; 2810 } 2811 case 2: 2812 case 3: 2813 return 3; 2814 case 9: 2815 case 11: 2816 case 10: 2817 return 0; 2818 case 5: 2819 case 12: 2820 return getConstantType(node.content, context); 2821 case 4: 2822 return node.constType; 2823 case 8: 2824 let returnType = 3; 2825 for (let i = 0; i < node.children.length; i++) { 2826 const child = node.children[i]; 2827 if (isString(child) || isSymbol(child)) { 2828 continue; 2829 } 2830 const childType = getConstantType(child, context); 2831 if (childType === 0) { 2832 return 0; 2833 } else if (childType < returnType) { 2834 returnType = childType; 2835 } 2836 } 2837 return returnType; 2838 case 20: 2839 return 2; 2840 default: 2841 return 0; 2842 } 2843} 2844const allowHoistedHelperSet = /* @__PURE__ */ new Set([ 2845 NORMALIZE_CLASS, 2846 NORMALIZE_STYLE, 2847 NORMALIZE_PROPS, 2848 GUARD_REACTIVE_PROPS 2849]); 2850function getConstantTypeOfHelperCall(value, context) { 2851 if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { 2852 const arg = value.arguments[0]; 2853 if (arg.type === 4) { 2854 return getConstantType(arg, context); 2855 } else if (arg.type === 14) { 2856 return getConstantTypeOfHelperCall(arg, context); 2857 } 2858 } 2859 return 0; 2860} 2861function getGeneratedPropsConstantType(node, context) { 2862 let returnType = 3; 2863 const props = getNodeProps(node); 2864 if (props && props.type === 15) { 2865 const { properties } = props; 2866 for (let i = 0; i < properties.length; i++) { 2867 const { key, value } = properties[i]; 2868 const keyType = getConstantType(key, context); 2869 if (keyType === 0) { 2870 return keyType; 2871 } 2872 if (keyType < returnType) { 2873 returnType = keyType; 2874 } 2875 let valueType; 2876 if (value.type === 4) { 2877 valueType = getConstantType(value, context); 2878 } else if (value.type === 14) { 2879 valueType = getConstantTypeOfHelperCall(value, context); 2880 } else { 2881 valueType = 0; 2882 } 2883 if (valueType === 0) { 2884 return valueType; 2885 } 2886 if (valueType < returnType) { 2887 returnType = valueType; 2888 } 2889 } 2890 } 2891 return returnType; 2892} 2893function getNodeProps(node) { 2894 const codegenNode = node.codegenNode; 2895 if (codegenNode.type === 13) { 2896 return codegenNode.props; 2897 } 2898}
vendor: 8,679 bytes, lines 2899-3255
2899function createTransformContext(root, { 2900 filename = "", 2901 prefixIdentifiers = false, 2902 hoistStatic = false, 2903 hmr = false, 2904 cacheHandlers = false, 2905 nodeTransforms = [], 2906 directiveTransforms = {}, 2907 transformHoist = null, 2908 isBuiltInComponent = NOOP, 2909 isCustomElement = NOOP, 2910 expressionPlugins = [], 2911 scopeId = null, 2912 slotted = true, 2913 ssr = false, 2914 inSSR = false, 2915 ssrCssVars = ``, 2916 bindingMetadata = EMPTY_OBJ, 2917 inline = false, 2918 isTS = false, 2919 onError = defaultOnError, 2920 onWarn = defaultOnWarn, 2921 compatConfig 2922}) { 2923 const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); 2924 const context = { 2925 // options 2926 filename, 2927 selfName: nameMatch && capitalize(camelize(nameMatch[1])), 2928 prefixIdentifiers, 2929 hoistStatic, 2930 hmr, 2931 cacheHandlers, 2932 nodeTransforms, 2933 directiveTransforms, 2934 transformHoist, 2935 isBuiltInComponent, 2936 isCustomElement, 2937 expressionPlugins, 2938 scopeId, 2939 slotted, 2940 ssr, 2941 inSSR, 2942 ssrCssVars, 2943 bindingMetadata, 2944 inline, 2945 isTS, 2946 onError, 2947 onWarn, 2948 compatConfig, 2949 // state 2950 root, 2951 helpers: /* @__PURE__ */ new Map(), 2952 components: /* @__PURE__ */ new Set(), 2953 directives: /* @__PURE__ */ new Set(), 2954 hoists: [], 2955 imports: [], 2956 cached: [], 2957 constantCache: /* @__PURE__ */ new WeakMap(), 2958 temps: 0, 2959 identifiers: /* @__PURE__ */ Object.create(null), 2960 scopes: { 2961 vFor: 0, 2962 vSlot: 0, 2963 vPre: 0, 2964 vOnce: 0 2965 }, 2966 parent: null, 2967 grandParent: null, 2968 currentNode: root, 2969 childIndex: 0, 2970 inVOnce: false, 2971 // methods 2972 helper(name) { 2973 const count = context.helpers.get(name) || 0; 2974 context.helpers.set(name, count + 1); 2975 return name; 2976 }, 2977 removeHelper(name) { 2978 const count = context.helpers.get(name); 2979 if (count) { 2980 const currentCount = count - 1; 2981 if (!currentCount) { 2982 context.helpers.delete(name); 2983 } else { 2984 context.helpers.set(name, currentCount); 2985 } 2986 } 2987 }, 2988 helperString(name) { 2989 return `_${helperNameMap[context.helper(name)]}`; 2990 }, 2991 replaceNode(node) { 2992 context.parent.children[context.childIndex] = context.currentNode = node; 2993 }, 2994 removeNode(node) { 2995 const list = context.parent.children; 2996 const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; 2997 if (!node || node === context.currentNode) { 2998 context.currentNode = null; 2999 context.onNodeRemoved(); 3000 } else { 3001 if (context.childIndex > removalIndex) { 3002 context.childIndex--; 3003 context.onNodeRemoved(); 3004 } 3005 } 3006 context.parent.children.splice(removalIndex, 1); 3007 }, 3008 onNodeRemoved: NOOP, 3009 addIdentifiers(exp) { 3010 }, 3011 removeIdentifiers(exp) { 3012 }, 3013 hoist(exp) { 3014 if (isString(exp)) exp = createSimpleExpression(exp); 3015 context.hoists.push(exp); 3016 const identifier = createSimpleExpression( 3017 `_hoisted_${context.hoists.length}`, 3018 false, 3019 exp.loc, 3020 2 3021 ); 3022 identifier.hoisted = exp; 3023 return identifier; 3024 }, 3025 cache(exp, isVNode = false, inVOnce = false) { 3026 const cacheExp = createCacheExpression( 3027 context.cached.length, 3028 exp, 3029 isVNode, 3030 inVOnce 3031 ); 3032 context.cached.push(cacheExp); 3033 return cacheExp; 3034 } 3035 }; 3036 { 3037 context.filters = /* @__PURE__ */ new Set(); 3038 } 3039 return context; 3040} 3041function transform(root, options) { 3042 const context = createTransformContext(root, options); 3043 traverseNode(root, context); 3044 if (options.hoistStatic) { 3045 cacheStatic(root, context); 3046 } 3047 if (!options.ssr) { 3048 createRootCodegen(root, context); 3049 } 3050 root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); 3051 root.components = [...context.components]; 3052 root.directives = [...context.directives]; 3053 root.imports = context.imports; 3054 root.hoists = context.hoists; 3055 root.temps = context.temps; 3056 root.cached = context.cached; 3057 root.transformed = true; 3058 { 3059 root.filters = [...context.filters]; 3060 } 3061} 3062function createRootCodegen(root, context) { 3063 const { helper } = context; 3064 const { children } = root; 3065 if (children.length === 1) { 3066 const singleElementRootChild = getSingleElementRoot(root); 3067 if (singleElementRootChild && singleElementRootChild.codegenNode) { 3068 const codegenNode = singleElementRootChild.codegenNode; 3069 if (codegenNode.type === 13) { 3070 convertToBlock(codegenNode, context); 3071 } 3072 root.codegenNode = codegenNode; 3073 } else { 3074 root.codegenNode = children[0]; 3075 } 3076 } else if (children.length > 1) { 3077 let patchFlag = 64; 3078 root.codegenNode = createVNodeCall( 3079 context, 3080 helper(FRAGMENT), 3081 void 0, 3082 root.children, 3083 patchFlag, 3084 void 0, 3085 void 0, 3086 true, 3087 void 0, 3088 false 3089 ); 3090 } else ; 3091} 3092function traverseChildren(parent, context) { 3093 let i = 0; 3094 const nodeRemoved = () => { 3095 i--; 3096 }; 3097 for (; i < parent.children.length; i++) { 3098 const child = parent.children[i]; 3099 if (isString(child)) continue; 3100 context.grandParent = context.parent; 3101 context.parent = parent; 3102 context.childIndex = i; 3103 context.onNodeRemoved = nodeRemoved; 3104 traverseNode(child, context); 3105 } 3106} 3107function traverseNode(node, context) { 3108 context.currentNode = node; 3109 const { nodeTransforms } = context; 3110 const exitFns = []; 3111 for (let i2 = 0; i2 < nodeTransforms.length; i2++) { 3112 const onExit = nodeTransforms[i2](node, context); 3113 if (onExit) { 3114 if (isArray(onExit)) { 3115 exitFns.push(...onExit); 3116 } else { 3117 exitFns.push(onExit); 3118 } 3119 } 3120 if (!context.currentNode) { 3121 return; 3122 } else { 3123 node = context.currentNode; 3124 } 3125 } 3126 switch (node.type) { 3127 case 3: 3128 if (!context.ssr) { 3129 context.helper(CREATE_COMMENT); 3130 } 3131 break; 3132 case 5: 3133 if (!context.ssr) { 3134 context.helper(TO_DISPLAY_STRING); 3135 } 3136 break; 3137 // for container types, further traverse downwards 3138 case 9: 3139 for (let i2 = 0; i2 < node.branches.length; i2++) { 3140 traverseNode(node.branches[i2], context); 3141 } 3142 break; 3143 case 10: 3144 case 11: 3145 case 1: 3146 case 0: 3147 traverseChildren(node, context); 3148 break; 3149 } 3150 context.currentNode = node; 3151 let i = exitFns.length; 3152 while (i--) { 3153 exitFns[i](); 3154 } 3155} 3156function createStructuralDirectiveTransform(name, fn) { 3157 const matches = isString(name) ? (n) => n === name : (n) => name.test(n); 3158 return (node, context) => { 3159 if (node.type === 1) { 3160 const { props } = node; 3161 if (node.tagType === 3 && props.some(isVSlot)) { 3162 return; 3163 } 3164 const exitFns = []; 3165 for (let i = 0; i < props.length; i++) { 3166 const prop = props[i]; 3167 if (prop.type === 7 && matches(prop.name)) { 3168 props.splice(i, 1); 3169 i--; 3170 const onExit = fn(node, prop, context); 3171 if (onExit) exitFns.push(onExit); 3172 } 3173 } 3174 return exitFns; 3175 } 3176 }; 3177} 3178const PURE_ANNOTATION = `/*@__PURE__*/`; 3179const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; 3180function createCodegenContext(ast, { 3181 mode = "function", 3182 prefixIdentifiers = mode === "module", 3183 sourceMap = false, 3184 filename = `template.vue.html`, 3185 scopeId = null, 3186 optimizeImports = false, 3187 runtimeGlobalName = `Vue`, 3188 runtimeModuleName = `vue`, 3189 ssrRuntimeModuleName = "vue/server-renderer", 3190 ssr = false, 3191 isTS = false, 3192 inSSR = false 3193}) { 3194 const context = { 3195 mode, 3196 prefixIdentifiers, 3197 sourceMap, 3198 filename, 3199 scopeId, 3200 optimizeImports, 3201 runtimeGlobalName, 3202 runtimeModuleName, 3203 ssrRuntimeModuleName, 3204 ssr, 3205 isTS, 3206 inSSR, 3207 source: ast.source, 3208 code: ``, 3209 column: 1, 3210 line: 1, 3211 offset: 0, 3212 indentLevel: 0, 3213 pure: false, 3214 map: void 0, 3215 helper(key) { 3216 return `_${helperNameMap[key]}`; 3217 }, 3218 push(code, newlineIndex = -2, node) { 3219 context.code += code; 3220 }, 3221 indent() { 3222 newline(++context.indentLevel); 3223 }, 3224 deindent(withoutNewLine = false) { 3225 if (withoutNewLine) { 3226 --context.indentLevel; 3227 } else { 3228 newline(--context.indentLevel); 3229 } 3230 }, 3231 newline() { 3232 newline(context.indentLevel); 3233 } 3234 }; 3235 function newline(n) { 3236 context.push( 3237 "\n" + ` `.repeat(n), 3238 0 3239 /* Start */ 3240 ); 3241 } 3242 return context; 3243} 3244function generate(ast, options = {}) { 3245 const context = createCodegenContext(ast, options); 3246 if (options.onContextCreated) options.onContextCreated(context); 3247 const { 3248 mode, 3249 push, 3250 prefixIdentifiers, 3251 indent, 3252 deindent, 3253 newline, 3254 scopeId, 3255 ssr
vendor: 6,406 bytes, lines 3256-3536
3256 } = context; 3257 const helpers = Array.from(ast.helpers); 3258 const hasHelpers = helpers.length > 0; 3259 const useWithBlock = !prefixIdentifiers && mode !== "module"; 3260 const preambleContext = context; 3261 { 3262 genFunctionPreamble(ast, preambleContext); 3263 } 3264 const functionName = ssr ? `ssrRender` : `render`; 3265 const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; 3266 const signature = args.join(", "); 3267 { 3268 push(`function ${functionName}(${signature}) {`); 3269 } 3270 indent(); 3271 if (useWithBlock) { 3272 push(`with (_ctx) {`); 3273 indent(); 3274 if (hasHelpers) { 3275 push( 3276 `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue 3277`, 3278 -1 3279 /* End */ 3280 ); 3281 newline(); 3282 } 3283 } 3284 if (ast.components.length) { 3285 genAssets(ast.components, "component", context); 3286 if (ast.directives.length || ast.temps > 0) { 3287 newline(); 3288 } 3289 } 3290 if (ast.directives.length) { 3291 genAssets(ast.directives, "directive", context); 3292 if (ast.temps > 0) { 3293 newline(); 3294 } 3295 } 3296 if (ast.filters && ast.filters.length) { 3297 newline(); 3298 genAssets(ast.filters, "filter", context); 3299 newline(); 3300 } 3301 if (ast.temps > 0) { 3302 push(`let `); 3303 for (let i = 0; i < ast.temps; i++) { 3304 push(`${i > 0 ? `, ` : ``}_temp${i}`); 3305 } 3306 } 3307 if (ast.components.length || ast.directives.length || ast.temps) { 3308 push( 3309 ` 3310`, 3311 0 3312 /* Start */ 3313 ); 3314 newline(); 3315 } 3316 if (!ssr) { 3317 push(`return `); 3318 } 3319 if (ast.codegenNode) { 3320 genNode(ast.codegenNode, context); 3321 } else { 3322 push(`null`); 3323 } 3324 if (useWithBlock) { 3325 deindent(); 3326 push(`}`); 3327 } 3328 deindent(); 3329 push(`}`); 3330 return { 3331 ast, 3332 code: context.code, 3333 preamble: ``, 3334 map: context.map ? context.map.toJSON() : void 0 3335 }; 3336} 3337function genFunctionPreamble(ast, context) { 3338 const { 3339 ssr, 3340 prefixIdentifiers, 3341 push, 3342 newline, 3343 runtimeModuleName, 3344 runtimeGlobalName, 3345 ssrRuntimeModuleName 3346 } = context; 3347 const VueBinding = runtimeGlobalName; 3348 const helpers = Array.from(ast.helpers); 3349 if (helpers.length > 0) { 3350 { 3351 push( 3352 `const _Vue = ${VueBinding} 3353`, 3354 -1 3355 /* End */ 3356 ); 3357 if (ast.hoists.length) { 3358 const staticHelpers = [ 3359 CREATE_VNODE, 3360 CREATE_ELEMENT_VNODE, 3361 CREATE_COMMENT, 3362 CREATE_TEXT, 3363 CREATE_STATIC 3364 ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); 3365 push( 3366 `const { ${staticHelpers} } = _Vue 3367`, 3368 -1 3369 /* End */ 3370 ); 3371 } 3372 } 3373 } 3374 genHoists(ast.hoists, context); 3375 newline(); 3376 push(`return `); 3377} 3378function genAssets(assets, type, { helper, push, newline, isTS }) { 3379 const resolver = helper( 3380 type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE 3381 ); 3382 for (let i = 0; i < assets.length; i++) { 3383 let id = assets[i]; 3384 const maybeSelfReference = id.endsWith("__self"); 3385 if (maybeSelfReference) { 3386 id = id.slice(0, -6); 3387 } 3388 push( 3389 `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` 3390 ); 3391 if (i < assets.length - 1) { 3392 newline(); 3393 } 3394 } 3395} 3396function genHoists(hoists, context) { 3397 if (!hoists.length) { 3398 return; 3399 } 3400 context.pure = true; 3401 const { push, newline } = context; 3402 newline(); 3403 for (let i = 0; i < hoists.length; i++) { 3404 const exp = hoists[i]; 3405 if (exp) { 3406 push(`const _hoisted_${i + 1} = `); 3407 genNode(exp, context); 3408 newline(); 3409 } 3410 } 3411 context.pure = false; 3412} 3413function genNodeListAsArray(nodes, context) { 3414 const multilines = nodes.length > 3 || false; 3415 context.push(`[`); 3416 multilines && context.indent(); 3417 genNodeList(nodes, context, multilines); 3418 multilines && context.deindent(); 3419 context.push(`]`); 3420} 3421function genNodeList(nodes, context, multilines = false, comma = true) { 3422 const { push, newline } = context; 3423 for (let i = 0; i < nodes.length; i++) { 3424 const node = nodes[i]; 3425 if (isString(node)) { 3426 push( 3427 node, 3428 -3 3429 /* Unknown */ 3430 ); 3431 } else if (isArray(node)) { 3432 genNodeListAsArray(node, context); 3433 } else { 3434 genNode(node, context); 3435 } 3436 if (i < nodes.length - 1) { 3437 if (multilines) { 3438 comma && push(","); 3439 newline(); 3440 } else { 3441 comma && push(", "); 3442 } 3443 } 3444 } 3445} 3446function genNode(node, context) { 3447 if (isString(node)) { 3448 context.push( 3449 node, 3450 -3 3451 /* Unknown */ 3452 ); 3453 return; 3454 } 3455 if (isSymbol(node)) { 3456 context.push(context.helper(node)); 3457 return; 3458 } 3459 switch (node.type) { 3460 case 1: 3461 case 9: 3462 case 11: 3463 genNode(node.codegenNode, context); 3464 break; 3465 case 2: 3466 genText(node, context); 3467 break; 3468 case 4: 3469 genExpression(node, context); 3470 break; 3471 case 5: 3472 genInterpolation(node, context); 3473 break; 3474 case 12: 3475 genNode(node.codegenNode, context); 3476 break; 3477 case 8: 3478 genCompoundExpression(node, context); 3479 break; 3480 case 3: 3481 genComment(node, context); 3482 break; 3483 case 13: 3484 genVNodeCall(node, context); 3485 break; 3486 case 14: 3487 genCallExpression(node, context); 3488 break; 3489 case 15: 3490 genObjectExpression(node, context); 3491 break; 3492 case 17: 3493 genArrayExpression(node, context); 3494 break; 3495 case 18: 3496 genFunctionExpression(node, context); 3497 break; 3498 case 19: 3499 genConditionalExpression(node, context); 3500 break; 3501 case 20: 3502 genCacheExpression(node, context); 3503 break; 3504 case 21: 3505 genNodeList(node.body, context, true, false); 3506 break; 3507 } 3508} 3509function genText(node, context) { 3510 context.push(JSON.stringify(node.content), -3, node); 3511} 3512function genExpression(node, context) { 3513 const { content, isStatic } = node; 3514 context.push( 3515 isStatic ? JSON.stringify(content) : content, 3516 -3, 3517 node 3518 ); 3519} 3520function genInterpolation(node, context) { 3521 const { push, helper, pure } = context; 3522 if (pure) push(PURE_ANNOTATION); 3523 push(`${helper(TO_DISPLAY_STRING)}(`); 3524 genNode(node.content, context); 3525 push(`)`); 3526} 3527function genCompoundExpression(node, context) { 3528 for (let i = 0; i < node.children.length; i++) { 3529 const child = node.children[i]; 3530 if (isString(child)) { 3531 context.push( 3532 child, 3533 -3 3534 /* Unknown */ 3535 ); 3536 } else {
vendor: 4,115 bytes, lines 3537-3705
3537 genNode(child, context); 3538 } 3539 } 3540} 3541function genExpressionAsPropertyKey(node, context) { 3542 const { push } = context; 3543 if (node.type === 8) { 3544 push(`[`); 3545 genCompoundExpression(node, context); 3546 push(`]`); 3547 } else if (node.isStatic) { 3548 const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); 3549 push(text, -2, node); 3550 } else { 3551 push(`[${node.content}]`, -3, node); 3552 } 3553} 3554function genComment(node, context) { 3555 const { push, helper, pure } = context; 3556 if (pure) { 3557 push(PURE_ANNOTATION); 3558 } 3559 push( 3560 `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, 3561 -3, 3562 node 3563 ); 3564} 3565function genVNodeCall(node, context) { 3566 const { push, helper, pure } = context; 3567 const { 3568 tag, 3569 props, 3570 children, 3571 patchFlag, 3572 dynamicProps, 3573 directives, 3574 isBlock, 3575 disableTracking, 3576 isComponent: isComponent2 3577 } = node; 3578 let patchFlagString; 3579 if (patchFlag) { 3580 { 3581 patchFlagString = String(patchFlag); 3582 } 3583 } 3584 if (directives) { 3585 push(helper(WITH_DIRECTIVES) + `(`); 3586 } 3587 if (isBlock) { 3588 push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); 3589 } 3590 if (pure) { 3591 push(PURE_ANNOTATION); 3592 } 3593 const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent2) : getVNodeHelper(context.inSSR, isComponent2); 3594 push(helper(callHelper) + `(`, -2, node); 3595 genNodeList( 3596 genNullableArgs([tag, props, children, patchFlagString, dynamicProps]), 3597 context 3598 ); 3599 push(`)`); 3600 if (isBlock) { 3601 push(`)`); 3602 } 3603 if (directives) { 3604 push(`, `); 3605 genNode(directives, context); 3606 push(`)`); 3607 } 3608} 3609function genNullableArgs(args) { 3610 let i = args.length; 3611 while (i--) { 3612 if (args[i] != null) break; 3613 } 3614 return args.slice(0, i + 1).map((arg) => arg || `null`); 3615} 3616function genCallExpression(node, context) { 3617 const { push, helper, pure } = context; 3618 const callee = isString(node.callee) ? node.callee : helper(node.callee); 3619 if (pure) { 3620 push(PURE_ANNOTATION); 3621 } 3622 push(callee + `(`, -2, node); 3623 genNodeList(node.arguments, context); 3624 push(`)`); 3625} 3626function genObjectExpression(node, context) { 3627 const { push, indent, deindent, newline } = context; 3628 const { properties } = node; 3629 if (!properties.length) { 3630 push(`{}`, -2, node); 3631 return; 3632 } 3633 const multilines = properties.length > 1 || false; 3634 push(multilines ? `{` : `{ `); 3635 multilines && indent(); 3636 for (let i = 0; i < properties.length; i++) { 3637 const { key, value } = properties[i]; 3638 genExpressionAsPropertyKey(key, context); 3639 push(`: `); 3640 genNode(value, context); 3641 if (i < properties.length - 1) { 3642 push(`,`); 3643 newline(); 3644 } 3645 } 3646 multilines && deindent(); 3647 push(multilines ? `}` : ` }`); 3648} 3649function genArrayExpression(node, context) { 3650 genNodeListAsArray(node.elements, context); 3651} 3652function genFunctionExpression(node, context) { 3653 const { push, indent, deindent } = context; 3654 const { params, returns, body, newline, isSlot } = node; 3655 if (isSlot) { 3656 push(`_${helperNameMap[WITH_CTX]}(`); 3657 } 3658 push(`(`, -2, node); 3659 if (isArray(params)) { 3660 genNodeList(params, context); 3661 } else if (params) { 3662 genNode(params, context); 3663 } 3664 push(`) => `); 3665 if (newline || body) { 3666 push(`{`); 3667 indent(); 3668 } 3669 if (returns) { 3670 if (newline) { 3671 push(`return `); 3672 } 3673 if (isArray(returns)) { 3674 genNodeListAsArray(returns, context); 3675 } else { 3676 genNode(returns, context); 3677 } 3678 } else if (body) { 3679 genNode(body, context); 3680 } 3681 if (newline || body) { 3682 deindent(); 3683 push(`}`); 3684 } 3685 if (isSlot) { 3686 if (node.isNonScopedSlot) { 3687 push(`, undefined, true`); 3688 } 3689 push(`)`); 3690 } 3691} 3692function genConditionalExpression(node, context) { 3693 const { test, consequent, alternate, newline: needNewline } = node; 3694 const { push, indent, deindent, newline } = context; 3695 if (test.type === 4) { 3696 const needsParens = !isSimpleIdentifier(test.content); 3697 needsParens && push(`(`); 3698 genExpression(test, context); 3699 needsParens && push(`)`); 3700 } else { 3701 push(`(`); 3702 genNode(test, context); 3703 push(`)`); 3704 } 3705 needNewline && indent();
vendor: 5,011 bytes, lines 3706-3872
3706 context.indentLevel++; 3707 needNewline || push(` `); 3708 push(`? `); 3709 genNode(consequent, context); 3710 context.indentLevel--; 3711 needNewline && newline(); 3712 needNewline || push(` `); 3713 push(`: `); 3714 const isNested = alternate.type === 19; 3715 if (!isNested) { 3716 context.indentLevel++; 3717 } 3718 genNode(alternate, context); 3719 if (!isNested) { 3720 context.indentLevel--; 3721 } 3722 needNewline && deindent( 3723 true 3724 /* without newline */ 3725 ); 3726} 3727function genCacheExpression(node, context) { 3728 const { push, helper, indent, deindent, newline } = context; 3729 const { needPauseTracking, needArraySpread } = node; 3730 if (needArraySpread) { 3731 push(`[...(`); 3732 } 3733 push(`_cache[${node.index}] || (`); 3734 if (needPauseTracking) { 3735 indent(); 3736 push(`${helper(SET_BLOCK_TRACKING)}(-1`); 3737 if (node.inVOnce) push(`, true`); 3738 push(`),`); 3739 newline(); 3740 push(`(`); 3741 } 3742 push(`_cache[${node.index}] = `); 3743 genNode(node.value, context); 3744 if (needPauseTracking) { 3745 push(`).cacheIndex = ${node.index},`); 3746 newline(); 3747 push(`${helper(SET_BLOCK_TRACKING)}(1),`); 3748 newline(); 3749 push(`_cache[${node.index}]`); 3750 deindent(); 3751 } 3752 push(`)`); 3753 if (needArraySpread) { 3754 push(`)]`); 3755 } 3756} 3757new RegExp( 3758 "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" 3759); 3760const transformExpression = (node, context) => { 3761 if (node.type === 5) { 3762 node.content = processExpression( 3763 node.content, 3764 context 3765 ); 3766 } else if (node.type === 1) { 3767 const memo = findDir(node, "memo"); 3768 for (let i = 0; i < node.props.length; i++) { 3769 const dir = node.props[i]; 3770 if (dir.type === 7 && dir.name !== "for") { 3771 const exp = dir.exp; 3772 const arg = dir.arg; 3773 if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor) 3774 !(memo && arg && arg.type === 4 && arg.content === "key")) { 3775 dir.exp = processExpression( 3776 exp, 3777 context, 3778 // slot args must be processed as function params 3779 dir.name === "slot" 3780 ); 3781 } 3782 if (arg && arg.type === 4 && !arg.isStatic) { 3783 dir.arg = processExpression(arg, context); 3784 } 3785 } 3786 } 3787 } 3788}; 3789function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { 3790 { 3791 return node; 3792 } 3793} 3794function stringifyExpression(exp) { 3795 if (isString(exp)) { 3796 return exp; 3797 } else if (exp.type === 4) { 3798 return exp.content; 3799 } else { 3800 return exp.children.map(stringifyExpression).join(""); 3801 } 3802} 3803const transformIf = createStructuralDirectiveTransform( 3804 /^(?:if|else|else-if)$/, 3805 (node, dir, context) => { 3806 return processIf(node, dir, context, (ifNode, branch, isRoot) => { 3807 const siblings = context.parent.children; 3808 let i = siblings.indexOf(ifNode); 3809 let key = 0; 3810 while (i-- >= 0) { 3811 const sibling = siblings[i]; 3812 if (sibling && sibling.type === 9) { 3813 key += sibling.branches.length; 3814 } 3815 } 3816 return () => { 3817 if (isRoot) { 3818 ifNode.codegenNode = createCodegenNodeForBranch( 3819 branch, 3820 key, 3821 context 3822 ); 3823 } else { 3824 const parentCondition = getParentCondition(ifNode.codegenNode); 3825 parentCondition.alternate = createCodegenNodeForBranch( 3826 branch, 3827 key + ifNode.branches.length - 1, 3828 context 3829 ); 3830 } 3831 }; 3832 }); 3833 } 3834); 3835function processIf(node, dir, context, processCodegen) { 3836 if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { 3837 const loc = dir.exp ? dir.exp.loc : node.loc; 3838 context.onError( 3839 createCompilerError(28, dir.loc) 3840 ); 3841 dir.exp = createSimpleExpression(`true`, false, loc); 3842 } 3843 if (dir.name === "if") { 3844 const branch = createIfBranch(node, dir); 3845 const ifNode = { 3846 type: 9, 3847 loc: cloneLoc(node.loc), 3848 branches: [branch] 3849 }; 3850 context.replaceNode(ifNode); 3851 if (processCodegen) { 3852 return processCodegen(ifNode, branch, true); 3853 } 3854 } else { 3855 const siblings = context.parent.children; 3856 let i = siblings.indexOf(node); 3857 while (i-- >= -1) { 3858 const sibling = siblings[i]; 3859 if (sibling && isCommentOrWhitespace(sibling)) { 3860 context.removeNode(sibling); 3861 continue; 3862 } 3863 if (sibling && sibling.type === 9) { 3864 if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) { 3865 context.onError( 3866 createCompilerError(30, node.loc) 3867 ); 3868 } 3869 context.removeNode(); 3870 const branch = createIfBranch(node, dir); 3871 sibling.branches.push(branch); 3872 const onExit = processCodegen && processCodegen(sibling, branch, false);
vendor: 5,603 bytes, lines 3873-4052
3873 traverseNode(branch, context); 3874 if (onExit) onExit(); 3875 context.currentNode = null; 3876 } else { 3877 context.onError( 3878 createCompilerError(30, node.loc) 3879 ); 3880 } 3881 break; 3882 } 3883 } 3884} 3885function createIfBranch(node, dir) { 3886 const isTemplateIf = node.tagType === 3; 3887 return { 3888 type: 10, 3889 loc: node.loc, 3890 condition: dir.name === "else" ? void 0 : dir.exp, 3891 children: isTemplateIf && !findDir(node, "for") ? node.children : [node], 3892 userKey: findProp(node, `key`), 3893 isTemplateIf 3894 }; 3895} 3896function createCodegenNodeForBranch(branch, keyIndex, context) { 3897 if (branch.condition) { 3898 return createConditionalExpression( 3899 branch.condition, 3900 createChildrenCodegenNode(branch, keyIndex, context), 3901 // make sure to pass in asBlock: true so that the comment node call 3902 // closes the current block. 3903 createCallExpression(context.helper(CREATE_COMMENT), [ 3904 '""', 3905 "true" 3906 ]) 3907 ); 3908 } else { 3909 return createChildrenCodegenNode(branch, keyIndex, context); 3910 } 3911} 3912function createChildrenCodegenNode(branch, keyIndex, context) { 3913 const { helper } = context; 3914 const keyProperty = createObjectProperty( 3915 `key`, 3916 createSimpleExpression( 3917 `${keyIndex}`, 3918 false, 3919 locStub, 3920 2 3921 ) 3922 ); 3923 const { children } = branch; 3924 const firstChild = children[0]; 3925 const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; 3926 if (needFragmentWrapper) { 3927 if (children.length === 1 && firstChild.type === 11) { 3928 const vnodeCall = firstChild.codegenNode; 3929 injectProp(vnodeCall, keyProperty, context); 3930 return vnodeCall; 3931 } else { 3932 let patchFlag = 64; 3933 return createVNodeCall( 3934 context, 3935 helper(FRAGMENT), 3936 createObjectExpression([keyProperty]), 3937 children, 3938 patchFlag, 3939 void 0, 3940 void 0, 3941 true, 3942 false, 3943 false, 3944 branch.loc 3945 ); 3946 } 3947 } else { 3948 const ret = firstChild.codegenNode; 3949 const vnodeCall = getMemoedVNodeCall(ret); 3950 if (vnodeCall.type === 13) { 3951 convertToBlock(vnodeCall, context); 3952 } 3953 injectProp(vnodeCall, keyProperty, context); 3954 return ret; 3955 } 3956} 3957function getParentCondition(node) { 3958 while (true) { 3959 if (node.type === 19) { 3960 if (node.alternate.type === 19) { 3961 node = node.alternate; 3962 } else { 3963 return node; 3964 } 3965 } else if (node.type === 20) { 3966 node = node.value; 3967 } 3968 } 3969} 3970const transformFor = createStructuralDirectiveTransform( 3971 "for", 3972 (node, dir, context) => { 3973 const { helper, removeHelper } = context; 3974 return processFor(node, dir, context, (forNode) => { 3975 const renderExp = createCallExpression(helper(RENDER_LIST), [ 3976 forNode.source 3977 ]); 3978 const isTemplate = isTemplateNode(node); 3979 const memo = findDir(node, "memo"); 3980 const keyProp = findProp(node, `key`, false, true); 3981 keyProp && keyProp.type === 7; 3982 let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp); 3983 const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null; 3984 const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; 3985 const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; 3986 forNode.codegenNode = createVNodeCall( 3987 context, 3988 helper(FRAGMENT), 3989 void 0, 3990 renderExp, 3991 fragmentFlag, 3992 void 0, 3993 void 0, 3994 true, 3995 !isStableFragment, 3996 false, 3997 node.loc 3998 ); 3999 return () => { 4000 let childBlock; 4001 const { children } = forNode; 4002 const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; 4003 const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; 4004 if (slotOutlet) { 4005 childBlock = slotOutlet.codegenNode; 4006 if (isTemplate && keyProperty) { 4007 injectProp(childBlock, keyProperty, context); 4008 } 4009 } else if (needFragmentWrapper) { 4010 childBlock = createVNodeCall( 4011 context, 4012 helper(FRAGMENT), 4013 keyProperty ? createObjectExpression([keyProperty]) : void 0, 4014 node.children, 4015 64, 4016 void 0, 4017 void 0, 4018 true, 4019 void 0, 4020 false 4021 ); 4022 } else { 4023 childBlock = children[0].codegenNode; 4024 if (isTemplate && keyProperty) { 4025 injectProp(childBlock, keyProperty, context); 4026 } 4027 if (childBlock.isBlock !== !isStableFragment) { 4028 if (childBlock.isBlock) { 4029 removeHelper(OPEN_BLOCK); 4030 removeHelper( 4031 getVNodeBlockHelper(context.inSSR, childBlock.isComponent) 4032 ); 4033 } else { 4034 removeHelper( 4035 getVNodeHelper(context.inSSR, childBlock.isComponent) 4036 ); 4037 } 4038 } 4039 childBlock.isBlock = !isStableFragment; 4040 if (childBlock.isBlock) { 4041 helper(OPEN_BLOCK); 4042 helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); 4043 } else { 4044 helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); 4045 } 4046 } 4047 if (memo) { 4048 const loop = createFunctionExpression( 4049 createForLoopParams(forNode.parseResult, [ 4050 createSimpleExpression(`_cached`) 4051 ]) 4052 );
vendor: 4,198 bytes, lines 4053-4192
4053 loop.body = createBlockStatement([ 4054 createCompoundExpression([`const _memo = (`, memo.exp, `)`]), 4055 createCompoundExpression([ 4056 `if (_cached`, 4057 ...keyExp ? [` && _cached.key === `, keyExp] : [], 4058 ` && ${context.helperString( 4059 IS_MEMO_SAME 4060 )}(_cached, _memo)) return _cached` 4061 ]), 4062 createCompoundExpression([`const _item = `, childBlock]), 4063 createSimpleExpression(`_item.memo = _memo`), 4064 createSimpleExpression(`return _item`) 4065 ]); 4066 renderExp.arguments.push( 4067 loop, 4068 createSimpleExpression(`_cache`), 4069 createSimpleExpression(String(context.cached.length)) 4070 ); 4071 context.cached.push(null); 4072 } else { 4073 renderExp.arguments.push( 4074 createFunctionExpression( 4075 createForLoopParams(forNode.parseResult), 4076 childBlock, 4077 true 4078 ) 4079 ); 4080 } 4081 }; 4082 }); 4083 } 4084); 4085function processFor(node, dir, context, processCodegen) { 4086 if (!dir.exp) { 4087 context.onError( 4088 createCompilerError(31, dir.loc) 4089 ); 4090 return; 4091 } 4092 const parseResult = dir.forParseResult; 4093 if (!parseResult) { 4094 context.onError( 4095 createCompilerError(32, dir.loc) 4096 ); 4097 return; 4098 } 4099 finalizeForParseResult(parseResult); 4100 const { addIdentifiers, removeIdentifiers, scopes } = context; 4101 const { source, value, key, index } = parseResult; 4102 const forNode = { 4103 type: 11, 4104 loc: dir.loc, 4105 source, 4106 valueAlias: value, 4107 keyAlias: key, 4108 objectIndexAlias: index, 4109 parseResult, 4110 children: isTemplateNode(node) ? node.children : [node] 4111 }; 4112 context.replaceNode(forNode); 4113 scopes.vFor++; 4114 const onExit = processCodegen && processCodegen(forNode); 4115 return () => { 4116 scopes.vFor--; 4117 if (onExit) onExit(); 4118 }; 4119} 4120function finalizeForParseResult(result, context) { 4121 if (result.finalized) return; 4122 result.finalized = true; 4123} 4124function createForLoopParams({ value, key, index }, memoArgs = []) { 4125 return createParamsList([value, key, index, ...memoArgs]); 4126} 4127function createParamsList(args) { 4128 let i = args.length; 4129 while (i--) { 4130 if (args[i]) break; 4131 } 4132 return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); 4133} 4134const defaultFallback = createSimpleExpression(`undefined`, false); 4135const trackSlotScopes = (node, context) => { 4136 if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { 4137 const vSlot = findDir(node, "slot"); 4138 if (vSlot) { 4139 vSlot.exp; 4140 context.scopes.vSlot++; 4141 return () => { 4142 context.scopes.vSlot--; 4143 }; 4144 } 4145 } 4146}; 4147const trackVForSlotScopes = (node, context) => { 4148 let vFor; 4149 if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { 4150 const result = vFor.forParseResult; 4151 if (result) { 4152 finalizeForParseResult(result); 4153 const { value, key, index } = result; 4154 const { addIdentifiers, removeIdentifiers } = context; 4155 value && addIdentifiers(value); 4156 key && addIdentifiers(key); 4157 index && addIdentifiers(index); 4158 return () => { 4159 value && removeIdentifiers(value); 4160 key && removeIdentifiers(key); 4161 index && removeIdentifiers(index); 4162 }; 4163 } 4164 } 4165}; 4166const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( 4167 props, 4168 children, 4169 false, 4170 true, 4171 children.length ? children[0].loc : loc 4172); 4173function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { 4174 context.helper(WITH_CTX); 4175 const { children, loc } = node; 4176 const slotsProperties = []; 4177 const dynamicSlots = []; 4178 let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; 4179 const onComponentSlot = findDir(node, "slot", true); 4180 if (onComponentSlot) { 4181 const { arg, exp } = onComponentSlot; 4182 if (arg && !isStaticExp(arg)) { 4183 hasDynamicSlots = true; 4184 } 4185 slotsProperties.push( 4186 createObjectProperty( 4187 arg || createSimpleExpression("default", true), 4188 buildSlotFn(exp, void 0, children, loc) 4189 ) 4190 ); 4191 } 4192 let hasTemplateSlots = false;
vendor: 4,318 bytes, lines 4193-4334
4193 let hasNamedDefaultSlot = false; 4194 const implicitDefaultChildren = []; 4195 const seenSlotNames = /* @__PURE__ */ new Set(); 4196 let conditionalBranchIndex = 0; 4197 for (let i = 0; i < children.length; i++) { 4198 const slotElement = children[i]; 4199 let slotDir; 4200 if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { 4201 if (slotElement.type !== 3) { 4202 implicitDefaultChildren.push(slotElement); 4203 } 4204 continue; 4205 } 4206 if (onComponentSlot) { 4207 context.onError( 4208 createCompilerError(37, slotDir.loc) 4209 ); 4210 break; 4211 } 4212 hasTemplateSlots = true; 4213 const { children: slotChildren, loc: slotLoc } = slotElement; 4214 const { 4215 arg: slotName = createSimpleExpression(`default`, true), 4216 exp: slotProps, 4217 loc: dirLoc 4218 } = slotDir; 4219 let staticSlotName; 4220 if (isStaticExp(slotName)) { 4221 staticSlotName = slotName ? slotName.content : `default`; 4222 } else { 4223 hasDynamicSlots = true; 4224 } 4225 const vFor = findDir(slotElement, "for"); 4226 const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); 4227 let vIf; 4228 let vElse; 4229 if (vIf = findDir(slotElement, "if")) { 4230 hasDynamicSlots = true; 4231 dynamicSlots.push( 4232 createConditionalExpression( 4233 vIf.exp, 4234 buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), 4235 defaultFallback 4236 ) 4237 ); 4238 } else if (vElse = findDir( 4239 slotElement, 4240 /^else(?:-if)?$/, 4241 true 4242 /* allowEmpty */ 4243 )) { 4244 let j = i; 4245 let prev; 4246 while (j--) { 4247 prev = children[j]; 4248 if (!isCommentOrWhitespace(prev)) { 4249 break; 4250 } 4251 } 4252 if (prev && isTemplateNode(prev) && findDir(prev, /^(?:else-)?if$/)) { 4253 let conditional = dynamicSlots[dynamicSlots.length - 1]; 4254 while (conditional.alternate.type === 19) { 4255 conditional = conditional.alternate; 4256 } 4257 conditional.alternate = vElse.exp ? createConditionalExpression( 4258 vElse.exp, 4259 buildDynamicSlot( 4260 slotName, 4261 slotFunction, 4262 conditionalBranchIndex++ 4263 ), 4264 defaultFallback 4265 ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); 4266 } else { 4267 context.onError( 4268 createCompilerError(30, vElse.loc) 4269 ); 4270 } 4271 } else if (vFor) { 4272 hasDynamicSlots = true; 4273 const parseResult = vFor.forParseResult; 4274 if (parseResult) { 4275 finalizeForParseResult(parseResult); 4276 dynamicSlots.push( 4277 createCallExpression(context.helper(RENDER_LIST), [ 4278 parseResult.source, 4279 createFunctionExpression( 4280 createForLoopParams(parseResult), 4281 buildDynamicSlot(slotName, slotFunction), 4282 true 4283 ) 4284 ]) 4285 ); 4286 } else { 4287 context.onError( 4288 createCompilerError( 4289 32, 4290 vFor.loc 4291 ) 4292 ); 4293 } 4294 } else { 4295 if (staticSlotName) { 4296 if (seenSlotNames.has(staticSlotName)) { 4297 context.onError( 4298 createCompilerError( 4299 38, 4300 dirLoc 4301 ) 4302 ); 4303 continue; 4304 } 4305 seenSlotNames.add(staticSlotName); 4306 if (staticSlotName === "default") { 4307 hasNamedDefaultSlot = true; 4308 } 4309 } 4310 slotsProperties.push(createObjectProperty(slotName, slotFunction)); 4311 } 4312 } 4313 if (!onComponentSlot) { 4314 const buildDefaultSlotProperty = (props, children2) => { 4315 const fn = buildSlotFn(props, void 0, children2, loc); 4316 if (context.compatConfig) { 4317 fn.isNonScopedSlot = true; 4318 } 4319 return createObjectProperty(`default`, fn); 4320 }; 4321 if (!hasTemplateSlots) { 4322 slotsProperties.push(buildDefaultSlotProperty(void 0, children)); 4323 } else if (implicitDefaultChildren.length && // #3766 4324 // with whitespace: 'preserve', whitespaces between slots will end up in 4325 // implicitDefaultChildren. Ignore if all implicit children are whitespaces. 4326 !implicitDefaultChildren.every(isWhitespaceText)) { 4327 if (hasNamedDefaultSlot) { 4328 context.onError( 4329 createCompilerError( 4330 39, 4331 implicitDefaultChildren[0].loc 4332 ) 4333 ); 4334 } else {
vendor: 4,202 bytes, lines 4335-4460
4335 slotsProperties.push( 4336 buildDefaultSlotProperty(void 0, implicitDefaultChildren) 4337 ); 4338 } 4339 } 4340 } 4341 const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; 4342 let slots = createObjectExpression( 4343 slotsProperties.concat( 4344 createObjectProperty( 4345 `_`, 4346 // 2 = compiled but dynamic = can skip normalization, but must run diff 4347 // 1 = compiled and static = can skip normalization AND diff as optimized 4348 createSimpleExpression( 4349 slotFlag + ``, 4350 false 4351 ) 4352 ) 4353 ), 4354 loc 4355 ); 4356 if (dynamicSlots.length) { 4357 slots = createCallExpression(context.helper(CREATE_SLOTS), [ 4358 slots, 4359 createArrayExpression(dynamicSlots) 4360 ]); 4361 } 4362 return { 4363 slots, 4364 hasDynamicSlots 4365 }; 4366} 4367function buildDynamicSlot(name, fn, index) { 4368 const props = [ 4369 createObjectProperty(`name`, name), 4370 createObjectProperty(`fn`, fn) 4371 ]; 4372 if (index != null) { 4373 props.push( 4374 createObjectProperty(`key`, createSimpleExpression(String(index), true)) 4375 ); 4376 } 4377 return createObjectExpression(props); 4378} 4379function hasForwardedSlots(children) { 4380 for (let i = 0; i < children.length; i++) { 4381 const child = children[i]; 4382 switch (child.type) { 4383 case 1: 4384 if (child.tagType === 2 || hasForwardedSlots(child.children)) { 4385 return true; 4386 } 4387 break; 4388 case 9: 4389 if (hasForwardedSlots(child.branches)) return true; 4390 break; 4391 case 10: 4392 case 11: 4393 if (hasForwardedSlots(child.children)) return true; 4394 break; 4395 } 4396 } 4397 return false; 4398} 4399const directiveImportMap = /* @__PURE__ */ new WeakMap(); 4400const transformElement = (node, context) => { 4401 return function postTransformElement() { 4402 node = context.currentNode; 4403 if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { 4404 return; 4405 } 4406 const { tag, props } = node; 4407 const isComponent2 = node.tagType === 1; 4408 let vnodeTag = isComponent2 ? resolveComponentType(node, context) : `"${tag}"`; 4409 const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; 4410 let vnodeProps; 4411 let vnodeChildren; 4412 let patchFlag = 0; 4413 let vnodeDynamicProps; 4414 let dynamicPropNames; 4415 let vnodeDirectives; 4416 let shouldUseBlock = ( 4417 // dynamic component may resolve to plain elements 4418 isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent2 && // <svg> and <foreignObject> must be forced into blocks so that block 4419 // updates inside get proper isSVG flag at runtime. (#639, #643) 4420 // This is technically web-specific, but splitting the logic out of core 4421 // leads to too much unnecessary complexity. 4422 (tag === "svg" || tag === "foreignObject" || tag === "math") 4423 ); 4424 if (props.length > 0) { 4425 const propsBuildResult = buildProps( 4426 node, 4427 context, 4428 void 0, 4429 isComponent2, 4430 isDynamicComponent 4431 ); 4432 vnodeProps = propsBuildResult.props; 4433 patchFlag = propsBuildResult.patchFlag; 4434 dynamicPropNames = propsBuildResult.dynamicPropNames; 4435 const directives = propsBuildResult.directives; 4436 vnodeDirectives = directives && directives.length ? createArrayExpression( 4437 directives.map((dir) => buildDirectiveArgs(dir, context)) 4438 ) : void 0; 4439 if (propsBuildResult.shouldUseBlock) { 4440 shouldUseBlock = true; 4441 } 4442 } 4443 if (node.children.length > 0) { 4444 if (vnodeTag === KEEP_ALIVE) { 4445 shouldUseBlock = true; 4446 patchFlag |= 1024; 4447 } 4448 const shouldBuildAsSlots = isComponent2 && // Teleport is not a real component and has dedicated runtime handling 4449 vnodeTag !== TELEPORT && // explained above. 4450 vnodeTag !== KEEP_ALIVE; 4451 if (shouldBuildAsSlots) { 4452 const { slots, hasDynamicSlots } = buildSlots(node, context); 4453 vnodeChildren = slots; 4454 if (hasDynamicSlots) { 4455 patchFlag |= 1024; 4456 } 4457 } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { 4458 const child = node.children[0]; 4459 const type = child.type; 4460 const hasDynamicTextChild = type === 5 || type === 8;
vendor: 6,701 bytes, lines 4461-4684
4461 if (hasDynamicTextChild && getConstantType(child, context) === 0) { 4462 patchFlag |= 1; 4463 } 4464 if (hasDynamicTextChild || type === 2) { 4465 vnodeChildren = child; 4466 } else { 4467 vnodeChildren = node.children; 4468 } 4469 } else { 4470 vnodeChildren = node.children; 4471 } 4472 } 4473 if (dynamicPropNames && dynamicPropNames.length) { 4474 vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); 4475 } 4476 node.codegenNode = createVNodeCall( 4477 context, 4478 vnodeTag, 4479 vnodeProps, 4480 vnodeChildren, 4481 patchFlag === 0 ? void 0 : patchFlag, 4482 vnodeDynamicProps, 4483 vnodeDirectives, 4484 !!shouldUseBlock, 4485 false, 4486 isComponent2, 4487 node.loc 4488 ); 4489 }; 4490}; 4491function resolveComponentType(node, context, ssr = false) { 4492 let { tag } = node; 4493 const isExplicitDynamic = isComponentTag(tag); 4494 const isProp = findProp( 4495 node, 4496 "is", 4497 false, 4498 true 4499 /* allow empty */ 4500 ); 4501 if (isProp) { 4502 if (isExplicitDynamic || isCompatEnabled( 4503 "COMPILER_IS_ON_ELEMENT", 4504 context 4505 )) { 4506 let exp; 4507 if (isProp.type === 6) { 4508 exp = isProp.value && createSimpleExpression(isProp.value.content, true); 4509 } else { 4510 exp = isProp.exp; 4511 if (!exp) { 4512 exp = createSimpleExpression(`is`, false, isProp.arg.loc); 4513 } 4514 } 4515 if (exp) { 4516 return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ 4517 exp 4518 ]); 4519 } 4520 } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { 4521 tag = isProp.value.content.slice(4); 4522 } 4523 } 4524 const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); 4525 if (builtIn) { 4526 if (!ssr) context.helper(builtIn); 4527 return builtIn; 4528 } 4529 context.helper(RESOLVE_COMPONENT); 4530 context.components.add(tag); 4531 return toValidAssetId(tag, `component`); 4532} 4533function buildProps(node, context, props = node.props, isComponent2, isDynamicComponent, ssr = false) { 4534 const { tag, loc: elementLoc, children } = node; 4535 let properties = []; 4536 const mergeArgs = []; 4537 const runtimeDirectives = []; 4538 const hasChildren = children.length > 0; 4539 let shouldUseBlock = false; 4540 let patchFlag = 0; 4541 let hasRef = false; 4542 let hasClassBinding = false; 4543 let hasStyleBinding = false; 4544 let hasHydrationEventBinding = false; 4545 let hasDynamicKeys = false; 4546 let hasVnodeHook = false; 4547 const dynamicPropNames = []; 4548 const pushMergeArg = (arg) => { 4549 if (properties.length) { 4550 mergeArgs.push( 4551 createObjectExpression(dedupeProperties(properties), elementLoc) 4552 ); 4553 properties = []; 4554 } 4555 if (arg) mergeArgs.push(arg); 4556 }; 4557 const pushRefVForMarker = () => { 4558 if (context.scopes.vFor > 0) { 4559 properties.push( 4560 createObjectProperty( 4561 createSimpleExpression("ref_for", true), 4562 createSimpleExpression("true") 4563 ) 4564 ); 4565 } 4566 }; 4567 const analyzePatchFlag = ({ key, value }) => { 4568 if (isStaticExp(key)) { 4569 const name = key.content; 4570 const isEventHandler = isOn(name); 4571 if (isEventHandler && (!isComponent2 || isDynamicComponent) && // omit the flag for click handlers because hydration gives click 4572 // dedicated fast path. 4573 name.toLowerCase() !== "onclick" && // omit v-model handlers 4574 name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks 4575 !isReservedProp(name)) { 4576 hasHydrationEventBinding = true; 4577 } 4578 if (isEventHandler && isReservedProp(name)) { 4579 hasVnodeHook = true; 4580 } 4581 if (isEventHandler && value.type === 14) { 4582 value = value.arguments[0]; 4583 } 4584 if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { 4585 return; 4586 } 4587 if (name === "ref") { 4588 hasRef = true; 4589 } else if (name === "class") { 4590 hasClassBinding = true; 4591 } else if (name === "style") { 4592 hasStyleBinding = true; 4593 } else if (name !== "key" && !dynamicPropNames.includes(name)) { 4594 dynamicPropNames.push(name); 4595 } 4596 if (isComponent2 && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { 4597 dynamicPropNames.push(name); 4598 } 4599 } else { 4600 hasDynamicKeys = true; 4601 } 4602 }; 4603 for (let i = 0; i < props.length; i++) { 4604 const prop = props[i]; 4605 if (prop.type === 6) { 4606 const { loc, name, nameLoc, value } = prop; 4607 let isStatic = true; 4608 if (name === "ref") { 4609 hasRef = true; 4610 pushRefVForMarker(); 4611 } 4612 if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( 4613 "COMPILER_IS_ON_ELEMENT", 4614 context 4615 ))) { 4616 continue; 4617 } 4618 properties.push( 4619 createObjectProperty( 4620 createSimpleExpression(name, true, nameLoc), 4621 createSimpleExpression( 4622 value ? value.content : "", 4623 isStatic, 4624 value ? value.loc : loc 4625 ) 4626 ) 4627 ); 4628 } else { 4629 const { name, arg, exp, loc, modifiers } = prop; 4630 const isVBind = name === "bind"; 4631 const isVOn = name === "on"; 4632 if (name === "slot") { 4633 if (!isComponent2) { 4634 context.onError( 4635 createCompilerError(40, loc) 4636 ); 4637 } 4638 continue; 4639 } 4640 if (name === "once" || name === "memo") { 4641 continue; 4642 } 4643 if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( 4644 "COMPILER_IS_ON_ELEMENT", 4645 context 4646 ))) { 4647 continue; 4648 } 4649 if (isVOn && ssr) { 4650 continue; 4651 } 4652 if ( 4653 // #938: elements with dynamic keys should be forced into blocks 4654 isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked 4655 // before children 4656 isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") 4657 ) { 4658 shouldUseBlock = true; 4659 } 4660 if (isVBind && isStaticArgOf(arg, "ref")) { 4661 pushRefVForMarker(); 4662 } 4663 if (!arg && (isVBind || isVOn)) { 4664 hasDynamicKeys = true; 4665 if (exp) { 4666 if (isVBind) { 4667 { 4668 pushMergeArg(); 4669 if (isCompatEnabled( 4670 "COMPILER_V_BIND_OBJECT_ORDER", 4671 context 4672 )) { 4673 mergeArgs.unshift(exp); 4674 continue; 4675 } 4676 } 4677 pushRefVForMarker(); 4678 pushMergeArg(); 4679 mergeArgs.push(exp); 4680 } else { 4681 pushMergeArg({ 4682 type: 14, 4683 loc, 4684 callee: context.helper(TO_HANDLERS),
vendor: 8,587 bytes, lines 4685-4993
4685 arguments: isComponent2 ? [exp] : [exp, `true`] 4686 }); 4687 } 4688 } else { 4689 context.onError( 4690 createCompilerError( 4691 isVBind ? 34 : 35, 4692 loc 4693 ) 4694 ); 4695 } 4696 continue; 4697 } 4698 if (isVBind && modifiers.some((mod) => mod.content === "prop")) { 4699 patchFlag |= 32; 4700 } 4701 const directiveTransform = context.directiveTransforms[name]; 4702 if (directiveTransform) { 4703 const { props: props2, needRuntime } = directiveTransform(prop, node, context); 4704 !ssr && props2.forEach(analyzePatchFlag); 4705 if (isVOn && arg && !isStaticExp(arg)) { 4706 pushMergeArg(createObjectExpression(props2, elementLoc)); 4707 } else { 4708 properties.push(...props2); 4709 } 4710 if (needRuntime) { 4711 runtimeDirectives.push(prop); 4712 if (isSymbol(needRuntime)) { 4713 directiveImportMap.set(prop, needRuntime); 4714 } 4715 } 4716 } else if (!isBuiltInDirective(name)) { 4717 runtimeDirectives.push(prop); 4718 if (hasChildren) { 4719 shouldUseBlock = true; 4720 } 4721 } 4722 } 4723 } 4724 let propsExpression = void 0; 4725 if (mergeArgs.length) { 4726 pushMergeArg(); 4727 if (mergeArgs.length > 1) { 4728 propsExpression = createCallExpression( 4729 context.helper(MERGE_PROPS), 4730 mergeArgs, 4731 elementLoc 4732 ); 4733 } else { 4734 propsExpression = mergeArgs[0]; 4735 } 4736 } else if (properties.length) { 4737 propsExpression = createObjectExpression( 4738 dedupeProperties(properties), 4739 elementLoc 4740 ); 4741 } 4742 if (hasDynamicKeys) { 4743 patchFlag |= 16; 4744 } else { 4745 if (hasClassBinding && !isComponent2) { 4746 patchFlag |= 2; 4747 } 4748 if (hasStyleBinding && !isComponent2) { 4749 patchFlag |= 4; 4750 } 4751 if (dynamicPropNames.length) { 4752 patchFlag |= 8; 4753 } 4754 if (hasHydrationEventBinding) { 4755 patchFlag |= 32; 4756 } 4757 } 4758 if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { 4759 patchFlag |= 512; 4760 } 4761 if (!context.inSSR && propsExpression) { 4762 switch (propsExpression.type) { 4763 case 15: 4764 let classKeyIndex = -1; 4765 let styleKeyIndex = -1; 4766 let hasDynamicKey = false; 4767 for (let i = 0; i < propsExpression.properties.length; i++) { 4768 const key = propsExpression.properties[i].key; 4769 if (isStaticExp(key)) { 4770 if (key.content === "class") { 4771 classKeyIndex = i; 4772 } else if (key.content === "style") { 4773 styleKeyIndex = i; 4774 } 4775 } else if (!key.isHandlerKey) { 4776 hasDynamicKey = true; 4777 } 4778 } 4779 const classProp = propsExpression.properties[classKeyIndex]; 4780 const styleProp = propsExpression.properties[styleKeyIndex]; 4781 if (!hasDynamicKey) { 4782 if (classProp && !isStaticExp(classProp.value)) { 4783 classProp.value = createCallExpression( 4784 context.helper(NORMALIZE_CLASS), 4785 [classProp.value] 4786 ); 4787 } 4788 if (styleProp && // the static style is compiled into an object, 4789 // so use `hasStyleBinding` to ensure that it is a dynamic style binding 4790 (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, 4791 // v-bind:style with static literal object 4792 styleProp.value.type === 17)) { 4793 styleProp.value = createCallExpression( 4794 context.helper(NORMALIZE_STYLE), 4795 [styleProp.value] 4796 ); 4797 } 4798 } else { 4799 propsExpression = createCallExpression( 4800 context.helper(NORMALIZE_PROPS), 4801 [propsExpression] 4802 ); 4803 } 4804 break; 4805 case 14: 4806 break; 4807 default: 4808 propsExpression = createCallExpression( 4809 context.helper(NORMALIZE_PROPS), 4810 [ 4811 createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ 4812 propsExpression 4813 ]) 4814 ] 4815 ); 4816 break; 4817 } 4818 } 4819 return { 4820 props: propsExpression, 4821 directives: runtimeDirectives, 4822 patchFlag, 4823 dynamicPropNames, 4824 shouldUseBlock 4825 }; 4826} 4827function dedupeProperties(properties) { 4828 const knownProps = /* @__PURE__ */ new Map(); 4829 const deduped = []; 4830 for (let i = 0; i < properties.length; i++) { 4831 const prop = properties[i]; 4832 if (prop.key.type === 8 || !prop.key.isStatic) { 4833 deduped.push(prop); 4834 continue; 4835 } 4836 const name = prop.key.content; 4837 const existing = knownProps.get(name); 4838 if (existing) { 4839 if (name === "style" || name === "class" || isOn(name)) { 4840 mergeAsArray(existing, prop); 4841 } 4842 } else { 4843 knownProps.set(name, prop); 4844 deduped.push(prop); 4845 } 4846 } 4847 return deduped; 4848} 4849function mergeAsArray(existing, incoming) { 4850 if (existing.value.type === 17) { 4851 existing.value.elements.push(incoming.value); 4852 } else { 4853 existing.value = createArrayExpression( 4854 [existing.value, incoming.value], 4855 existing.loc 4856 ); 4857 } 4858} 4859function buildDirectiveArgs(dir, context) { 4860 const dirArgs = []; 4861 const runtime = directiveImportMap.get(dir); 4862 if (runtime) { 4863 dirArgs.push(context.helperString(runtime)); 4864 } else { 4865 { 4866 context.helper(RESOLVE_DIRECTIVE); 4867 context.directives.add(dir.name); 4868 dirArgs.push(toValidAssetId(dir.name, `directive`)); 4869 } 4870 } 4871 const { loc } = dir; 4872 if (dir.exp) dirArgs.push(dir.exp); 4873 if (dir.arg) { 4874 if (!dir.exp) { 4875 dirArgs.push(`void 0`); 4876 } 4877 dirArgs.push(dir.arg); 4878 } 4879 if (Object.keys(dir.modifiers).length) { 4880 if (!dir.arg) { 4881 if (!dir.exp) { 4882 dirArgs.push(`void 0`); 4883 } 4884 dirArgs.push(`void 0`); 4885 } 4886 const trueExpression = createSimpleExpression(`true`, false, loc); 4887 dirArgs.push( 4888 createObjectExpression( 4889 dir.modifiers.map( 4890 (modifier) => createObjectProperty(modifier, trueExpression) 4891 ), 4892 loc 4893 ) 4894 ); 4895 } 4896 return createArrayExpression(dirArgs, dir.loc); 4897} 4898function stringifyDynamicPropNames(props) { 4899 let propsNamesString = `[`; 4900 for (let i = 0, l = props.length; i < l; i++) { 4901 propsNamesString += JSON.stringify(props[i]); 4902 if (i < l - 1) propsNamesString += ", "; 4903 } 4904 return propsNamesString + `]`; 4905} 4906function isComponentTag(tag) { 4907 return tag === "component" || tag === "Component"; 4908} 4909const transformSlotOutlet = (node, context) => { 4910 if (isSlotOutlet(node)) { 4911 const { children, loc } = node; 4912 const { slotName, slotProps } = processSlotOutlet(node, context); 4913 const slotArgs = [ 4914 context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, 4915 slotName, 4916 "{}", 4917 "undefined", 4918 "true" 4919 ]; 4920 let expectedLen = 2; 4921 if (slotProps) { 4922 slotArgs[2] = slotProps; 4923 expectedLen = 3; 4924 } 4925 if (children.length) { 4926 slotArgs[3] = createFunctionExpression([], children, false, false, loc); 4927 expectedLen = 4; 4928 } 4929 if (context.scopeId && !context.slotted) { 4930 expectedLen = 5; 4931 } 4932 slotArgs.splice(expectedLen); 4933 node.codegenNode = createCallExpression( 4934 context.helper(RENDER_SLOT), 4935 slotArgs, 4936 loc 4937 ); 4938 } 4939}; 4940function processSlotOutlet(node, context) { 4941 let slotName = `"default"`; 4942 let slotProps = void 0; 4943 const nonNameProps = []; 4944 for (let i = 0; i < node.props.length; i++) { 4945 const p = node.props[i]; 4946 if (p.type === 6) { 4947 if (p.value) { 4948 if (p.name === "name") { 4949 slotName = JSON.stringify(p.value.content); 4950 } else { 4951 p.name = camelize(p.name); 4952 nonNameProps.push(p); 4953 } 4954 } 4955 } else { 4956 if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { 4957 if (p.exp) { 4958 slotName = p.exp; 4959 } else if (p.arg && p.arg.type === 4) { 4960 const name = camelize(p.arg.content); 4961 slotName = p.exp = createSimpleExpression(name, false, p.arg.loc); 4962 } 4963 } else { 4964 if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { 4965 p.arg.content = camelize(p.arg.content); 4966 } 4967 nonNameProps.push(p); 4968 } 4969 } 4970 } 4971 if (nonNameProps.length > 0) { 4972 const { props, directives } = buildProps( 4973 node, 4974 context, 4975 nonNameProps, 4976 false, 4977 false 4978 ); 4979 slotProps = props; 4980 if (directives.length) { 4981 context.onError( 4982 createCompilerError( 4983 36, 4984 directives[0].loc 4985 ) 4986 ); 4987 } 4988 } 4989 return { 4990 slotName, 4991 slotProps 4992 }; 4993}
vendor: 14,597 bytes, lines 4994-5477
4994const transformOn$1 = (dir, node, context, augmentor) => { 4995 const { loc, modifiers, arg } = dir; 4996 if (!dir.exp && !modifiers.length) { 4997 context.onError(createCompilerError(35, loc)); 4998 } 4999 let eventName; 5000 if (arg.type === 4) { 5001 if (arg.isStatic) { 5002 let rawName = arg.content; 5003 if (rawName.startsWith("vue:")) { 5004 rawName = `vnode-${rawName.slice(4)}`; 5005 } 5006 const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( 5007 // for non-element and vnode lifecycle event listeners, auto convert 5008 // it to camelCase. See issue #2249 5009 toHandlerKey(camelize(rawName)) 5010 ) : ( 5011 // preserve case for plain element listeners that have uppercase 5012 // letters, as these may be custom elements' custom events 5013 `on:${rawName}` 5014 ); 5015 eventName = createSimpleExpression(eventString, true, arg.loc); 5016 } else { 5017 eventName = createCompoundExpression([ 5018 `${context.helperString(TO_HANDLER_KEY)}(`, 5019 arg, 5020 `)` 5021 ]); 5022 } 5023 } else { 5024 eventName = arg; 5025 eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); 5026 eventName.children.push(`)`); 5027 } 5028 let exp = dir.exp; 5029 if (exp && !exp.content.trim()) { 5030 exp = void 0; 5031 } 5032 let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; 5033 if (exp) { 5034 const isMemberExp = isMemberExpression(exp); 5035 const isInlineStatement = !(isMemberExp || isFnExpression(exp)); 5036 const hasMultipleStatements = exp.content.includes(`;`); 5037 if (isInlineStatement || shouldCache && isMemberExp) { 5038 exp = createCompoundExpression([ 5039 `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, 5040 exp, 5041 hasMultipleStatements ? `}` : `)` 5042 ]); 5043 } 5044 } 5045 let ret = { 5046 props: [ 5047 createObjectProperty( 5048 eventName, 5049 exp || createSimpleExpression(`() => {}`, false, loc) 5050 ) 5051 ] 5052 }; 5053 if (augmentor) { 5054 ret = augmentor(ret); 5055 } 5056 if (shouldCache) { 5057 ret.props[0].value = context.cache(ret.props[0].value); 5058 } 5059 ret.props.forEach((p) => p.key.isHandlerKey = true); 5060 return ret; 5061}; 5062const transformBind = (dir, _node, context) => { 5063 const { modifiers, loc } = dir; 5064 const arg = dir.arg; 5065 let { exp } = dir; 5066 if (exp && exp.type === 4 && !exp.content.trim()) { 5067 { 5068 exp = void 0; 5069 } 5070 } 5071 if (arg.type !== 4) { 5072 arg.children.unshift(`(`); 5073 arg.children.push(`) || ""`); 5074 } else if (!arg.isStatic) { 5075 arg.content = arg.content ? `${arg.content} || ""` : `""`; 5076 } 5077 if (modifiers.some((mod) => mod.content === "camel")) { 5078 if (arg.type === 4) { 5079 if (arg.isStatic) { 5080 arg.content = camelize(arg.content); 5081 } else { 5082 arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; 5083 } 5084 } else { 5085 arg.children.unshift(`${context.helperString(CAMELIZE)}(`); 5086 arg.children.push(`)`); 5087 } 5088 } 5089 if (!context.inSSR) { 5090 if (modifiers.some((mod) => mod.content === "prop")) { 5091 injectPrefix(arg, "."); 5092 } 5093 if (modifiers.some((mod) => mod.content === "attr")) { 5094 injectPrefix(arg, "^"); 5095 } 5096 } 5097 return { 5098 props: [createObjectProperty(arg, exp)] 5099 }; 5100}; 5101const injectPrefix = (arg, prefix) => { 5102 if (arg.type === 4) { 5103 if (arg.isStatic) { 5104 arg.content = prefix + arg.content; 5105 } else { 5106 arg.content = `\`${prefix}\${${arg.content}}\``; 5107 } 5108 } else { 5109 arg.children.unshift(`'${prefix}' + (`); 5110 arg.children.push(`)`); 5111 } 5112}; 5113const transformText = (node, context) => { 5114 if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { 5115 return () => { 5116 const children = node.children; 5117 let currentContainer = void 0; 5118 let hasText = false; 5119 for (let i = 0; i < children.length; i++) { 5120 const child = children[i]; 5121 if (isText$1(child)) { 5122 hasText = true; 5123 for (let j = i + 1; j < children.length; j++) { 5124 const next = children[j]; 5125 if (isText$1(next)) { 5126 if (!currentContainer) { 5127 currentContainer = children[i] = createCompoundExpression( 5128 [child], 5129 child.loc 5130 ); 5131 } 5132 currentContainer.children.push(` + `, next); 5133 children.splice(j, 1); 5134 j--; 5135 } else { 5136 currentContainer = void 0; 5137 break; 5138 } 5139 } 5140 } 5141 } 5142 if (!hasText || // if this is a plain element with a single text child, leave it 5143 // as-is since the runtime has dedicated fast path for this by directly 5144 // setting textContent of the element. 5145 // for component root it's always normalized anyway. 5146 children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 5147 // custom directives can potentially add DOM elements arbitrarily, 5148 // we need to avoid setting textContent of the element at runtime 5149 // to avoid accidentally overwriting the DOM elements added 5150 // by the user through custom directives. 5151 !node.props.find( 5152 (p) => p.type === 7 && !context.directiveTransforms[p.name] 5153 ) && // in compat mode, <template> tags with no special directives 5154 // will be rendered as a fragment so its children must be 5155 // converted into vnodes. 5156 !(node.tag === "template"))) { 5157 return; 5158 } 5159 for (let i = 0; i < children.length; i++) { 5160 const child = children[i]; 5161 if (isText$1(child) || child.type === 8) { 5162 const callArgs = []; 5163 if (child.type !== 2 || child.content !== " ") { 5164 callArgs.push(child); 5165 } 5166 if (!context.ssr && getConstantType(child, context) === 0) { 5167 callArgs.push( 5168 `1` 5169 ); 5170 } 5171 children[i] = { 5172 type: 12, 5173 content: child, 5174 loc: child.loc, 5175 codegenNode: createCallExpression( 5176 context.helper(CREATE_TEXT), 5177 callArgs 5178 ) 5179 }; 5180 } 5181 } 5182 }; 5183 } 5184}; 5185const seen$1 = /* @__PURE__ */ new WeakSet(); 5186const transformOnce = (node, context) => { 5187 if (node.type === 1 && findDir(node, "once", true)) { 5188 if (seen$1.has(node) || context.inVOnce || context.inSSR) { 5189 return; 5190 } 5191 seen$1.add(node); 5192 context.inVOnce = true; 5193 context.helper(SET_BLOCK_TRACKING); 5194 return () => { 5195 context.inVOnce = false; 5196 const cur = context.currentNode; 5197 if (cur.codegenNode) { 5198 cur.codegenNode = context.cache( 5199 cur.codegenNode, 5200 true, 5201 true 5202 ); 5203 } 5204 }; 5205 } 5206}; 5207const transformModel$1 = (dir, node, context) => { 5208 const { exp, arg } = dir; 5209 if (!exp) { 5210 context.onError( 5211 createCompilerError(41, dir.loc) 5212 ); 5213 return createTransformProps(); 5214 } 5215 const rawExp = exp.loc.source.trim(); 5216 const expString = exp.type === 4 ? exp.content : rawExp; 5217 const bindingType = context.bindingMetadata[rawExp]; 5218 if (bindingType === "props" || bindingType === "props-aliased") { 5219 context.onError(createCompilerError(44, exp.loc)); 5220 return createTransformProps(); 5221 } 5222 if (bindingType === "literal-const" || bindingType === "setup-const") { 5223 context.onError(createCompilerError(45, exp.loc)); 5224 return createTransformProps(); 5225 } 5226 if (!expString.trim() || !isMemberExpression(exp) && true) { 5227 context.onError( 5228 createCompilerError(42, exp.loc) 5229 ); 5230 return createTransformProps(); 5231 } 5232 const propName = arg ? arg : createSimpleExpression("modelValue", true); 5233 const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; 5234 let assignmentExp; 5235 const eventArg = context.isTS ? `($event: any)` : `$event`; 5236 { 5237 assignmentExp = createCompoundExpression([ 5238 `${eventArg} => ((`, 5239 exp, 5240 `) = $event)` 5241 ]); 5242 } 5243 const props = [ 5244 // modelValue: foo 5245 createObjectProperty(propName, dir.exp), 5246 // "onUpdate:modelValue": $event => (foo = $event) 5247 createObjectProperty(eventName, assignmentExp) 5248 ]; 5249 if (dir.modifiers.length && node.tagType === 1) { 5250 const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); 5251 const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; 5252 props.push( 5253 createObjectProperty( 5254 modifiersKey, 5255 createSimpleExpression( 5256 `{ ${modifiers} }`, 5257 false, 5258 dir.loc, 5259 2 5260 ) 5261 ) 5262 ); 5263 } 5264 return createTransformProps(props); 5265}; 5266function createTransformProps(props = []) { 5267 return { props }; 5268} 5269const validDivisionCharRE = /[\w).+\-_$\]]/; 5270const transformFilter = (node, context) => { 5271 if (!isCompatEnabled("COMPILER_FILTERS", context)) { 5272 return; 5273 } 5274 if (node.type === 5) { 5275 rewriteFilter(node.content, context); 5276 } else if (node.type === 1) { 5277 node.props.forEach((prop) => { 5278 if (prop.type === 7 && prop.name !== "for" && prop.exp) { 5279 rewriteFilter(prop.exp, context); 5280 } 5281 }); 5282 } 5283}; 5284function rewriteFilter(node, context) { 5285 if (node.type === 4) { 5286 parseFilter(node, context); 5287 } else { 5288 for (let i = 0; i < node.children.length; i++) { 5289 const child = node.children[i]; 5290 if (typeof child !== "object") continue; 5291 if (child.type === 4) { 5292 parseFilter(child, context); 5293 } else if (child.type === 8) { 5294 rewriteFilter(node, context); 5295 } else if (child.type === 5) { 5296 rewriteFilter(child.content, context); 5297 } 5298 } 5299 } 5300} 5301function parseFilter(node, context) { 5302 const exp = node.content; 5303 let inSingle = false; 5304 let inDouble = false; 5305 let inTemplateString = false; 5306 let inRegex = false; 5307 let curly = 0; 5308 let square = 0; 5309 let paren = 0; 5310 let lastFilterIndex = 0; 5311 let c, prev, i, expression, filters = []; 5312 for (i = 0; i < exp.length; i++) { 5313 prev = c; 5314 c = exp.charCodeAt(i); 5315 if (inSingle) { 5316 if (c === 39 && prev !== 92) inSingle = false; 5317 } else if (inDouble) { 5318 if (c === 34 && prev !== 92) inDouble = false; 5319 } else if (inTemplateString) { 5320 if (c === 96 && prev !== 92) inTemplateString = false; 5321 } else if (inRegex) { 5322 if (c === 47 && prev !== 92) inRegex = false; 5323 } else if (c === 124 && // pipe 5324 exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { 5325 if (expression === void 0) { 5326 lastFilterIndex = i + 1; 5327 expression = exp.slice(0, i).trim(); 5328 } else { 5329 pushFilter(); 5330 } 5331 } else { 5332 switch (c) { 5333 case 34: 5334 inDouble = true; 5335 break; 5336 // " 5337 case 39: 5338 inSingle = true; 5339 break; 5340 // ' 5341 case 96: 5342 inTemplateString = true; 5343 break; 5344 // ` 5345 case 40: 5346 paren++; 5347 break; 5348 // ( 5349 case 41: 5350 paren--; 5351 break; 5352 // ) 5353 case 91: 5354 square++; 5355 break; 5356 // [ 5357 case 93: 5358 square--; 5359 break; 5360 // ] 5361 case 123: 5362 curly++; 5363 break; 5364 // { 5365 case 125: 5366 curly--; 5367 break; 5368 } 5369 if (c === 47) { 5370 let j = i - 1; 5371 let p; 5372 for (; j >= 0; j--) { 5373 p = exp.charAt(j); 5374 if (p !== " ") break; 5375 } 5376 if (!p || !validDivisionCharRE.test(p)) { 5377 inRegex = true; 5378 } 5379 } 5380 } 5381 } 5382 if (expression === void 0) { 5383 expression = exp.slice(0, i).trim(); 5384 } else if (lastFilterIndex !== 0) { 5385 pushFilter(); 5386 } 5387 function pushFilter() { 5388 filters.push(exp.slice(lastFilterIndex, i).trim()); 5389 lastFilterIndex = i + 1; 5390 } 5391 if (filters.length) { 5392 for (i = 0; i < filters.length; i++) { 5393 expression = wrapFilter(expression, filters[i], context); 5394 } 5395 node.content = expression; 5396 node.ast = void 0; 5397 } 5398} 5399function wrapFilter(exp, filter, context) { 5400 context.helper(RESOLVE_FILTER); 5401 const i = filter.indexOf("("); 5402 if (i < 0) { 5403 context.filters.add(filter); 5404 return `${toValidAssetId(filter, "filter")}(${exp})`; 5405 } else { 5406 const name = filter.slice(0, i); 5407 const args = filter.slice(i + 1); 5408 context.filters.add(name); 5409 return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; 5410 } 5411} 5412const seen = /* @__PURE__ */ new WeakSet(); 5413const transformMemo = (node, context) => { 5414 if (node.type === 1) { 5415 const dir = findDir(node, "memo"); 5416 if (!dir || seen.has(node) || context.inSSR) { 5417 return; 5418 } 5419 seen.add(node); 5420 return () => { 5421 const codegenNode = node.codegenNode || context.currentNode.codegenNode; 5422 if (codegenNode && codegenNode.type === 13) { 5423 if (node.tagType !== 1) { 5424 convertToBlock(codegenNode, context); 5425 } 5426 node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ 5427 dir.exp, 5428 createFunctionExpression(void 0, codegenNode), 5429 `_cache`, 5430 String(context.cached.length) 5431 ]); 5432 context.cached.push(null); 5433 } 5434 }; 5435 } 5436}; 5437const transformVBindShorthand = (node, context) => { 5438 if (node.type === 1) { 5439 for (const prop of node.props) { 5440 if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser 5441 prop.exp.type === 4 && !prop.exp.content.trim()) && prop.arg) { 5442 const arg = prop.arg; 5443 if (arg.type !== 4 || !arg.isStatic) { 5444 context.onError( 5445 createCompilerError( 5446 53, 5447 arg.loc 5448 ) 5449 ); 5450 prop.exp = createSimpleExpression("", true, arg.loc); 5451 } else { 5452 const propName = camelize(arg.content); 5453 if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424 5454 propName[0] === "-") { 5455 prop.exp = createSimpleExpression(propName, false, arg.loc); 5456 } 5457 } 5458 } 5459 } 5460 } 5461}; 5462function getBaseTransformPreset(prefixIdentifiers) { 5463 return [ 5464 [ 5465 transformVBindShorthand, 5466 transformOnce, 5467 transformIf, 5468 transformMemo, 5469 transformFor, 5470 ...[transformFilter], 5471 ...[], 5472 transformSlotOutlet, 5473 transformElement, 5474 trackSlotScopes, 5475 transformText 5476 ], 5477 {
vendor: 5,729 bytes, lines 5478-5679
5478 on: transformOn$1, 5479 bind: transformBind, 5480 model: transformModel$1 5481 } 5482 ]; 5483} 5484function baseCompile(source, options = {}) { 5485 const onError = options.onError || defaultOnError; 5486 const isModuleMode = options.mode === "module"; 5487 { 5488 if (options.prefixIdentifiers === true) { 5489 onError(createCompilerError(48)); 5490 } else if (isModuleMode) { 5491 onError(createCompilerError(49)); 5492 } 5493 } 5494 const prefixIdentifiers = false; 5495 if (options.cacheHandlers) { 5496 onError(createCompilerError(50)); 5497 } 5498 if (options.scopeId && !isModuleMode) { 5499 onError(createCompilerError(51)); 5500 } 5501 const resolvedOptions = extend({}, options, { 5502 prefixIdentifiers 5503 }); 5504 const ast = isString(source) ? baseParse(source, resolvedOptions) : source; 5505 const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); 5506 transform( 5507 ast, 5508 extend({}, resolvedOptions, { 5509 nodeTransforms: [ 5510 ...nodeTransforms, 5511 ...options.nodeTransforms || [] 5512 // user transforms 5513 ], 5514 directiveTransforms: extend( 5515 {}, 5516 directiveTransforms, 5517 options.directiveTransforms || {} 5518 // user transforms 5519 ) 5520 }) 5521 ); 5522 return generate(ast, resolvedOptions); 5523} 5524const BindingTypes = { 5525 "DATA": "data", 5526 "PROPS": "props", 5527 "PROPS_ALIASED": "props-aliased", 5528 "SETUP_LET": "setup-let", 5529 "SETUP_CONST": "setup-const", 5530 "SETUP_REACTIVE_CONST": "setup-reactive-const", 5531 "SETUP_MAYBE_REF": "setup-maybe-ref", 5532 "SETUP_REF": "setup-ref", 5533 "OPTIONS": "options", 5534 "LITERAL_CONST": "literal-const" 5535}; 5536const noopDirectiveTransform = () => ({ props: [] }); 5537const V_MODEL_RADIO = /* @__PURE__ */ Symbol(``); 5538const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol( 5539 `` 5540); 5541const V_MODEL_TEXT = /* @__PURE__ */ Symbol(``); 5542const V_MODEL_SELECT = /* @__PURE__ */ Symbol( 5543 `` 5544); 5545const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol( 5546 `` 5547); 5548const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol( 5549 `` 5550); 5551const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol( 5552 `` 5553); 5554const V_SHOW = /* @__PURE__ */ Symbol(``); 5555const TRANSITION = /* @__PURE__ */ Symbol(``); 5556const TRANSITION_GROUP = /* @__PURE__ */ Symbol( 5557 `` 5558); 5559registerRuntimeHelpers({ 5560 [V_MODEL_RADIO]: `vModelRadio`, 5561 [V_MODEL_CHECKBOX]: `vModelCheckbox`, 5562 [V_MODEL_TEXT]: `vModelText`, 5563 [V_MODEL_SELECT]: `vModelSelect`, 5564 [V_MODEL_DYNAMIC]: `vModelDynamic`, 5565 [V_ON_WITH_MODIFIERS]: `withModifiers`, 5566 [V_ON_WITH_KEYS]: `withKeys`, 5567 [V_SHOW]: `vShow`, 5568 [TRANSITION]: `Transition`, 5569 [TRANSITION_GROUP]: `TransitionGroup` 5570}); 5571let decoder; 5572function decodeHtmlBrowser(raw, asAttr = false) { 5573 if (!decoder) { 5574 decoder = document.createElement("div"); 5575 } 5576 if (asAttr) { 5577 decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; 5578 return decoder.children[0].getAttribute("foo"); 5579 } else { 5580 decoder.innerHTML = raw; 5581 return decoder.textContent; 5582 } 5583} 5584const parserOptions = { 5585 parseMode: "html", 5586 isVoidTag, 5587 isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), 5588 isPreTag: (tag) => tag === "pre", 5589 isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea", 5590 decodeEntities: decodeHtmlBrowser, 5591 isBuiltInComponent: (tag) => { 5592 if (tag === "Transition" || tag === "transition") { 5593 return TRANSITION; 5594 } else if (tag === "TransitionGroup" || tag === "transition-group") { 5595 return TRANSITION_GROUP; 5596 } 5597 }, 5598 // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher 5599 getNamespace(tag, parent, rootNamespace) { 5600 let ns = parent ? parent.ns : rootNamespace; 5601 if (parent && ns === 2) { 5602 if (parent.tag === "annotation-xml") { 5603 if (tag === "svg") { 5604 return 1; 5605 } 5606 if (parent.props.some( 5607 (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") 5608 )) { 5609 ns = 0; 5610 } 5611 } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { 5612 ns = 0; 5613 } 5614 } else if (parent && ns === 1) { 5615 if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { 5616 ns = 0; 5617 } 5618 } 5619 if (ns === 0) { 5620 if (tag === "svg") { 5621 return 1; 5622 } 5623 if (tag === "math") { 5624 return 2; 5625 } 5626 } 5627 return ns; 5628 } 5629}; 5630const transformStyle = (node) => { 5631 if (node.type === 1) { 5632 node.props.forEach((p, i) => { 5633 if (p.type === 6 && p.name === "style" && p.value) { 5634 node.props[i] = { 5635 type: 7, 5636 name: `bind`, 5637 arg: createSimpleExpression(`style`, true, p.loc), 5638 exp: parseInlineCSS(p.value.content, p.loc), 5639 modifiers: [], 5640 loc: p.loc 5641 }; 5642 } 5643 }); 5644 } 5645}; 5646const parseInlineCSS = (cssText, loc) => { 5647 const normalized = parseStringStyle(cssText); 5648 return createSimpleExpression( 5649 JSON.stringify(normalized), 5650 false, 5651 loc, 5652 3 5653 ); 5654}; 5655function createDOMCompilerError(code, loc) { 5656 return createCompilerError( 5657 code, 5658 loc 5659 ); 5660} 5661const DOMErrorCodes = { 5662 "X_V_HTML_NO_EXPRESSION": 54, 5663 "54": "X_V_HTML_NO_EXPRESSION", 5664 "X_V_HTML_WITH_CHILDREN": 55, 5665 "55": "X_V_HTML_WITH_CHILDREN", 5666 "X_V_TEXT_NO_EXPRESSION": 56, 5667 "56": "X_V_TEXT_NO_EXPRESSION", 5668 "X_V_TEXT_WITH_CHILDREN": 57, 5669 "57": "X_V_TEXT_WITH_CHILDREN", 5670 "X_V_MODEL_ON_INVALID_ELEMENT": 58, 5671 "58": "X_V_MODEL_ON_INVALID_ELEMENT", 5672 "X_V_MODEL_ARG_ON_ELEMENT": 59, 5673 "59": "X_V_MODEL_ARG_ON_ELEMENT", 5674 "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60, 5675 "60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", 5676 "X_V_MODEL_UNNECESSARY_VALUE": 61, 5677 "61": "X_V_MODEL_UNNECESSARY_VALUE", 5678 "X_V_SHOW_NO_EXPRESSION": 62, 5679 "62": "X_V_SHOW_NO_EXPRESSION",
vendor: 8,515 bytes, lines 5680-5957
5680 "X_TRANSITION_INVALID_CHILDREN": 63, 5681 "63": "X_TRANSITION_INVALID_CHILDREN", 5682 "X_IGNORED_SIDE_EFFECT_TAG": 64, 5683 "64": "X_IGNORED_SIDE_EFFECT_TAG", 5684 "__EXTEND_POINT__": 65, 5685 "65": "__EXTEND_POINT__" 5686}; 5687const DOMErrorMessages = { 5688 [54]: `v-html is missing expression.`, 5689 [55]: `v-html will override element children.`, 5690 [56]: `v-text is missing expression.`, 5691 [57]: `v-text will override element children.`, 5692 [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`, 5693 [59]: `v-model argument is not supported on plain elements.`, 5694 [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, 5695 [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, 5696 [62]: `v-show is missing expression.`, 5697 [63]: `<Transition> expects exactly one child element or component.`, 5698 [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` 5699}; 5700const transformVHtml = (dir, node, context) => { 5701 const { exp, loc } = dir; 5702 if (!exp) { 5703 context.onError( 5704 createDOMCompilerError(54, loc) 5705 ); 5706 } 5707 if (node.children.length) { 5708 context.onError( 5709 createDOMCompilerError(55, loc) 5710 ); 5711 node.children.length = 0; 5712 } 5713 return { 5714 props: [ 5715 createObjectProperty( 5716 createSimpleExpression(`innerHTML`, true, loc), 5717 exp || createSimpleExpression("", true) 5718 ) 5719 ] 5720 }; 5721}; 5722const transformVText = (dir, node, context) => { 5723 const { exp, loc } = dir; 5724 if (!exp) { 5725 context.onError( 5726 createDOMCompilerError(56, loc) 5727 ); 5728 } 5729 if (node.children.length) { 5730 context.onError( 5731 createDOMCompilerError(57, loc) 5732 ); 5733 node.children.length = 0; 5734 } 5735 return { 5736 props: [ 5737 createObjectProperty( 5738 createSimpleExpression(`textContent`, true), 5739 exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( 5740 context.helperString(TO_DISPLAY_STRING), 5741 [exp], 5742 loc 5743 ) : createSimpleExpression("", true) 5744 ) 5745 ] 5746 }; 5747}; 5748const transformModel = (dir, node, context) => { 5749 const baseResult = transformModel$1(dir, node, context); 5750 if (!baseResult.props.length || node.tagType === 1) { 5751 return baseResult; 5752 } 5753 if (dir.arg) { 5754 context.onError( 5755 createDOMCompilerError( 5756 59, 5757 dir.arg.loc 5758 ) 5759 ); 5760 } 5761 const { tag } = node; 5762 const isCustomElement = context.isCustomElement(tag); 5763 if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { 5764 let directiveToUse = V_MODEL_TEXT; 5765 let isInvalidType = false; 5766 if (tag === "input" || isCustomElement) { 5767 const type = findProp(node, `type`); 5768 if (type) { 5769 if (type.type === 7) { 5770 directiveToUse = V_MODEL_DYNAMIC; 5771 } else if (type.value) { 5772 switch (type.value.content) { 5773 case "radio": 5774 directiveToUse = V_MODEL_RADIO; 5775 break; 5776 case "checkbox": 5777 directiveToUse = V_MODEL_CHECKBOX; 5778 break; 5779 case "file": 5780 isInvalidType = true; 5781 context.onError( 5782 createDOMCompilerError( 5783 60, 5784 dir.loc 5785 ) 5786 ); 5787 break; 5788 } 5789 } 5790 } else if (hasDynamicKeyVBind(node)) { 5791 directiveToUse = V_MODEL_DYNAMIC; 5792 } else ; 5793 } else if (tag === "select") { 5794 directiveToUse = V_MODEL_SELECT; 5795 } else ; 5796 if (!isInvalidType) { 5797 baseResult.needRuntime = context.helper(directiveToUse); 5798 } 5799 } else { 5800 context.onError( 5801 createDOMCompilerError( 5802 58, 5803 dir.loc 5804 ) 5805 ); 5806 } 5807 baseResult.props = baseResult.props.filter( 5808 (p) => !(p.key.type === 4 && p.key.content === "modelValue") 5809 ); 5810 return baseResult; 5811}; 5812const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); 5813const isNonKeyModifier = /* @__PURE__ */ makeMap( 5814 // event propagation management 5815 `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` 5816); 5817const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); 5818const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`); 5819const resolveModifiers = (key, modifiers, context, loc) => { 5820 const keyModifiers = []; 5821 const nonKeyModifiers = []; 5822 const eventOptionModifiers = []; 5823 for (let i = 0; i < modifiers.length; i++) { 5824 const modifier = modifiers[i].content; 5825 if (modifier === "native" && checkCompatEnabled( 5826 "COMPILER_V_ON_NATIVE", 5827 context 5828 )) { 5829 eventOptionModifiers.push(modifier); 5830 } else if (isEventOptionModifier(modifier)) { 5831 eventOptionModifiers.push(modifier); 5832 } else { 5833 if (maybeKeyModifier(modifier)) { 5834 if (isStaticExp(key)) { 5835 if (isKeyboardEvent(key.content.toLowerCase())) { 5836 keyModifiers.push(modifier); 5837 } else { 5838 nonKeyModifiers.push(modifier); 5839 } 5840 } else { 5841 keyModifiers.push(modifier); 5842 nonKeyModifiers.push(modifier); 5843 } 5844 } else { 5845 if (isNonKeyModifier(modifier)) { 5846 nonKeyModifiers.push(modifier); 5847 } else { 5848 keyModifiers.push(modifier); 5849 } 5850 } 5851 } 5852 } 5853 return { 5854 keyModifiers, 5855 nonKeyModifiers, 5856 eventOptionModifiers 5857 }; 5858}; 5859const transformClick = (key, event) => { 5860 const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; 5861 return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ 5862 `(`, 5863 key, 5864 `) === "onClick" ? "${event}" : (`, 5865 key, 5866 `)` 5867 ]) : key; 5868}; 5869const transformOn = (dir, node, context) => { 5870 return transformOn$1(dir, node, context, (baseResult) => { 5871 const { modifiers } = dir; 5872 if (!modifiers.length) return baseResult; 5873 let { key, value: handlerExp } = baseResult.props[0]; 5874 const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); 5875 if (nonKeyModifiers.includes("right")) { 5876 key = transformClick(key, `onContextmenu`); 5877 } 5878 if (nonKeyModifiers.includes("middle")) { 5879 key = transformClick(key, `onMouseup`); 5880 } 5881 if (nonKeyModifiers.length) { 5882 handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ 5883 handlerExp, 5884 JSON.stringify(nonKeyModifiers) 5885 ]); 5886 } 5887 if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard 5888 (!isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) { 5889 handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ 5890 handlerExp, 5891 JSON.stringify(keyModifiers) 5892 ]); 5893 } 5894 if (eventOptionModifiers.length) { 5895 const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); 5896 key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); 5897 } 5898 return { 5899 props: [createObjectProperty(key, handlerExp)] 5900 }; 5901 }); 5902}; 5903const transformShow = (dir, node, context) => { 5904 const { exp, loc } = dir; 5905 if (!exp) { 5906 context.onError( 5907 createDOMCompilerError(62, loc) 5908 ); 5909 } 5910 return { 5911 props: [], 5912 needRuntime: context.helper(V_SHOW) 5913 }; 5914}; 5915const ignoreSideEffectTags = (node, context) => { 5916 if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { 5917 context.removeNode(); 5918 } 5919}; 5920const DOMNodeTransforms = [ 5921 transformStyle, 5922 ...[] 5923]; 5924const DOMDirectiveTransforms = { 5925 cloak: noopDirectiveTransform, 5926 html: transformVHtml, 5927 text: transformVText, 5928 model: transformModel, 5929 // override compiler-core 5930 on: transformOn, 5931 // override compiler-core 5932 show: transformShow 5933}; 5934function compile(src, options = {}) { 5935 return baseCompile( 5936 src, 5937 extend({}, parserOptions, options, { 5938 nodeTransforms: [ 5939 // ignore <script> and <tag> 5940 // this is not put inside DOMNodeTransforms because that list is used 5941 // by compiler-ssr to generate vnode fallback branches 5942 ignoreSideEffectTags, 5943 ...DOMNodeTransforms, 5944 ...options.nodeTransforms || [] 5945 ], 5946 directiveTransforms: extend( 5947 {}, 5948 DOMDirectiveTransforms, 5949 options.directiveTransforms || {} 5950 ), 5951 transformHoist: null 5952 }) 5953 ); 5954} 5955function parse(template, options = {}) { 5956 return baseParse(template, extend({}, parserOptions, options)); 5957}
5958const compilerDom_esmBundler = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ 5959 __proto__: null, 5960 BASE_TRANSITION, 5961 BindingTypes, 5962 CAMELIZE, 5963 CAPITALIZE, 5964 CREATE_BLOCK, 5965 CREATE_COMMENT, 5966 CREATE_ELEMENT_BLOCK, 5967 CREATE_ELEMENT_VNODE, 5968 CREATE_SLOTS, 5969 CREATE_STATIC, 5970 CREATE_TEXT, 5971 CREATE_VNODE, 5972 CompilerDeprecationTypes, 5973 ConstantTypes, 5974 DOMDirectiveTransforms, 5975 DOMErrorCodes, 5976 DOMErrorMessages, 5977 DOMNodeTransforms, 5978 ElementTypes, 5979 ErrorCodes, 5980 FRAGMENT, 5981 GUARD_REACTIVE_PROPS, 5982 IS_MEMO_SAME, 5983 IS_REF, 5984 KEEP_ALIVE, 5985 MERGE_PROPS, 5986 NORMALIZE_CLASS, 5987 NORMALIZE_PROPS, 5988 NORMALIZE_STYLE, 5989 Namespaces, 5990 NodeTypes, 5991 OPEN_BLOCK, 5992 POP_SCOPE_ID, 5993 PUSH_SCOPE_ID, 5994 RENDER_LIST, 5995 RENDER_SLOT, 5996 RESOLVE_COMPONENT, 5997 RESOLVE_DIRECTIVE, 5998 RESOLVE_DYNAMIC_COMPONENT, 5999 RESOLVE_FILTER, 6000 SET_BLOCK_TRACKING, 6001 SUSPENSE, 6002 TELEPORT, 6003 TO_DISPLAY_STRING, 6004 TO_HANDLERS, 6005 TO_HANDLER_KEY, 6006 TRANSITION, 6007 TRANSITION_GROUP, 6008 TS_NODE_TYPES, 6009 UNREF, 6010 V_MODEL_CHECKBOX, 6011 V_MODEL_DYNAMIC, 6012 V_MODEL_RADIO, 6013 V_MODEL_SELECT, 6014 V_MODEL_TEXT, 6015 V_ON_WITH_KEYS, 6016 V_ON_WITH_MODIFIERS, 6017 V_SHOW, 6018 WITH_CTX, 6019 WITH_DIRECTIVES, 6020 WITH_MEMO, 6021 advancePositionWithClone, 6022 advancePositionWithMutation, 6023 assert, 6024 baseCompile, 6025 baseParse, 6026 buildDirectiveArgs, 6027 buildProps, 6028 buildSlots, 6029 checkCompatEnabled, 6030 compile, 6031 convertToBlock, 6032 createArrayExpression, 6033 createAssignmentExpression, 6034 createBlockStatement, 6035 createCacheExpression, 6036 createCallExpression, 6037 createCompilerError, 6038 createCompoundExpression, 6039 createConditionalExpression, 6040 createDOMCompilerError, 6041 createForLoopParams, 6042 createFunctionExpression, 6043 createIfStatement, 6044 createInterpolation, 6045 createObjectExpression, 6046 createObjectProperty, 6047 createReturnStatement, 6048 createRoot, 6049 createSequenceExpression, 6050 createSimpleExpression, 6051 createStructuralDirectiveTransform, 6052 createTemplateLiteral, 6053 createTransformContext, 6054 createVNodeCall, 6055 errorMessages, 6056 extractIdentifiers, 6057 findDir, 6058 findProp, 6059 forAliasRE, 6060 generate, 6061 generateCodeFrame, 6062 getBaseTransformPreset, 6063 getConstantType, 6064 getMemoedVNodeCall, 6065 getVNodeBlockHelper, 6066 getVNodeHelper, 6067 hasDynamicKeyVBind, 6068 hasScopeRef, 6069 helperNameMap, 6070 injectProp, 6071 isAllWhitespace, 6072 isCommentOrWhitespace, 6073 isCoreComponent, 6074 isFnExpression, 6075 isFnExpressionBrowser, 6076 isFnExpressionNode, 6077 isFunctionType, 6078 isInDestructureAssignment, 6079 isInNewExpression, 6080 isMemberExpression, 6081 isMemberExpressionBrowser, 6082 isMemberExpressionNode, 6083 isReferencedIdentifier, 6084 isSimpleIdentifier, 6085 isSlotOutlet, 6086 isStaticArgOf, 6087 isStaticExp, 6088 isStaticProperty, 6089 isStaticPropertyKey, 6090 isTemplateNode, 6091 isText: isText$1, 6092 isVPre, 6093 isVSlot, 6094 isWhitespaceText, 6095 locStub, 6096 noopDirectiveTransform, 6097 parse, 6098 parserOptions, 6099 processExpression, 6100 processFor, 6101 processIf, 6102 processSlotOutlet, 6103 registerRuntimeHelpers, 6104 resolveComponentType, 6105 stringifyExpression, 6106 toValidAssetId, 6107 trackSlotScopes, 6108 trackVForSlotScopes, 6109 transform, 6110 transformBind, 6111 transformElement, 6112 transformExpression, 6113 transformModel: transformModel$1, 6114 transformOn: transformOn$1, 6115 transformStyle, 6116 transformVBindShorthand, 6117 traverseNode, 6118 unwrapTSNode, 6119 validFirstIdentCharRE, 6120 walkBlockDeclarations, 6121 walkFunctionParams, 6122 walkIdentifiers, 6123 warnDeprecation 6124}, Symbol.toStringTag, { value: "Module" })); 6125const require$$0 = /* @__PURE__ */ getAugmentedNamespace(compilerDom_esmBundler); 6126const require$$1 = /* @__PURE__ */ getAugmentedNamespace(runtimeDom_esmBundler); 6127const require$$2 = /* @__PURE__ */ getAugmentedNamespace(shared_esmBundler); 6128var hasRequiredVue_cjs_prod; 6129function requireVue_cjs_prod() { 6130 if (hasRequiredVue_cjs_prod) return vue_cjs_prod; 6131 hasRequiredVue_cjs_prod = 1; 6132 (function(exports$1) { 6133 Object.defineProperty(exports$1, "__esModule", { value: true }); 6134 var compilerDom = require$$0; 6135 var runtimeDom = require$$1; 6136 var shared = require$$2; 6137 function _interopNamespaceDefault(e) { 6138 var n = /* @__PURE__ */ Object.create(null); 6139 if (e) { 6140 for (var k in e) { 6141 n[k] = e[k]; 6142 } 6143 } 6144 n.default = e; 6145 return Object.freeze(n); 6146 } 6147 var runtimeDom__namespace = /* @__PURE__ */ _interopNamespaceDefault(runtimeDom); 6148 const compileCache = /* @__PURE__ */ Object.create(null); 6149 function compileToFunction(template, options) { 6150 if (!shared.isString(template)) { 6151 if (template.nodeType) { 6152 template = template.innerHTML; 6153 } else { 6154 return shared.NOOP; 6155 } 6156 }
6157 const key = shared.genCacheKey(template, options); 6158 const cached = compileCache[key]; 6159 if (cached) { 6160 return cached; 6161 } 6162 if (template[0] === "#") { 6163 const el = document.querySelector(template); 6164 template = el ? el.innerHTML : ``; 6165 } 6166 const opts = shared.extend( 6167 { 6168 hoistStatic: true, 6169 onError: void 0, 6170 onWarn: shared.NOOP 6171 }, 6172 options 6173 ); 6174 if (!opts.isCustomElement && typeof customElements !== "undefined") { 6175 opts.isCustomElement = (tag) => !!customElements.get(tag); 6176 } 6177 const { code } = compilerDom.compile(template, opts); 6178 const render = new Function("Vue", code)(runtimeDom__namespace); 6179 render._rc = true; 6180 return compileCache[key] = render; 6181 } 6182 runtimeDom.registerRuntimeCompiler(compileToFunction); 6183 exports$1.compile = compileToFunction; 6184 Object.keys(runtimeDom).forEach(function(k) { 6185 if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, k)) exports$1[k] = runtimeDom[k]; 6186 }); 6187 })(vue_cjs_prod); 6188 return vue_cjs_prod; 6189} 6190var hasRequiredVue; 6191function requireVue() { 6192 if (hasRequiredVue) return vue.exports; 6193 hasRequiredVue = 1; 6194 { 6195 vue.exports = requireVue_cjs_prod(); 6196 } 6197 return vue.exports; 6198} 6199var hasRequiredLightGalleryVue_common; 6200function requireLightGalleryVue_common() { 6201 if (hasRequiredLightGalleryVue_common) return LightGalleryVue_common.exports; 6202 hasRequiredLightGalleryVue_common = 1; 6203 (function(module) { 6204 module.exports = /******/ 6205 (function(modules) { 6206 var installedModules = {}; 6207 function __webpack_require__(moduleId) { 6208 if (installedModules[moduleId]) { 6209 return installedModules[moduleId].exports; 6210 } 6211 var module2 = installedModules[moduleId] = { 6212 /******/ 6213 i: moduleId, 6214 /******/ 6215 l: false, 6216 /******/ 6217 exports: {} 6218 /******/ 6219 }; 6220 modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__); 6221 module2.l = true; 6222 return module2.exports; 6223 } 6224 __webpack_require__.m = modules; 6225 __webpack_require__.c = installedModules; 6226 __webpack_require__.d = function(exports$1, name, getter) { 6227 if (!__webpack_require__.o(exports$1, name)) { 6228 Object.defineProperty(exports$1, name, { enumerable: true, get: getter }); 6229 } 6230 }; 6231 __webpack_require__.r = function(exports$1) { 6232 if (typeof Symbol !== "undefined" && Symbol.toStringTag) { 6233 Object.defineProperty(exports$1, Symbol.toStringTag, { value: "Module" }); 6234 } 6235 Object.defineProperty(exports$1, "__esModule", { value: true }); 6236 }; 6237 __webpack_require__.t = function(value, mode) { 6238 if (mode & 1) value = __webpack_require__(value); 6239 if (mode & 8) return value; 6240 if (mode & 4 && typeof value === "object" && value && value.__esModule) return value; 6241 var ns = /* @__PURE__ */ Object.create(null); 6242 __webpack_require__.r(ns); 6243 Object.defineProperty(ns, "default", { enumerable: true, value }); 6244 if (mode & 2 && typeof value != "string") for (var key in value) __webpack_require__.d(ns, key, function(key2) { 6245 return value[key2]; 6246 }.bind(null, key)); 6247 return ns; 6248 }; 6249 __webpack_require__.n = function(module2) { 6250 var getter = module2 && module2.__esModule ? ( 6251 /******/ 6252 function getDefault() { 6253 return module2["default"]; 6254 } 6255 ) : ( 6256 /******/ 6257 function getModuleExports() { 6258 return module2; 6259 } 6260 ); 6261 __webpack_require__.d(getter, "a", getter); 6262 return getter; 6263 }; 6264 __webpack_require__.o = function(object, property) { 6265 return Object.prototype.hasOwnProperty.call(object, property); 6266 }; 6267 __webpack_require__.p = ""; 6268 return __webpack_require__(__webpack_require__.s = "fb15"); 6269 })({ 6270 /***/ 6271 "00ee": ( 6272 /***/ 6273 (function(module2, exports$1, __webpack_require__) { 6274 var wellKnownSymbol = __webpack_require__("b622"); 6275 var TO_STRING_TAG = wellKnownSymbol("toStringTag"); 6276 var test = {}; 6277 test[TO_STRING_TAG] = "z"; 6278 module2.exports = String(test) === "[object z]"; 6279 }) 6280 ), 6281 /***/ 6282 "0366": ( 6283 /***/ 6284 (function(module2, exports$1, __webpack_require__) { 6285 var aFunction = __webpack_require__("1c0b"); 6286 module2.exports = function(fn, that, length) { 6287 aFunction(fn); 6288 if (that === void 0) return fn; 6289 switch (length) { 6290 case 0: 6291 return function() {
vendor: 4,789 bytes, lines 6292-6408
6292 return fn.call(that); 6293 }; 6294 case 1: 6295 return function(a) { 6296 return fn.call(that, a); 6297 }; 6298 case 2: 6299 return function(a, b) { 6300 return fn.call(that, a, b); 6301 }; 6302 case 3: 6303 return function(a, b, c) { 6304 return fn.call(that, a, b, c); 6305 }; 6306 } 6307 return function() { 6308 return fn.apply(that, arguments); 6309 }; 6310 }; 6311 }) 6312 ), 6313 /***/ 6314 "0538": ( 6315 /***/ 6316 (function(module2, exports$1, __webpack_require__) { 6317 var aFunction = __webpack_require__("1c0b"); 6318 var isObject2 = __webpack_require__("861d"); 6319 var slice = [].slice; 6320 var factories = {}; 6321 var construct = function(C, argsLength, args) { 6322 if (!(argsLength in factories)) { 6323 for (var list = [], i = 0; i < argsLength; i++) list[i] = "a[" + i + "]"; 6324 factories[argsLength] = Function("C,a", "return new C(" + list.join(",") + ")"); 6325 } 6326 return factories[argsLength](C, args); 6327 }; 6328 module2.exports = Function.bind || function bind(that) { 6329 var fn = aFunction(this); 6330 var partArgs = slice.call(arguments, 1); 6331 var boundFunction = function bound() { 6332 var args = partArgs.concat(slice.call(arguments)); 6333 return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); 6334 }; 6335 if (isObject2(fn.prototype)) boundFunction.prototype = fn.prototype; 6336 return boundFunction; 6337 }; 6338 }) 6339 ), 6340 /***/ 6341 "057f": ( 6342 /***/ 6343 (function(module2, exports$1, __webpack_require__) { 6344 var toIndexedObject = __webpack_require__("fc6a"); 6345 var $getOwnPropertyNames = __webpack_require__("241c").f; 6346 var toString = {}.toString; 6347 var windowNames = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; 6348 var getWindowNames = function(it) { 6349 try { 6350 return $getOwnPropertyNames(it); 6351 } catch (error) { 6352 return windowNames.slice(); 6353 } 6354 }; 6355 module2.exports.f = function getOwnPropertyNames(it) { 6356 return windowNames && toString.call(it) == "[object Window]" ? getWindowNames(it) : $getOwnPropertyNames(toIndexedObject(it)); 6357 }; 6358 }) 6359 ), 6360 /***/ 6361 "06cf": ( 6362 /***/ 6363 (function(module2, exports$1, __webpack_require__) { 6364 var DESCRIPTORS = __webpack_require__("83ab"); 6365 var propertyIsEnumerableModule = __webpack_require__("d1e7"); 6366 var createPropertyDescriptor = __webpack_require__("5c6c"); 6367 var toIndexedObject = __webpack_require__("fc6a"); 6368 var toPrimitive = __webpack_require__("c04e"); 6369 var has = __webpack_require__("5135"); 6370 var IE8_DOM_DEFINE = __webpack_require__("0cfb"); 6371 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 6372 exports$1.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { 6373 O = toIndexedObject(O); 6374 P = toPrimitive(P, true); 6375 if (IE8_DOM_DEFINE) try { 6376 return $getOwnPropertyDescriptor(O, P); 6377 } catch (error) { 6378 } 6379 if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); 6380 }; 6381 }) 6382 ), 6383 /***/ 6384 "0cb2": ( 6385 /***/ 6386 (function(module2, exports$1, __webpack_require__) { 6387 var toObject = __webpack_require__("7b0b"); 6388 var floor = Math.floor; 6389 var replace = "".replace; 6390 var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; 6391 var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; 6392 module2.exports = function(matched, str, position, captures, namedCaptures, replacement) { 6393 var tailPos = position + matched.length; 6394 var m = captures.length; 6395 var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; 6396 if (namedCaptures !== void 0) { 6397 namedCaptures = toObject(namedCaptures); 6398 symbols = SUBSTITUTION_SYMBOLS; 6399 } 6400 return replace.call(replacement, symbols, function(match, ch) { 6401 var capture; 6402 switch (ch.charAt(0)) { 6403 case "$": 6404 return "$"; 6405 case "&": 6406 return matched; 6407 case "`": 6408 return str.slice(0, position);
vendor: 5,193 bytes, lines 6409-6510
6409 case "'": 6410 return str.slice(tailPos); 6411 case "<": 6412 capture = namedCaptures[ch.slice(1, -1)]; 6413 break; 6414 default: 6415 var n = +ch; 6416 if (n === 0) return match; 6417 if (n > m) { 6418 var f = floor(n / 10); 6419 if (f === 0) return match; 6420 if (f <= m) return captures[f - 1] === void 0 ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); 6421 return match; 6422 } 6423 capture = captures[n - 1]; 6424 } 6425 return capture === void 0 ? "" : capture; 6426 }); 6427 }; 6428 }) 6429 ), 6430 /***/ 6431 "0cfb": ( 6432 /***/ 6433 (function(module2, exports$1, __webpack_require__) { 6434 var DESCRIPTORS = __webpack_require__("83ab"); 6435 var fails = __webpack_require__("d039"); 6436 var createElement = __webpack_require__("cc12"); 6437 module2.exports = !DESCRIPTORS && !fails(function() { 6438 return Object.defineProperty(createElement("div"), "a", { 6439 get: function() { 6440 return 7; 6441 } 6442 }).a != 7; 6443 }); 6444 }) 6445 ), 6446 /***/ 6447 "1276": ( 6448 /***/ 6449 (function(module2, exports$1, __webpack_require__) { 6450 var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784"); 6451 var isRegExp = __webpack_require__("44e7"); 6452 var anObject = __webpack_require__("825a"); 6453 var requireObjectCoercible = __webpack_require__("1d80"); 6454 var speciesConstructor = __webpack_require__("4840"); 6455 var advanceStringIndex = __webpack_require__("8aa5"); 6456 var toLength = __webpack_require__("50c4"); 6457 var callRegExpExec = __webpack_require__("14c3"); 6458 var regexpExec = __webpack_require__("9263"); 6459 var stickyHelpers = __webpack_require__("9f7f"); 6460 var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; 6461 var arrayPush = [].push; 6462 var min = Math.min; 6463 var MAX_UINT32 = 4294967295; 6464 fixRegExpWellKnownSymbolLogic("split", 2, function(SPLIT, nativeSplit, maybeCallNative) { 6465 var internalSplit; 6466 if ("abbc".split(/(b)*/)[1] == "c" || // eslint-disable-next-line regexp/no-empty-group -- required for testing 6467 "test".split(/(?:)/, -1).length != 4 || "ab".split(/(?:ab)*/).length != 2 || ".".split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing 6468 ".".split(/()()/).length > 1 || "".split(/.?/).length) { 6469 internalSplit = function(separator, limit) { 6470 var string = String(requireObjectCoercible(this)); 6471 var lim = limit === void 0 ? MAX_UINT32 : limit >>> 0; 6472 if (lim === 0) return []; 6473 if (separator === void 0) return [string]; 6474 if (!isRegExp(separator)) { 6475 return nativeSplit.call(string, separator, lim); 6476 } 6477 var output = []; 6478 var flags = (separator.ignoreCase ? "i" : "") + (separator.multiline ? "m" : "") + (separator.unicode ? "u" : "") + (separator.sticky ? "y" : ""); 6479 var lastLastIndex = 0; 6480 var separatorCopy = new RegExp(separator.source, flags + "g"); 6481 var match, lastIndex, lastLength; 6482 while (match = regexpExec.call(separatorCopy, string)) { 6483 lastIndex = separatorCopy.lastIndex; 6484 if (lastIndex > lastLastIndex) { 6485 output.push(string.slice(lastLastIndex, match.index)); 6486 if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); 6487 lastLength = match[0].length; 6488 lastLastIndex = lastIndex; 6489 if (output.length >= lim) break; 6490 } 6491 if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; 6492 } 6493 if (lastLastIndex === string.length) { 6494 if (lastLength || !separatorCopy.test("")) output.push(""); 6495 } else output.push(string.slice(lastLastIndex)); 6496 return output.length > lim ? output.slice(0, lim) : output; 6497 }; 6498 } else if ("0".split(void 0, 0).length) { 6499 internalSplit = function(separator, limit) { 6500 return separator === void 0 && limit === 0 ? [] : nativeSplit.call(this, separator, limit); 6501 }; 6502 } else internalSplit = nativeSplit; 6503 return [ 6504 // `String.prototype.split` method 6505 // https://tc39.es/ecma262/#sec-string.prototype.split 6506 function split(separator, limit) { 6507 var O = requireObjectCoercible(this); 6508 var splitter = separator == void 0 ? void 0 : separator[SPLIT]; 6509 return splitter !== void 0 ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit); 6510 },
6511 // `RegExp.prototype[@@split]` method 6512 // https://tc39.es/ecma262/#sec-regexp.prototype-@@split 6513 // 6514 // NOTE: This cannot be properly polyfilled in engines that don't support 6515 // the 'y' flag. 6516 function(regexp, limit) { 6517 var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); 6518 if (res.done) return res.value; 6519 var rx = anObject(regexp); 6520 var S = String(this); 6521 var C = speciesConstructor(rx, RegExp); 6522 var unicodeMatching = rx.unicode; 6523 var flags = (rx.ignoreCase ? "i" : "") + (rx.multiline ? "m" : "") + (rx.unicode ? "u" : "") + (UNSUPPORTED_Y ? "g" : "y"); 6524 var splitter = new C(UNSUPPORTED_Y ? "^(?:" + rx.source + ")" : rx, flags); 6525 var lim = limit === void 0 ? MAX_UINT32 : limit >>> 0; 6526 if (lim === 0) return []; 6527 if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; 6528 var p = 0; 6529 var q = 0; 6530 var A = []; 6531 while (q < S.length) { 6532 splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; 6533 var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S); 6534 var e; 6535 if (z === null || (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p) { 6536 q = advanceStringIndex(S, q, unicodeMatching); 6537 } else { 6538 A.push(S.slice(p, q)); 6539 if (A.length === lim) return A; 6540 for (var i = 1; i <= z.length - 1; i++) { 6541 A.push(z[i]); 6542 if (A.length === lim) return A; 6543 } 6544 q = p = e; 6545 } 6546 } 6547 A.push(S.slice(p)); 6548 return A; 6549 } 6550 ]; 6551 }, UNSUPPORTED_Y); 6552 }) 6553 ), 6554 /***/ 6555 "14c3": ( 6556 /***/ 6557 (function(module2, exports$1, __webpack_require__) { 6558 var classof = __webpack_require__("c6b6"); 6559 var regexpExec = __webpack_require__("9263"); 6560 module2.exports = function(R, S) { 6561 var exec = R.exec; 6562 if (typeof exec === "function") { 6563 var result = exec.call(R, S); 6564 if (typeof result !== "object") { 6565 throw TypeError("RegExp exec method returned something other than an Object or null"); 6566 } 6567 return result; 6568 } 6569 if (classof(R) !== "RegExp") { 6570 throw TypeError("RegExp#exec called on incompatible receiver"); 6571 } 6572 return regexpExec.call(R, S); 6573 }; 6574 }) 6575 ), 6576 /***/ 6577 "159b": ( 6578 /***/ 6579 (function(module2, exports$1, __webpack_require__) { 6580 var global = __webpack_require__("da84"); 6581 var DOMIterables = __webpack_require__("fdbc"); 6582 var forEach = __webpack_require__("17c2"); 6583 var createNonEnumerableProperty = __webpack_require__("9112"); 6584 for (var COLLECTION_NAME in DOMIterables) { 6585 var Collection = global[COLLECTION_NAME]; 6586 var CollectionPrototype = Collection && Collection.prototype; 6587 if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { 6588 createNonEnumerableProperty(CollectionPrototype, "forEach", forEach); 6589 } catch (error) { 6590 CollectionPrototype.forEach = forEach; 6591 } 6592 } 6593 }) 6594 ), 6595 /***/ 6596 "17c2": ( 6597 /***/ 6598 (function(module2, exports$1, __webpack_require__) { 6599 var $forEach = __webpack_require__("b727").forEach; 6600 var arrayMethodIsStrict = __webpack_require__("a640"); 6601 var STRICT_METHOD = arrayMethodIsStrict("forEach"); 6602 module2.exports = !STRICT_METHOD ? function forEach(callbackfn) { 6603 return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : void 0); 6604 } : [].forEach; 6605 }) 6606 ), 6607 /***/ 6608 "19aa": ( 6609 /***/ 6610 (function(module2, exports$1) { 6611 module2.exports = function(it, Constructor, name) { 6612 if (!(it instanceof Constructor)) { 6613 throw TypeError("Incorrect " + (name ? name + " " : "") + "invocation"); 6614 } 6615 return it; 6616 }; 6617 }) 6618 ), 6619 /***/ 6620 "1be4": ( 6621 /***/ 6622 (function(module2, exports$1, __webpack_require__) { 6623 var getBuiltIn = __webpack_require__("d066"); 6624 module2.exports = getBuiltIn("document", "documentElement"); 6625 }) 6626 ), 6627 /***/ 6628 "1c0b": ( 6629 /***/ 6630 (function(module2, exports$1) { 6631 module2.exports = function(it) { 6632 if (typeof it != "function") { 6633 throw TypeError(String(it) + " is not a function"); 6634 } 6635 return it; 6636 }; 6637 }) 6638 ), 6639 /***/ 6640 "1c7e": ( 6641 /***/ 6642 (function(module2, exports$1, __webpack_require__) { 6643 var wellKnownSymbol = __webpack_require__("b622"); 6644 var ITERATOR = wellKnownSymbol("iterator"); 6645 var SAFE_CLOSING = false;
vendor: 8,270 bytes, lines 6646-6858
6646 try { 6647 var called = 0; 6648 var iteratorWithReturn = { 6649 next: function() { 6650 return { done: !!called++ }; 6651 }, 6652 "return": function() { 6653 SAFE_CLOSING = true; 6654 } 6655 }; 6656 iteratorWithReturn[ITERATOR] = function() { 6657 return this; 6658 }; 6659 Array.from(iteratorWithReturn, function() { 6660 throw 2; 6661 }); 6662 } catch (error) { 6663 } 6664 module2.exports = function(exec, SKIP_CLOSING) { 6665 if (!SKIP_CLOSING && !SAFE_CLOSING) return false; 6666 var ITERATION_SUPPORT = false; 6667 try { 6668 var object = {}; 6669 object[ITERATOR] = function() { 6670 return { 6671 next: function() { 6672 return { done: ITERATION_SUPPORT = true }; 6673 } 6674 }; 6675 }; 6676 exec(object); 6677 } catch (error) { 6678 } 6679 return ITERATION_SUPPORT; 6680 }; 6681 }) 6682 ), 6683 /***/ 6684 "1cdc": ( 6685 /***/ 6686 (function(module2, exports$1, __webpack_require__) { 6687 var userAgent = __webpack_require__("342f"); 6688 module2.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent); 6689 }) 6690 ), 6691 /***/ 6692 "1d80": ( 6693 /***/ 6694 (function(module2, exports$1) { 6695 module2.exports = function(it) { 6696 if (it == void 0) throw TypeError("Can't call method on " + it); 6697 return it; 6698 }; 6699 }) 6700 ), 6701 /***/ 6702 "1dde": ( 6703 /***/ 6704 (function(module2, exports$1, __webpack_require__) { 6705 var fails = __webpack_require__("d039"); 6706 var wellKnownSymbol = __webpack_require__("b622"); 6707 var V8_VERSION = __webpack_require__("2d00"); 6708 var SPECIES = wellKnownSymbol("species"); 6709 module2.exports = function(METHOD_NAME) { 6710 return V8_VERSION >= 51 || !fails(function() { 6711 var array = []; 6712 var constructor = array.constructor = {}; 6713 constructor[SPECIES] = function() { 6714 return { foo: 1 }; 6715 }; 6716 return array[METHOD_NAME](Boolean).foo !== 1; 6717 }); 6718 }; 6719 }) 6720 ), 6721 /***/ 6722 "2266": ( 6723 /***/ 6724 (function(module2, exports$1, __webpack_require__) { 6725 var anObject = __webpack_require__("825a"); 6726 var isArrayIteratorMethod = __webpack_require__("e95a"); 6727 var toLength = __webpack_require__("50c4"); 6728 var bind = __webpack_require__("0366"); 6729 var getIteratorMethod = __webpack_require__("35a1"); 6730 var iteratorClose = __webpack_require__("2a62"); 6731 var Result = function(stopped, result) { 6732 this.stopped = stopped; 6733 this.result = result; 6734 }; 6735 module2.exports = function(iterable, unboundFunction, options) { 6736 var that = options && options.that; 6737 var AS_ENTRIES = !!(options && options.AS_ENTRIES); 6738 var IS_ITERATOR = !!(options && options.IS_ITERATOR); 6739 var INTERRUPTED = !!(options && options.INTERRUPTED); 6740 var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED); 6741 var iterator, iterFn, index, length, result, next, step; 6742 var stop = function(condition) { 6743 if (iterator) iteratorClose(iterator); 6744 return new Result(true, condition); 6745 }; 6746 var callFn = function(value) { 6747 if (AS_ENTRIES) { 6748 anObject(value); 6749 return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); 6750 } 6751 return INTERRUPTED ? fn(value, stop) : fn(value); 6752 }; 6753 if (IS_ITERATOR) { 6754 iterator = iterable; 6755 } else { 6756 iterFn = getIteratorMethod(iterable); 6757 if (typeof iterFn != "function") throw TypeError("Target is not iterable"); 6758 if (isArrayIteratorMethod(iterFn)) { 6759 for (index = 0, length = toLength(iterable.length); length > index; index++) { 6760 result = callFn(iterable[index]); 6761 if (result && result instanceof Result) return result; 6762 } 6763 return new Result(false); 6764 } 6765 iterator = iterFn.call(iterable); 6766 } 6767 next = iterator.next; 6768 while (!(step = next.call(iterator)).done) { 6769 try { 6770 result = callFn(step.value); 6771 } catch (error) { 6772 iteratorClose(iterator); 6773 throw error; 6774 } 6775 if (typeof result == "object" && result && result instanceof Result) return result; 6776 } 6777 return new Result(false); 6778 }; 6779 }) 6780 ), 6781 /***/ 6782 "23cb": ( 6783 /***/ 6784 (function(module2, exports$1, __webpack_require__) { 6785 var toInteger = __webpack_require__("a691"); 6786 var max = Math.max; 6787 var min = Math.min; 6788 module2.exports = function(index, length) { 6789 var integer = toInteger(index); 6790 return integer < 0 ? max(integer + length, 0) : min(integer, length); 6791 }; 6792 }) 6793 ), 6794 /***/ 6795 "23e7": ( 6796 /***/ 6797 (function(module2, exports$1, __webpack_require__) { 6798 var global = __webpack_require__("da84"); 6799 var getOwnPropertyDescriptor = __webpack_require__("06cf").f; 6800 var createNonEnumerableProperty = __webpack_require__("9112"); 6801 var redefine = __webpack_require__("6eeb"); 6802 var setGlobal = __webpack_require__("ce4e"); 6803 var copyConstructorProperties = __webpack_require__("e893"); 6804 var isForced = __webpack_require__("94ca"); 6805 module2.exports = function(options, source) { 6806 var TARGET = options.target; 6807 var GLOBAL = options.global; 6808 var STATIC = options.stat; 6809 var FORCED, target, key, targetProperty, sourceProperty, descriptor; 6810 if (GLOBAL) { 6811 target = global; 6812 } else if (STATIC) { 6813 target = global[TARGET] || setGlobal(TARGET, {}); 6814 } else { 6815 target = (global[TARGET] || {}).prototype; 6816 } 6817 if (target) for (key in source) { 6818 sourceProperty = source[key]; 6819 if (options.noTargetGet) { 6820 descriptor = getOwnPropertyDescriptor(target, key); 6821 targetProperty = descriptor && descriptor.value; 6822 } else targetProperty = target[key]; 6823 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced); 6824 if (!FORCED && targetProperty !== void 0) { 6825 if (typeof sourceProperty === typeof targetProperty) continue; 6826 copyConstructorProperties(sourceProperty, targetProperty); 6827 } 6828 if (options.sham || targetProperty && targetProperty.sham) { 6829 createNonEnumerableProperty(sourceProperty, "sham", true); 6830 } 6831 redefine(target, key, sourceProperty, options); 6832 } 6833 }; 6834 }) 6835 ), 6836 /***/ 6837 "241c": ( 6838 /***/ 6839 (function(module2, exports$1, __webpack_require__) { 6840 var internalObjectKeys = __webpack_require__("ca84"); 6841 var enumBugKeys = __webpack_require__("7839"); 6842 var hiddenKeys = enumBugKeys.concat("length", "prototype"); 6843 exports$1.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { 6844 return internalObjectKeys(O, hiddenKeys); 6845 }; 6846 }) 6847 ), 6848 /***/ 6849 "25f0": ( 6850 /***/ 6851 (function(module2, exports$1, __webpack_require__) { 6852 var redefine = __webpack_require__("6eeb"); 6853 var anObject = __webpack_require__("825a"); 6854 var fails = __webpack_require__("d039"); 6855 var flags = __webpack_require__("ad6d"); 6856 var TO_STRING = "toString"; 6857 var RegExpPrototype = RegExp.prototype; 6858 var nativeToString = RegExpPrototype[TO_STRING];
vendor: 9,306 bytes, lines 6859-7105
6859 var NOT_GENERIC = fails(function() { 6860 return nativeToString.call({ source: "a", flags: "b" }) != "/a/b"; 6861 }); 6862 var INCORRECT_NAME = nativeToString.name != TO_STRING; 6863 if (NOT_GENERIC || INCORRECT_NAME) { 6864 redefine(RegExp.prototype, TO_STRING, function toString() { 6865 var R = anObject(this); 6866 var p = String(R.source); 6867 var rf = R.flags; 6868 var f = String(rf === void 0 && R instanceof RegExp && !("flags" in RegExpPrototype) ? flags.call(R) : rf); 6869 return "/" + p + "/" + f; 6870 }, { unsafe: true }); 6871 } 6872 }) 6873 ), 6874 /***/ 6875 "2626": ( 6876 /***/ 6877 (function(module2, exports$1, __webpack_require__) { 6878 var getBuiltIn = __webpack_require__("d066"); 6879 var definePropertyModule = __webpack_require__("9bf2"); 6880 var wellKnownSymbol = __webpack_require__("b622"); 6881 var DESCRIPTORS = __webpack_require__("83ab"); 6882 var SPECIES = wellKnownSymbol("species"); 6883 module2.exports = function(CONSTRUCTOR_NAME) { 6884 var Constructor = getBuiltIn(CONSTRUCTOR_NAME); 6885 var defineProperty = definePropertyModule.f; 6886 if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { 6887 defineProperty(Constructor, SPECIES, { 6888 configurable: true, 6889 get: function() { 6890 return this; 6891 } 6892 }); 6893 } 6894 }; 6895 }) 6896 ), 6897 /***/ 6898 "2a62": ( 6899 /***/ 6900 (function(module2, exports$1, __webpack_require__) { 6901 var anObject = __webpack_require__("825a"); 6902 module2.exports = function(iterator) { 6903 var returnMethod = iterator["return"]; 6904 if (returnMethod !== void 0) { 6905 return anObject(returnMethod.call(iterator)).value; 6906 } 6907 }; 6908 }) 6909 ), 6910 /***/ 6911 "2cf4": ( 6912 /***/ 6913 (function(module2, exports$1, __webpack_require__) { 6914 var global = __webpack_require__("da84"); 6915 var fails = __webpack_require__("d039"); 6916 var bind = __webpack_require__("0366"); 6917 var html = __webpack_require__("1be4"); 6918 var createElement = __webpack_require__("cc12"); 6919 var IS_IOS = __webpack_require__("1cdc"); 6920 var IS_NODE = __webpack_require__("605d"); 6921 var location = global.location; 6922 var set = global.setImmediate; 6923 var clear = global.clearImmediate; 6924 var process = global.process; 6925 var MessageChannel = global.MessageChannel; 6926 var Dispatch = global.Dispatch; 6927 var counter = 0; 6928 var queue = {}; 6929 var ONREADYSTATECHANGE = "onreadystatechange"; 6930 var defer, channel, port; 6931 var run = function(id) { 6932 if (queue.hasOwnProperty(id)) { 6933 var fn = queue[id]; 6934 delete queue[id]; 6935 fn(); 6936 } 6937 }; 6938 var runner = function(id) { 6939 return function() { 6940 run(id); 6941 }; 6942 }; 6943 var listener = function(event) { 6944 run(event.data); 6945 }; 6946 var post = function(id) { 6947 global.postMessage(id + "", location.protocol + "//" + location.host); 6948 }; 6949 if (!set || !clear) { 6950 set = function setImmediate(fn) { 6951 var args = []; 6952 var i = 1; 6953 while (arguments.length > i) args.push(arguments[i++]); 6954 queue[++counter] = function() { 6955 (typeof fn == "function" ? fn : Function(fn)).apply(void 0, args); 6956 }; 6957 defer(counter); 6958 return counter; 6959 }; 6960 clear = function clearImmediate(id) { 6961 delete queue[id]; 6962 }; 6963 if (IS_NODE) { 6964 defer = function(id) { 6965 process.nextTick(runner(id)); 6966 }; 6967 } else if (Dispatch && Dispatch.now) { 6968 defer = function(id) { 6969 Dispatch.now(runner(id)); 6970 }; 6971 } else if (MessageChannel && !IS_IOS) { 6972 channel = new MessageChannel(); 6973 port = channel.port2; 6974 channel.port1.onmessage = listener; 6975 defer = bind(port.postMessage, port, 1); 6976 } else if (global.addEventListener && typeof postMessage == "function" && !global.importScripts && location && location.protocol !== "file:" && !fails(post)) { 6977 defer = post; 6978 global.addEventListener("message", listener, false); 6979 } else if (ONREADYSTATECHANGE in createElement("script")) { 6980 defer = function(id) { 6981 html.appendChild(createElement("script"))[ONREADYSTATECHANGE] = function() { 6982 html.removeChild(this); 6983 run(id); 6984 }; 6985 }; 6986 } else { 6987 defer = function(id) { 6988 setTimeout(runner(id), 0); 6989 }; 6990 } 6991 } 6992 module2.exports = { 6993 set, 6994 clear 6995 }; 6996 }) 6997 ), 6998 /***/ 6999 "2d00": ( 7000 /***/ 7001 (function(module2, exports$1, __webpack_require__) { 7002 var global = __webpack_require__("da84"); 7003 var userAgent = __webpack_require__("342f"); 7004 var process = global.process; 7005 var versions = process && process.versions; 7006 var v8 = versions && versions.v8; 7007 var match, version; 7008 if (v8) { 7009 match = v8.split("."); 7010 version = match[0] + match[1]; 7011 } else if (userAgent) { 7012 match = userAgent.match(/Edge\/(\d+)/); 7013 if (!match || match[1] >= 74) { 7014 match = userAgent.match(/Chrome\/(\d+)/); 7015 if (match) version = match[1]; 7016 } 7017 } 7018 module2.exports = version && +version; 7019 }) 7020 ), 7021 /***/ 7022 "3410": ( 7023 /***/ 7024 (function(module2, exports$1, __webpack_require__) { 7025 var $ = __webpack_require__("23e7"); 7026 var fails = __webpack_require__("d039"); 7027 var toObject = __webpack_require__("7b0b"); 7028 var nativeGetPrototypeOf = __webpack_require__("e163"); 7029 var CORRECT_PROTOTYPE_GETTER = __webpack_require__("e177"); 7030 var FAILS_ON_PRIMITIVES = fails(function() { 7031 nativeGetPrototypeOf(1); 7032 }); 7033 $({ target: "Object", stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, { 7034 getPrototypeOf: function getPrototypeOf(it) { 7035 return nativeGetPrototypeOf(toObject(it)); 7036 } 7037 }); 7038 }) 7039 ), 7040 /***/ 7041 "342f": ( 7042 /***/ 7043 (function(module2, exports$1, __webpack_require__) { 7044 var getBuiltIn = __webpack_require__("d066"); 7045 module2.exports = getBuiltIn("navigator", "userAgent") || ""; 7046 }) 7047 ), 7048 /***/ 7049 "35a1": ( 7050 /***/ 7051 (function(module2, exports$1, __webpack_require__) { 7052 var classof = __webpack_require__("f5df"); 7053 var Iterators = __webpack_require__("3f8c"); 7054 var wellKnownSymbol = __webpack_require__("b622"); 7055 var ITERATOR = wellKnownSymbol("iterator"); 7056 module2.exports = function(it) { 7057 if (it != void 0) return it[ITERATOR] || it["@@iterator"] || Iterators[classof(it)]; 7058 }; 7059 }) 7060 ), 7061 /***/ 7062 "37e8": ( 7063 /***/ 7064 (function(module2, exports$1, __webpack_require__) { 7065 var DESCRIPTORS = __webpack_require__("83ab"); 7066 var definePropertyModule = __webpack_require__("9bf2"); 7067 var anObject = __webpack_require__("825a"); 7068 var objectKeys = __webpack_require__("df75"); 7069 module2.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { 7070 anObject(O); 7071 var keys = objectKeys(Properties); 7072 var length = keys.length; 7073 var index = 0; 7074 var key; 7075 while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]); 7076 return O; 7077 }; 7078 }) 7079 ), 7080 /***/ 7081 "3bbe": ( 7082 /***/ 7083 (function(module2, exports$1, __webpack_require__) { 7084 var isObject2 = __webpack_require__("861d"); 7085 module2.exports = function(it) { 7086 if (!isObject2(it) && it !== null) { 7087 throw TypeError("Can't set " + String(it) + " as a prototype"); 7088 } 7089 return it; 7090 }; 7091 }) 7092 ), 7093 /***/ 7094 "3ca3": ( 7095 /***/ 7096 (function(module2, exports$1, __webpack_require__) { 7097 var charAt = __webpack_require__("6547").charAt; 7098 var InternalStateModule = __webpack_require__("69f3"); 7099 var defineIterator = __webpack_require__("7dd0"); 7100 var STRING_ITERATOR = "String Iterator"; 7101 var setInternalState = InternalStateModule.set; 7102 var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); 7103 defineIterator(String, "String", function(iterated) { 7104 setInternalState(this, { 7105 type: STRING_ITERATOR,
7106 string: String(iterated), 7107 index: 0 7108 }); 7109 }, function next() { 7110 var state = getInternalState(this); 7111 var string = state.string; 7112 var index = state.index; 7113 var point; 7114 if (index >= string.length) return { value: void 0, done: true }; 7115 point = charAt(string, index); 7116 state.index += point.length; 7117 return { value: point, done: false }; 7118 }); 7119 }) 7120 ), 7121 /***/ 7122 "3f8c": ( 7123 /***/ 7124 (function(module2, exports$1) { 7125 module2.exports = {}; 7126 }) 7127 ), 7128 /***/ 7129 "428f": ( 7130 /***/ 7131 (function(module2, exports$1, __webpack_require__) { 7132 var global = __webpack_require__("da84"); 7133 module2.exports = global; 7134 }) 7135 ), 7136 /***/ 7137 "44ad": ( 7138 /***/ 7139 (function(module2, exports$1, __webpack_require__) { 7140 var fails = __webpack_require__("d039"); 7141 var classof = __webpack_require__("c6b6"); 7142 var split = "".split; 7143 module2.exports = fails(function() { 7144 return !Object("z").propertyIsEnumerable(0); 7145 }) ? function(it) { 7146 return classof(it) == "String" ? split.call(it, "") : Object(it); 7147 } : Object; 7148 }) 7149 ), 7150 /***/ 7151 "44d2": ( 7152 /***/ 7153 (function(module2, exports$1, __webpack_require__) { 7154 var wellKnownSymbol = __webpack_require__("b622"); 7155 var create = __webpack_require__("7c73"); 7156 var definePropertyModule = __webpack_require__("9bf2"); 7157 var UNSCOPABLES = wellKnownSymbol("unscopables"); 7158 var ArrayPrototype = Array.prototype; 7159 if (ArrayPrototype[UNSCOPABLES] == void 0) { 7160 definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { 7161 configurable: true, 7162 value: create(null) 7163 }); 7164 } 7165 module2.exports = function(key) { 7166 ArrayPrototype[UNSCOPABLES][key] = true; 7167 }; 7168 }) 7169 ), 7170 /***/ 7171 "44de": ( 7172 /***/ 7173 (function(module2, exports$1, __webpack_require__) { 7174 var global = __webpack_require__("da84"); 7175 module2.exports = function(a, b) { 7176 var console2 = global.console; 7177 if (console2 && console2.error) { 7178 arguments.length === 1 ? console2.error(a) : console2.error(a, b); 7179 } 7180 }; 7181 }) 7182 ), 7183 /***/ 7184 "44e7": ( 7185 /***/ 7186 (function(module2, exports$1, __webpack_require__) { 7187 var isObject2 = __webpack_require__("861d"); 7188 var classof = __webpack_require__("c6b6"); 7189 var wellKnownSymbol = __webpack_require__("b622"); 7190 var MATCH = wellKnownSymbol("match"); 7191 module2.exports = function(it) { 7192 var isRegExp; 7193 return isObject2(it) && ((isRegExp = it[MATCH]) !== void 0 ? !!isRegExp : classof(it) == "RegExp"); 7194 }; 7195 }) 7196 ), 7197 /***/ 7198 "466d": ( 7199 /***/ 7200 (function(module2, exports$1, __webpack_require__) { 7201 var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784"); 7202 var anObject = __webpack_require__("825a"); 7203 var toLength = __webpack_require__("50c4"); 7204 var requireObjectCoercible = __webpack_require__("1d80"); 7205 var advanceStringIndex = __webpack_require__("8aa5"); 7206 var regExpExec = __webpack_require__("14c3"); 7207 fixRegExpWellKnownSymbolLogic("match", 1, function(MATCH, nativeMatch, maybeCallNative) { 7208 return [ 7209 // `String.prototype.match` method 7210 // https://tc39.es/ecma262/#sec-string.prototype.match 7211 function match(regexp) { 7212 var O = requireObjectCoercible(this); 7213 var matcher = regexp == void 0 ? void 0 : regexp[MATCH]; 7214 return matcher !== void 0 ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); 7215 }, 7216 // `RegExp.prototype[@@match]` method 7217 // https://tc39.es/ecma262/#sec-regexp.prototype-@@match 7218 function(regexp) { 7219 var res = maybeCallNative(nativeMatch, regexp, this); 7220 if (res.done) return res.value; 7221 var rx = anObject(regexp); 7222 var S = String(this); 7223 if (!rx.global) return regExpExec(rx, S); 7224 var fullUnicode = rx.unicode; 7225 rx.lastIndex = 0; 7226 var A = []; 7227 var n = 0; 7228 var result; 7229 while ((result = regExpExec(rx, S)) !== null) { 7230 var matchStr = String(result[0]); 7231 A[n] = matchStr; 7232 if (matchStr === "") rx.lastIndex = advanceStringIndex(S, toLe
7232ngth(rx.lastIndex), fullUnicode); 7233 n++; 7234 } 7235 return n === 0 ? null : A; 7236 } 7237 ]; 7238 }); 7239 }) 7240 ), 7241 /***/ 7242 "4840": ( 7243 /***/ 7244 (function(module2, exports$1, __webpack_require__) { 7245 var anObject = __webpack_require__("825a"); 7246 var aFunction = __webpack_require__("1c0b"); 7247 var wellKnownSymbol = __webpack_require__("b622"); 7248 var SPECIES = wellKnownSymbol("species"); 7249 module2.exports = function(O, defaultConstructor) { 7250 var C = anObject(O).constructor; 7251 var S; 7252 return C === void 0 || (S = anObject(C)[SPECIES]) == void 0 ? defaultConstructor : aFunction(S); 7253 }; 7254 }) 7255 ), 7256 /***/ 7257 "4930": ( 7258 /***/ 7259 (function(module2, exports$1, __webpack_require__) { 7260 var IS_NODE = __webpack_require__("605d"); 7261 var V8_VERSION = __webpack_require__("2d00"); 7262 var fails = __webpack_require__("d039"); 7263 module2.exports = !!Object.getOwnPropertySymbols && !fails(function() { 7264 return !Symbol.sham && // Chrome 38 Symbol has incorrect toString conversion 7265 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances 7266 (IS_NODE ? V8_VERSION === 38 : V8_VERSION > 37 && V8_VERSION < 41); 7267 }); 7268 }) 7269 ), 7270 /***/ 7271 "4ae1": ( 7272 /***/ 7273 (function(module2, exports$1, __webpack_require__) { 7274 var $ = __webpack_require__("23e7"); 7275 var getBuiltIn = __webpack_require__("d066"); 7276 var aFunction = __webpack_require__("1c0b"); 7277 var anObject = __webpack_require__("825a"); 7278 var isObject2 = __webpack_require__("861d"); 7279 var create = __webpack_require__("7c73"); 7280 var bind = __webpack_require__("0538"); 7281 var fails = __webpack_require__("d039"); 7282 var nativeConstruct = getBuiltIn("Reflect", "construct"); 7283 var NEW_TARGET_BUG = fails(function() { 7284 function F() { 7285 } 7286 return !(nativeConstruct(function() { 7287 }, [], F) instanceof F); 7288 }); 7289 var ARGS_BUG = !fails(function() { 7290 nativeConstruct(function() { 7291 }); 7292 }); 7293 var FORCED = NEW_TARGET_BUG || ARGS_BUG; 7294 $({ target: "Reflect", stat: true, forced: FORCED, sham: FORCED }, { 7295 construct: function construct(Target, args) { 7296 aFunction(Target); 7297 anObject(args); 7298 var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); 7299 if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget); 7300 if (Target == newTarget) { 7301 switch (args.length) { 7302 case 0: 7303 return new Target(); 7304 case 1: 7305 return new Target(args[0]); 7306 case 2: 7307 return new Target(args[0], args[1]); 7308 case 3: 7309 return new Target(args[0], args[1], args[2]); 7310 case 4: 7311 return new Target(args[0], args[1], args[2], args[3]); 7312 } 7313 var $args = [null]; 7314 $args.push.apply($args, args); 7315 return new (bind.apply(Target, $args))(); 7316 } 7317 var proto = newTarget.prototype; 7318 var instance = create(isObject2(proto) ? proto : Object.prototype); 7319 var result = Function.apply.call(Target, instance, args); 7320 return isObject2(result) ? result : instance; 7321 } 7322 }); 7323 }) 7324 ), 7325 /***/ 7326 "4d64": ( 7327 /***/ 7328 (function(module2, exports$1, __webpack_require__) { 7329 var toIndexedObject = __webpack_require__("fc6a"); 7330 var toLength = __webpack_require__("50c4"); 7331 var toAbsoluteIndex = __webpack_require__("23cb"); 7332 var createMethod = function(IS_INCLUDES) { 7333 return function($this, el, fromIndex) { 7334 var O = toIndexedObject($this); 7335 var length = toLength(O.length); 7336 var index = toAbsoluteIndex(fromIndex, length); 7337 var value;
vendor: 4,335 bytes, lines 7338-7443
7338 if (IS_INCLUDES && el != el) while (length > index) { 7339 value = O[index++]; 7340 if (value != value) return true; 7341 } 7342 else for (; length > index; index++) { 7343 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; 7344 } 7345 return !IS_INCLUDES && -1; 7346 }; 7347 }; 7348 module2.exports = { 7349 // `Array.prototype.includes` method 7350 // https://tc39.es/ecma262/#sec-array.prototype.includes 7351 includes: createMethod(true), 7352 // `Array.prototype.indexOf` method 7353 // https://tc39.es/ecma262/#sec-array.prototype.indexof 7354 indexOf: createMethod(false) 7355 }; 7356 }) 7357 ), 7358 /***/ 7359 "4de4": ( 7360 /***/ 7361 (function(module2, exports$1, __webpack_require__) { 7362 var $ = __webpack_require__("23e7"); 7363 var $filter = __webpack_require__("b727").filter; 7364 var arrayMethodHasSpeciesSupport = __webpack_require__("1dde"); 7365 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport("filter"); 7366 $({ target: "Array", proto: true, forced: !HAS_SPECIES_SUPPORT }, { 7367 filter: function filter(callbackfn) { 7368 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : void 0); 7369 } 7370 }); 7371 }) 7372 ), 7373 /***/ 7374 "4df4": ( 7375 /***/ 7376 (function(module2, exports$1, __webpack_require__) { 7377 var bind = __webpack_require__("0366"); 7378 var toObject = __webpack_require__("7b0b"); 7379 var callWithSafeIterationClosing = __webpack_require__("9bdd"); 7380 var isArrayIteratorMethod = __webpack_require__("e95a"); 7381 var toLength = __webpack_require__("50c4"); 7382 var createProperty = __webpack_require__("8418"); 7383 var getIteratorMethod = __webpack_require__("35a1"); 7384 module2.exports = function from(arrayLike) { 7385 var O = toObject(arrayLike); 7386 var C = typeof this == "function" ? this : Array; 7387 var argumentsLength = arguments.length; 7388 var mapfn = argumentsLength > 1 ? arguments[1] : void 0; 7389 var mapping = mapfn !== void 0; 7390 var iteratorMethod = getIteratorMethod(O); 7391 var index = 0; 7392 var length, result, step, iterator, next, value; 7393 if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : void 0, 2); 7394 if (iteratorMethod != void 0 && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { 7395 iterator = iteratorMethod.call(O); 7396 next = iterator.next; 7397 result = new C(); 7398 for (; !(step = next.call(iterator)).done; index++) { 7399 value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; 7400 createProperty(result, index, value); 7401 } 7402 } else { 7403 length = toLength(O.length); 7404 result = new C(length); 7405 for (; length > index; index++) { 7406 value = mapping ? mapfn(O[index], index) : O[index]; 7407 createProperty(result, index, value); 7408 } 7409 } 7410 result.length = index; 7411 return result; 7412 }; 7413 }) 7414 ), 7415 /***/ 7416 "50c4": ( 7417 /***/ 7418 (function(module2, exports$1, __webpack_require__) { 7419 var toInteger = __webpack_require__("a691"); 7420 var min = Math.min; 7421 module2.exports = function(argument) { 7422 return argument > 0 ? min(toInteger(argument), 9007199254740991) : 0; 7423 }; 7424 }) 7425 ), 7426 /***/ 7427 "5135": ( 7428 /***/ 7429 (function(module2, exports$1) { 7430 var hasOwnProperty = {}.hasOwnProperty; 7431 module2.exports = function(it, key) { 7432 return hasOwnProperty.call(it, key); 7433 }; 7434 }) 7435 ), 7436 /***/ 7437 "5319": ( 7438 /***/ 7439 (function(module2, exports$1, __webpack_require__) { 7440 var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784"); 7441 var anObject = __webpack_require__("825a"); 7442 var toLength = __webpack_require__("50c4"); 7443 var toInteger = __webpack_require__("a691");
7444 var requireObjectCoercible = __webpack_require__("1d80"); 7445 var advanceStringIndex = __webpack_require__("8aa5"); 7446 var getSubstitution = __webpack_require__("0cb2"); 7447 var regExpExec = __webpack_require__("14c3"); 7448 var max = Math.max; 7449 var min = Math.min; 7450 var maybeToString = function(it) { 7451 return it === void 0 ? it : String(it); 7452 }; 7453 fixRegExpWellKnownSymbolLogic("replace", 2, function(REPLACE, nativeReplace, maybeCallNative, reason) { 7454 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; 7455 var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; 7456 var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? "$" : "$0"; 7457 return [ 7458 // `String.prototype.replace` method 7459 // https://tc39.es/ecma262/#sec-string.prototype.replace 7460 function replace(searchValue, replaceValue) { 7461 var O = requireObjectCoercible(this); 7462 var replacer = searchValue == void 0 ? void 0 : searchValue[REPLACE]; 7463 return replacer !== void 0 ? replacer.call(searchValue, O, replaceValue) : nativeReplace.call(String(O), searchValue, replaceValue); 7464 }, 7465 // `RegExp.prototype[@@replace]` method 7466 // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace 7467 function(regexp, replaceValue) { 7468 if (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0 || typeof replaceValue === "string" && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) { 7469 var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); 7470 if (res.done) return res.value; 7471 } 7472 var rx = anObject(regexp); 7473 var S = String(this); 7474 var functionalReplace = typeof replaceValue === "function"; 7475 if (!functionalReplace) replaceValue = String(replaceValue); 7476 var global = rx.global; 7477 if (global) { 7478 var fullUnicode = rx.unicode; 7479 rx.lastIndex = 0; 7480 } 7481 var results = []; 7482 while (true) { 7483 var result = regExpExec(rx, S); 7484 if (result === null) break; 7485 results.push(result); 7486 if (!global) break; 7487 var matchStr = String(result[0]); 7488 if (matchStr === "") rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); 7489 } 7490 var accumulatedResult = ""; 7491 var nextSourcePosition = 0; 7492 for (var i = 0; i < results.length; i++) { 7493 result = results[i]; 7494 var matched = String(result[0]); 7495 var position = max(min(toInteger(result.index), S.length), 0); 7496 var captures = []; 7497 for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); 7498 var namedCaptures = result.groups; 7499 if (functionalReplace) { 7500 var replacerArgs = [matched].concat(captures, position, S); 7501 if (namedCaptures !== void 0) replacerArgs.push(namedCaptures); 7502 var replacement = String(replaceValue.apply(void 0, replacerArgs)); 7503 } else { 7504 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); 7505 } 7506 if (position >= nextSourcePosition) { 7507 accumulatedResult += S.slice(nextSourcePosition, position) + replacement; 7508 nextSourcePosition = position + matched.length; 7509 } 7510 } 7511 return accumulatedResult + S.slice(nextSourcePosition); 7512 } 7513 ]; 7514 }); 7515 }) 7516 ), 7517 /***/ 7518 "5692": ( 7519 /***/ 7520 (function(module2, exports$1, __webpack_require__) { 7521 var IS_PURE = __webpack_require__("c430"); 7522 var store = __webpack_require__("c6cd"); 7523 (module2.exports = function(key, value) { 7524 return store[key] || (store[key] = value !== void 0 ? value : {}); 7525 })("versions", []).push({ 7526 version: "3.10.1", 7527 mode: IS_PURE ? "pure" : "global", 7528 copyright: "© 2021 Denis Pushkarev (zloirock.ru)" 7529 }); 7530 }) 7531 ), 7532 /***/ 7533 "56ef": ( 7534 /***/ 7535 (function(module2, exports$1, __webpack_require__) { 7536 var getBuiltIn = __webpack_require__("d066"); 7537 var getOwnPropertyNamesModule = __webpack_require__("241c"); 7538 var getOwnPropertySymbolsModule = __webpack_require__("7418"); 7539 var anObject = __webpack_require__("825a"); 7540 module2.exports = getBuiltIn("Reflect", "ownKeys") || function ownKeys(it) { 7541 var keys = getOwnPropertyNamesModule.f(anObject(it)); 7542 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; 7543 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; 7544 }; 7545 }) 7546 ), 7547 /***/ 7548 "5c6c": ( 7549 /***/ 7550 (function(module2, exports$1) { 7551 module2.exports = function(bitmap, value) { 7552 return { 7553 enumerable: !(bitmap & 1), 7554 configurable: !(bitmap & 2), 7555 writable: !(bitmap & 4), 7556 value 7557 }; 7558 }; 7559 }) 7560 ), 7561 /***/ 7562 "605d": ( 7563 /***/ 7564 (function(module2, exports$1, __webpack_require__) { 7565 var classof = __webpack_require__("c6b6"); 7566 var global = __webpack_require__("da84"); 7567 module2.exports = classof(global.process) == "process"; 7568 }) 7569 ), 7570 /***/ 7571 "6547": ( 7572 /***/ 7573 (function(module2, exports$1, __webpack_require__) { 7574 var toInteger = __webpack_require__("a691");
7575 var requireObjectCoercible = __webpack_require__("1d80"); 7576 var createMethod = function(CONVERT_TO_STRING) { 7577 return function($this, pos) { 7578 var S = String(requireObjectCoercible($this)); 7579 var position = toInteger(pos); 7580 var size = S.length; 7581 var first, second; 7582 if (position < 0 || position >= size) return CONVERT_TO_STRING ? "" : void 0; 7583 first = S.charCodeAt(position); 7584 return first < 55296 || first > 56319 || position + 1 === size || (second = S.charCodeAt(position + 1)) < 56320 || second > 57343 ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 55296 << 10) + (second - 56320) + 65536; 7585 }; 7586 }; 7587 module2.exports = { 7588 // `String.prototype.codePointAt` method 7589 // https://tc39.es/ecma262/#sec-string.prototype.codepointat 7590 codeAt: createMethod(false), 7591 // `String.prototype.at` method 7592 // https://github.com/mathiasbynens/String.prototype.at 7593 charAt: createMethod(true) 7594 }; 7595 }) 7596 ), 7597 /***/ 7598 "65f0": ( 7599 /***/ 7600 (function(module2, exports$1, __webpack_require__) { 7601 var isObject2 = __webpack_require__("861d"); 7602 var isArray2 = __webpack_require__("e8b5"); 7603 var wellKnownSymbol = __webpack_require__("b622"); 7604 var SPECIES = wellKnownSymbol("species"); 7605 module2.exports = function(originalArray, length) { 7606 var C; 7607 if (isArray2(originalArray)) { 7608 C = originalArray.constructor; 7609 if (typeof C == "function" && (C === Array || isArray2(C.prototype))) C = void 0; 7610 else if (isObject2(C)) { 7611 C = C[SPECIES]; 7612 if (C === null) C = void 0; 7613 } 7614 } 7615 return new (C === void 0 ? Array : C)(length === 0 ? 0 : length); 7616 }; 7617 }) 7618 ), 7619 /***/ 7620 "69f3": ( 7621 /***/ 7622 (function(module2, exports$1, __webpack_require__) { 7623 var NATIVE_WEAK_MAP = __webpack_require__("7f9a"); 7624 var global = __webpack_require__("da84"); 7625 var isObject2 = __webpack_require__("861d"); 7626 var createNonEnumerableProperty = __webpack_require__("9112"); 7627 var objectHas = __webpack_require__("5135"); 7628 var shared = __webpack_require__("c6cd"); 7629 var sharedKey = __webpack_require__("f772"); 7630 var hiddenKeys = __webpack_require__("d012"); 7631 var WeakMap2 = global.WeakMap; 7632 var set, get, has; 7633 var enforce = function(it) { 7634 return has(it) ? get(it) : set(it, {}); 7635 }; 7636 var getterFor = function(TYPE) { 7637 return function(it) { 7638 var state; 7639 if (!isObject2(it) || (state = get(it)).type !== TYPE) { 7640 throw TypeError("Incompatible receiver, " + TYPE + " required"); 7641 } 7642 return state; 7643 }; 7644 }; 7645 if (NATIVE_WEAK_MAP) { 7646 var store = shared.state || (shared.state = new WeakMap2()); 7647 var wmget = store.get; 7648 var wmhas = store.has; 7649 var wmset = store.set; 7650 set = function(it, metadata) { 7651 metadata.facade = it; 7652 wmset.call(store, it, metadata); 7653 return metadata; 7654 }; 7655 get = function(it) { 7656 return wmget.call(store, it) || {}; 7657 }; 7658 has = function(it) { 7659 return wmhas.call(store, it); 7660 }; 7661 } else { 7662 var STATE = sharedKey("state"); 7663 hiddenKeys[STATE] = true; 7664 set = function(it, metadata) { 7665 metadata.facade = it; 7666 createNonEnumerableProperty(it, STATE, metadata); 7667 return metadata; 7668 }; 7669 get = function(it) { 7670 return objectHas(it, STATE) ? it[STATE] : {}; 7671 }; 7672 has = function(it) { 7673 return objectHas(it, STATE); 7674 }; 7675 } 7676 module2.exports = { 7677 set, 7678 get, 7679 has, 7680 enforce, 7681 getterFor 7682 }; 7683 }) 7684 ), 7685 /***/ 7686 "6b0d": ( 7687 /***/ 7688 (function(module2, exports$1, __webpack_require__) { 7689 Object.defineProperty(exports$1, "__esModule", { value: true }); 7690 exports$1.default = (sfc, props) => { 7691 const target = sfc.__vccOpts || sfc; 7692 for (const [key, val] of props) { 7693 target[key] = val; 7694 } 7695 return target; 7696 }; 7697 }) 7698 ), 7699 /***/ 7700 "6eeb": ( 7701 /***/ 7702 (function(module2, exports$1, __webpack_require__) { 7703 var global = __webpack_require__("da84"); 7704 var createNonEnumerableProperty = __webpack_require__("9112"); 7705 var has = __webpack_require__("5135"); 7706 var setGlobal = __webpack_require__("ce4e"); 7707 var inspectSource = __webpack_require__("8925"); 7708 var InternalStateModule = __webpack_require__("69f3"); 7709 var getInternalState = InternalStateModule.get; 7710 var enforceInternalState = InternalStateModule.enforce; 7711 var TEMPLATE = String(String).split("String"); 7712 (module2.exports = function(O, key, value, options) { 7713 var unsafe = options ? !!options.unsafe : false;
7714 var simple = options ? !!options.enumerable : false; 7715 var noTargetGet = options ? !!options.noTargetGet : false; 7716 var state; 7717 if (typeof value == "function") { 7718 if (typeof key == "string" && !has(value, "name")) { 7719 createNonEnumerableProperty(value, "name", key); 7720 } 7721 state = enforceInternalState(value); 7722 if (!state.source) { 7723 state.source = TEMPLATE.join(typeof key == "string" ? key : ""); 7724 } 7725 } 7726 if (O === global) { 7727 if (simple) O[key] = value; 7728 else setGlobal(key, value); 7729 return; 7730 } else if (!unsafe) { 7731 delete O[key]; 7732 } else if (!noTargetGet && O[key]) { 7733 simple = true; 7734 } 7735 if (simple) O[key] = value; 7736 else createNonEnumerableProperty(O, key, value); 7737 })(Function.prototype, "toString", function toString() { 7738 return typeof this == "function" && getInternalState(this).source || inspectSource(this); 7739 }); 7740 }) 7741 ), 7742 /***/ 7743 "7037": ( 7744 /***/ 7745 (function(module2, exports$1, __webpack_require__) { 7746 __webpack_require__("a4d3"); 7747 __webpack_require__("e01a"); 7748 __webpack_require__("d3b7"); 7749 __webpack_require__("d28b"); 7750 __webpack_require__("3ca3"); 7751 __webpack_require__("ddb0"); 7752 function _typeof(obj) { 7753 "@babel/helpers - typeof"; 7754 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 7755 module2.exports = _typeof = function _typeof2(obj2) { 7756 return typeof obj2; 7757 }; 7758 module2.exports["default"] = module2.exports, module2.exports.__esModule = true; 7759 } else { 7760 module2.exports = _typeof = function _typeof2(obj2) { 7761 return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; 7762 }; 7763 module2.exports["default"] = module2.exports, module2.exports.__esModule = true; 7764 } 7765 return _typeof(obj); 7766 } 7767 module2.exports = _typeof; 7768 module2.exports["default"] = module2.exports, module2.exports.__esModule = true; 7769 }) 7770 ), 7771 /***/ 7772 "7418": ( 7773 /***/ 7774 (function(module2, exports$1) { 7775 exports$1.f = Object.getOwnPropertySymbols; 7776 }) 7777 ), 7778 /***/ 7779 "746f": ( 7780 /***/ 7781 (function(module2, exports$1, __webpack_require__) { 7782 var path = __webpack_require__("428f"); 7783 var has = __webpack_require__("5135"); 7784 var wrappedWellKnownSymbolModule = __webpack_require__("e538"); 7785 var defineProperty = __webpack_require__("9bf2").f; 7786 module2.exports = function(NAME) { 7787 var Symbol2 = path.Symbol || (path.Symbol = {}); 7788 if (!has(Symbol2, NAME)) defineProperty(Symbol2, NAME, { 7789 value: wrappedWellKnownSymbolModule.f(NAME) 7790 }); 7791 }; 7792 }) 7793 ), 7794 /***/ 7795 "7839": ( 7796 /***/ 7797 (function(module2, exports$1) { 7798 module2.exports = [ 7799 "constructor", 7800 "hasOwnProperty", 7801 "isPrototypeOf", 7802 "propertyIsEnumerable", 7803 "toLocaleString", 7804 "toString", 7805 "valueOf" 7806 ]; 7807 }) 7808 ), 7809 /***/ 7810 "7b0b": ( 7811 /***/ 7812 (function(module2, exports$1, __webpack_require__) { 7813 var requireObjectCoercible = __webpack_require__("1d80"); 7814 module2.exports = function(argument) { 7815 return Object(requireObjectCoercible(argument)); 7816 }; 7817 }) 7818 ), 7819 /***/ 7820 "7c73": ( 7821 /***/ 7822 (function(module2, exports$1, __webpack_require__) { 7823 var anObject = __webpack_require__("825a"); 7824 var defineProperties = __webpack_require__("37e8"); 7825 var enumBugKeys = __webpack_require__("7839"); 7826 var hiddenKeys = __webpack_require__("d012"); 7827 var html = __webpack_require__("1be4"); 7828 var documentCreateElement = __webpack_require__("cc12"); 7829 var sharedKey = __webpack_require__("f772"); 7830 var GT = ">"; 7831 var LT = "<"; 7832 var PROTOTYPE = "prototype"; 7833 var SCRIPT = "script"; 7834 var IE_PROTO = sharedKey("IE_PROTO"); 7835 var EmptyConstructor = function() { 7836 }; 7837 var scriptTag = function(content) {
vendor: 4,946 bytes, lines 7838-7951
7838 return LT + SCRIPT + GT + content + LT + "/" + SCRIPT + GT; 7839 }; 7840 var NullProtoObjectViaActiveX = function(activeXDocument2) { 7841 activeXDocument2.write(scriptTag("")); 7842 activeXDocument2.close(); 7843 var temp = activeXDocument2.parentWindow.Object; 7844 activeXDocument2 = null; 7845 return temp; 7846 }; 7847 var NullProtoObjectViaIFrame = function() { 7848 var iframe = documentCreateElement("iframe"); 7849 var JS = "java" + SCRIPT + ":"; 7850 var iframeDocument; 7851 iframe.style.display = "none"; 7852 html.appendChild(iframe); 7853 iframe.src = String(JS); 7854 iframeDocument = iframe.contentWindow.document; 7855 iframeDocument.open(); 7856 iframeDocument.write(scriptTag("document.F=Object")); 7857 iframeDocument.close(); 7858 return iframeDocument.F; 7859 }; 7860 var activeXDocument; 7861 var NullProtoObject = function() { 7862 try { 7863 activeXDocument = document.domain && new ActiveXObject("htmlfile"); 7864 } catch (error) { 7865 } 7866 NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); 7867 var length = enumBugKeys.length; 7868 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; 7869 return NullProtoObject(); 7870 }; 7871 hiddenKeys[IE_PROTO] = true; 7872 module2.exports = Object.create || function create(O, Properties) { 7873 var result; 7874 if (O !== null) { 7875 EmptyConstructor[PROTOTYPE] = anObject(O); 7876 result = new EmptyConstructor(); 7877 EmptyConstructor[PROTOTYPE] = null; 7878 result[IE_PROTO] = O; 7879 } else result = NullProtoObject(); 7880 return Properties === void 0 ? result : defineProperties(result, Properties); 7881 }; 7882 }) 7883 ), 7884 /***/ 7885 "7db0": ( 7886 /***/ 7887 (function(module2, exports$1, __webpack_require__) { 7888 var $ = __webpack_require__("23e7"); 7889 var $find = __webpack_require__("b727").find; 7890 var addToUnscopables = __webpack_require__("44d2"); 7891 var FIND = "find"; 7892 var SKIPS_HOLES = true; 7893 if (FIND in []) Array(1)[FIND](function() { 7894 SKIPS_HOLES = false; 7895 }); 7896 $({ target: "Array", proto: true, forced: SKIPS_HOLES }, { 7897 find: function find(callbackfn) { 7898 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : void 0); 7899 } 7900 }); 7901 addToUnscopables(FIND); 7902 }) 7903 ), 7904 /***/ 7905 "7dd0": ( 7906 /***/ 7907 (function(module2, exports$1, __webpack_require__) { 7908 var $ = __webpack_require__("23e7"); 7909 var createIteratorConstructor = __webpack_require__("9ed3"); 7910 var getPrototypeOf = __webpack_require__("e163"); 7911 var setPrototypeOf = __webpack_require__("d2bb"); 7912 var setToStringTag = __webpack_require__("d44e"); 7913 var createNonEnumerableProperty = __webpack_require__("9112"); 7914 var redefine = __webpack_require__("6eeb"); 7915 var wellKnownSymbol = __webpack_require__("b622"); 7916 var IS_PURE = __webpack_require__("c430"); 7917 var Iterators = __webpack_require__("3f8c"); 7918 var IteratorsCore = __webpack_require__("ae93"); 7919 var IteratorPrototype = IteratorsCore.IteratorPrototype; 7920 var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; 7921 var ITERATOR = wellKnownSymbol("iterator"); 7922 var KEYS = "keys"; 7923 var VALUES = "values"; 7924 var ENTRIES = "entries"; 7925 var returnThis = function() { 7926 return this; 7927 }; 7928 module2.exports = function(Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { 7929 createIteratorConstructor(IteratorConstructor, NAME, next); 7930 var getIterationMethod = function(KIND) { 7931 if (KIND === DEFAULT && defaultIterator) return defaultIterator; 7932 if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; 7933 switch (KIND) { 7934 case KEYS: 7935 return function keys() { 7936 return new IteratorConstructor(this, KIND); 7937 }; 7938 case VALUES: 7939 return function values() { 7940 return new IteratorConstructor(this, KIND); 7941 }; 7942 case ENTRIES: 7943 return function entries() { 7944 return new IteratorConstructor(this, KIND); 7945 }; 7946 } 7947 return function() { 7948 return new IteratorConstructor(this); 7949 }; 7950 }; 7951 var TO_STRING_TAG = NAME + " Iterator";
vendor: 5,916 bytes, lines 7952-8078
7952 var INCORRECT_VALUES_NAME = false; 7953 var IterablePrototype = Iterable.prototype; 7954 var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype["@@iterator"] || DEFAULT && IterablePrototype[DEFAULT]; 7955 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); 7956 var anyNativeIterator = NAME == "Array" ? IterablePrototype.entries || nativeIterator : nativeIterator; 7957 var CurrentIteratorPrototype, methods, KEY; 7958 if (anyNativeIterator) { 7959 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); 7960 if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { 7961 if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { 7962 if (setPrototypeOf) { 7963 setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); 7964 } else if (typeof CurrentIteratorPrototype[ITERATOR] != "function") { 7965 createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis); 7966 } 7967 } 7968 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); 7969 if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; 7970 } 7971 } 7972 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { 7973 INCORRECT_VALUES_NAME = true; 7974 defaultIterator = function values() { 7975 return nativeIterator.call(this); 7976 }; 7977 } 7978 if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { 7979 createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator); 7980 } 7981 Iterators[NAME] = defaultIterator; 7982 if (DEFAULT) { 7983 methods = { 7984 values: getIterationMethod(VALUES), 7985 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), 7986 entries: getIterationMethod(ENTRIES) 7987 }; 7988 if (FORCED) for (KEY in methods) { 7989 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { 7990 redefine(IterablePrototype, KEY, methods[KEY]); 7991 } 7992 } 7993 else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); 7994 } 7995 return methods; 7996 }; 7997 }) 7998 ), 7999 /***/ 8000 "7f9a": ( 8001 /***/ 8002 (function(module2, exports$1, __webpack_require__) { 8003 var global = __webpack_require__("da84"); 8004 var inspectSource = __webpack_require__("8925"); 8005 var WeakMap2 = global.WeakMap; 8006 module2.exports = typeof WeakMap2 === "function" && /native code/.test(inspectSource(WeakMap2)); 8007 }) 8008 ), 8009 /***/ 8010 "825a": ( 8011 /***/ 8012 (function(module2, exports$1, __webpack_require__) { 8013 var isObject2 = __webpack_require__("861d"); 8014 module2.exports = function(it) { 8015 if (!isObject2(it)) { 8016 throw TypeError(String(it) + " is not an object"); 8017 } 8018 return it; 8019 }; 8020 }) 8021 ), 8022 /***/ 8023 "83ab": ( 8024 /***/ 8025 (function(module2, exports$1, __webpack_require__) { 8026 var fails = __webpack_require__("d039"); 8027 module2.exports = !fails(function() { 8028 return Object.defineProperty({}, 1, { get: function() { 8029 return 7; 8030 } })[1] != 7; 8031 }); 8032 }) 8033 ), 8034 /***/ 8035 "8418": ( 8036 /***/ 8037 (function(module2, exports$1, __webpack_require__) { 8038 var toPrimitive = __webpack_require__("c04e"); 8039 var definePropertyModule = __webpack_require__("9bf2"); 8040 var createPropertyDescriptor = __webpack_require__("5c6c"); 8041 module2.exports = function(object, key, value) { 8042 var propertyKey = toPrimitive(key); 8043 if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); 8044 else object[propertyKey] = value; 8045 }; 8046 }) 8047 ), 8048 /***/ 8049 "861d": ( 8050 /***/ 8051 (function(module2, exports$1) { 8052 module2.exports = function(it) { 8053 return typeof it === "object" ? it !== null : typeof it === "function"; 8054 }; 8055 }) 8056 ), 8057 /***/ 8058 "8875": ( 8059 /***/ 8060 (function(module2, exports$1, __webpack_require__) { 8061 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 8062 (function(root, factory) { 8063 { 8064 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports$1, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== void 0 && (module2.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 8065 } 8066 })(typeof self !== "undefined" ? self : this, function() { 8067 function getCurrentScript() { 8068 var descriptor = Object.getOwnPropertyDescriptor(document, "currentScript"); 8069 if (!descriptor && "currentScript" in document && document.currentScript) { 8070 return document.currentScript; 8071 } 8072 if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) { 8073 return document.currentScript; 8074 } 8075 try { 8076 throw new Error(); 8077 } catch (err) { 8078 var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig, ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig, stackDetail
vendor: 7,706 bytes, lines 8078-8260
8078s = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack), scriptLocation = stackDetails && stackDetails[1] || false, line = stackDetails && stackDetails[2] || false, currentLocation = document.location.href.replace(document.location.hash, ""), pageSource, inlineScriptSourceRegExp, inlineScriptSource, scripts = document.getElementsByTagName("script"); 8079 if (scriptLocation === currentLocation) { 8080 pageSource = document.documentElement.outerHTML; 8081 inlineScriptSourceRegExp = new RegExp("(?:[^\\n]+?\\n){0," + (line - 2) + "}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*", "i"); 8082 inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, "$1").trim(); 8083 } 8084 for (var i = 0; i < scripts.length; i++) { 8085 if (scripts[i].readyState === "interactive") { 8086 return scripts[i]; 8087 } 8088 if (scripts[i].src === scriptLocation) { 8089 return scripts[i]; 8090 } 8091 if (scriptLocation === currentLocation && scripts[i].innerHTML && scripts[i].innerHTML.trim() === inlineScriptSource) { 8092 return scripts[i]; 8093 } 8094 } 8095 return null; 8096 } 8097 } 8098 return getCurrentScript; 8099 }); 8100 }) 8101 ), 8102 /***/ 8103 "8925": ( 8104 /***/ 8105 (function(module2, exports$1, __webpack_require__) { 8106 var store = __webpack_require__("c6cd"); 8107 var functionToString = Function.toString; 8108 if (typeof store.inspectSource != "function") { 8109 store.inspectSource = function(it) { 8110 return functionToString.call(it); 8111 }; 8112 } 8113 module2.exports = store.inspectSource; 8114 }) 8115 ), 8116 /***/ 8117 "8aa5": ( 8118 /***/ 8119 (function(module2, exports$1, __webpack_require__) { 8120 var charAt = __webpack_require__("6547").charAt; 8121 module2.exports = function(S, index, unicode) { 8122 return index + (unicode ? charAt(S, index).length : 1); 8123 }; 8124 }) 8125 ), 8126 /***/ 8127 "8bbf": ( 8128 /***/ 8129 (function(module2, exports$1) { 8130 module2.exports = requireVue(); 8131 }) 8132 ), 8133 /***/ 8134 "90e3": ( 8135 /***/ 8136 (function(module2, exports$1) { 8137 var id = 0; 8138 var postfix = Math.random(); 8139 module2.exports = function(key) { 8140 return "Symbol(" + String(key === void 0 ? "" : key) + ")_" + (++id + postfix).toString(36); 8141 }; 8142 }) 8143 ), 8144 /***/ 8145 "9112": ( 8146 /***/ 8147 (function(module2, exports$1, __webpack_require__) { 8148 var DESCRIPTORS = __webpack_require__("83ab"); 8149 var definePropertyModule = __webpack_require__("9bf2"); 8150 var createPropertyDescriptor = __webpack_require__("5c6c"); 8151 module2.exports = DESCRIPTORS ? function(object, key, value) { 8152 return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); 8153 } : function(object, key, value) { 8154 object[key] = value; 8155 return object; 8156 }; 8157 }) 8158 ), 8159 /***/ 8160 "9263": ( 8161 /***/ 8162 (function(module2, exports$1, __webpack_require__) { 8163 var regexpFlags = __webpack_require__("ad6d"); 8164 var stickyHelpers = __webpack_require__("9f7f"); 8165 var shared = __webpack_require__("5692"); 8166 var nativeExec = RegExp.prototype.exec; 8167 var nativeReplace = shared("native-string-replace", String.prototype.replace); 8168 var patchedExec = nativeExec; 8169 var UPDATES_LAST_INDEX_WRONG = (function() { 8170 var re1 = /a/; 8171 var re2 = /b*/g; 8172 nativeExec.call(re1, "a"); 8173 nativeExec.call(re2, "a"); 8174 return re1.lastIndex !== 0 || re2.lastIndex !== 0; 8175 })(); 8176 var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; 8177 var NPCG_INCLUDED = /()??/.exec("")[1] !== void 0; 8178 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y; 8179 if (PATCH) { 8180 patchedExec = function exec(str) { 8181 var re = this; 8182 var lastIndex, reCopy, match, i; 8183 var sticky = UNSUPPORTED_Y && re.sticky; 8184 var flags = regexpFlags.call(re); 8185 var source = re.source; 8186 var charsAdded = 0; 8187 var strCopy = str; 8188 if (sticky) { 8189 flags = flags.replace("y", ""); 8190 if (flags.indexOf("g") === -1) { 8191 flags += "g"; 8192 } 8193 strCopy = String(str).slice(re.lastIndex); 8194 if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== "\n")) { 8195 source = "(?: " + source + ")"; 8196 strCopy = " " + strCopy; 8197 charsAdded++; 8198 } 8199 reCopy = new RegExp("^(?:" + source + ")", flags); 8200 } 8201 if (NPCG_INCLUDED) { 8202 reCopy = new RegExp("^" + source + "$(?!\\s)", flags); 8203 } 8204 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; 8205 match = nativeExec.call(sticky ? reCopy : re, strCopy); 8206 if (sticky) { 8207 if (match) { 8208 match.input = match.input.slice(charsAdded); 8209 match[0] = match[0].slice(charsAdded); 8210 match.index = re.lastIndex; 8211 re.lastIndex += match[0].length; 8212 } else re.lastIndex = 0; 8213 } else if (UPDATES_LAST_INDEX_WRONG && match) { 8214 re.lastIndex = re.global ? match.index + match[0].length : lastIndex; 8215 } 8216 if (NPCG_INCLUDED && match && match.length > 1) { 8217 nativeReplace.call(match[0], reCopy, function() { 8218 for (i = 1; i < arguments.length - 2; i++) { 8219 if (arguments[i] === void 0) match[i] = void 0; 8220 } 8221 }); 8222 } 8223 return match; 8224 }; 8225 } 8226 module2.exports = patchedExec; 8227 }) 8228 ), 8229 /***/ 8230 "94ca": ( 8231 /***/ 8232 (function(module2, exports$1, __webpack_require__) { 8233 var fails = __webpack_require__("d039"); 8234 var replacement = /#|\.prototype\./; 8235 var isForced = function(feature, detection) { 8236 var value = data[normalize(feature)]; 8237 return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == "function" ? fails(detection) : !!detection; 8238 }; 8239 var normalize = isForced.normalize = function(string) { 8240 return String(string).replace(replacement, ".").toLowerCase(); 8241 }; 8242 var data = isForced.data = {}; 8243 var NATIVE = isForced.NATIVE = "N"; 8244 var POLYFILL = isForced.POLYFILL = "P"; 8245 module2.exports = isForced; 8246 }) 8247 ), 8248 /***/ 8249 "99af": ( 8250 /***/ 8251 (function(module2, exports$1, __webpack_require__) { 8252 var $ = __webpack_require__("23e7"); 8253 var fails = __webpack_require__("d039"); 8254 var isArray2 = __webpack_require__("e8b5"); 8255 var isObject2 = __webpack_require__("861d"); 8256 var toObject = __webpack_require__("7b0b"); 8257 var toLength = __webpack_require__("50c4"); 8258 var createProperty = __webpack_require__("8418"); 8259 var arraySpeciesCreate = __webpack_require__("65f0"); 8260 var arrayMethodHasSpeciesSupport = __webpack_require__("1
vendor: 5,547 bytes, lines 8260-8393
8260dde"); 8261 var wellKnownSymbol = __webpack_require__("b622"); 8262 var V8_VERSION = __webpack_require__("2d00"); 8263 var IS_CONCAT_SPREADABLE = wellKnownSymbol("isConcatSpreadable"); 8264 var MAX_SAFE_INTEGER = 9007199254740991; 8265 var MAXIMUM_ALLOWED_INDEX_EXCEEDED = "Maximum allowed index exceeded"; 8266 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function() { 8267 var array = []; 8268 array[IS_CONCAT_SPREADABLE] = false; 8269 return array.concat()[0] !== array; 8270 }); 8271 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport("concat"); 8272 var isConcatSpreadable = function(O) { 8273 if (!isObject2(O)) return false; 8274 var spreadable = O[IS_CONCAT_SPREADABLE]; 8275 return spreadable !== void 0 ? !!spreadable : isArray2(O); 8276 }; 8277 var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; 8278 $({ target: "Array", proto: true, forced: FORCED }, { 8279 // eslint-disable-next-line no-unused-vars -- required for `.length` 8280 concat: function concat(arg) { 8281 var O = toObject(this); 8282 var A = arraySpeciesCreate(O, 0); 8283 var n = 0; 8284 var i, k, length, len, E; 8285 for (i = -1, length = arguments.length; i < length; i++) { 8286 E = i === -1 ? O : arguments[i]; 8287 if (isConcatSpreadable(E)) { 8288 len = toLength(E.length); 8289 if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); 8290 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); 8291 } else { 8292 if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); 8293 createProperty(A, n++, E); 8294 } 8295 } 8296 A.length = n; 8297 return A; 8298 } 8299 }); 8300 }) 8301 ), 8302 /***/ 8303 "9bdd": ( 8304 /***/ 8305 (function(module2, exports$1, __webpack_require__) { 8306 var anObject = __webpack_require__("825a"); 8307 var iteratorClose = __webpack_require__("2a62"); 8308 module2.exports = function(iterator, fn, value, ENTRIES) { 8309 try { 8310 return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); 8311 } catch (error) { 8312 iteratorClose(iterator); 8313 throw error; 8314 } 8315 }; 8316 }) 8317 ), 8318 /***/ 8319 "9bf2": ( 8320 /***/ 8321 (function(module2, exports$1, __webpack_require__) { 8322 var DESCRIPTORS = __webpack_require__("83ab"); 8323 var IE8_DOM_DEFINE = __webpack_require__("0cfb"); 8324 var anObject = __webpack_require__("825a"); 8325 var toPrimitive = __webpack_require__("c04e"); 8326 var $defineProperty = Object.defineProperty; 8327 exports$1.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) { 8328 anObject(O); 8329 P = toPrimitive(P, true); 8330 anObject(Attributes); 8331 if (IE8_DOM_DEFINE) try { 8332 return $defineProperty(O, P, Attributes); 8333 } catch (error) { 8334 } 8335 if ("get" in Attributes || "set" in Attributes) throw TypeError("Accessors not supported"); 8336 if ("value" in Attributes) O[P] = Attributes.value; 8337 return O; 8338 }; 8339 }) 8340 ), 8341 /***/ 8342 "9ed3": ( 8343 /***/ 8344 (function(module2, exports$1, __webpack_require__) { 8345 var IteratorPrototype = __webpack_require__("ae93").IteratorPrototype; 8346 var create = __webpack_require__("7c73"); 8347 var createPropertyDescriptor = __webpack_require__("5c6c"); 8348 var setToStringTag = __webpack_require__("d44e"); 8349 var Iterators = __webpack_require__("3f8c"); 8350 var returnThis = function() { 8351 return this; 8352 }; 8353 module2.exports = function(IteratorConstructor, NAME, next) { 8354 var TO_STRING_TAG = NAME + " Iterator"; 8355 IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); 8356 setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); 8357 Iterators[TO_STRING_TAG] = returnThis; 8358 return IteratorConstructor; 8359 }; 8360 }) 8361 ), 8362 /***/ 8363 "9f7f": ( 8364 /***/ 8365 (function(module2, exports$1, __webpack_require__) { 8366 var fails = __webpack_require__("d039"); 8367 function RE(s, f) { 8368 return RegExp(s, f); 8369 } 8370 exports$1.UNSUPPORTED_Y = fails(function() { 8371 var re = RE("a", "y"); 8372 re.lastIndex = 2; 8373 return re.exec("abcd") != null; 8374 }); 8375 exports$1.BROKEN_CARET = fails(function() { 8376 var re = RE("^r", "gy"); 8377 re.lastIndex = 2; 8378 return re.exec("str") != null; 8379 }); 8380 }) 8381 ), 8382 /***/ 8383 "a434": ( 8384 /***/ 8385 (function(module2, exports$1, __webpack_require__) { 8386 var $ = __webpack_require__("23e7"); 8387 var toAbsoluteIndex = __webpack_require__("23cb"); 8388 var toInteger = __webpack_require__("a691"); 8389 var toLength = __webpack_require__("50c4"); 8390 var toObject = __webpack_require__("7b0b"); 8391 var arraySpeciesCreate = __webpack_require__("65f0"); 8392 var createProperty = __webpack_require__("8418"); 8393 var arrayMethodHasSpeciesSupport = __webpack_require__("1
vendor: 5,862 bytes, lines 8393-8510
8393dde"); 8394 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport("splice"); 8395 var max = Math.max; 8396 var min = Math.min; 8397 var MAX_SAFE_INTEGER = 9007199254740991; 8398 var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = "Maximum allowed length exceeded"; 8399 $({ target: "Array", proto: true, forced: !HAS_SPECIES_SUPPORT }, { 8400 splice: function splice(start, deleteCount) { 8401 var O = toObject(this); 8402 var len = toLength(O.length); 8403 var actualStart = toAbsoluteIndex(start, len); 8404 var argumentsLength = arguments.length; 8405 var insertCount, actualDeleteCount, A, k, from, to; 8406 if (argumentsLength === 0) { 8407 insertCount = actualDeleteCount = 0; 8408 } else if (argumentsLength === 1) { 8409 insertCount = 0; 8410 actualDeleteCount = len - actualStart; 8411 } else { 8412 insertCount = argumentsLength - 2; 8413 actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart); 8414 } 8415 if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { 8416 throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); 8417 } 8418 A = arraySpeciesCreate(O, actualDeleteCount); 8419 for (k = 0; k < actualDeleteCount; k++) { 8420 from = actualStart + k; 8421 if (from in O) createProperty(A, k, O[from]); 8422 } 8423 A.length = actualDeleteCount; 8424 if (insertCount < actualDeleteCount) { 8425 for (k = actualStart; k < len - actualDeleteCount; k++) { 8426 from = k + actualDeleteCount; 8427 to = k + insertCount; 8428 if (from in O) O[to] = O[from]; 8429 else delete O[to]; 8430 } 8431 for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; 8432 } else if (insertCount > actualDeleteCount) { 8433 for (k = len - actualDeleteCount; k > actualStart; k--) { 8434 from = k + actualDeleteCount - 1; 8435 to = k + insertCount - 1; 8436 if (from in O) O[to] = O[from]; 8437 else delete O[to]; 8438 } 8439 } 8440 for (k = 0; k < insertCount; k++) { 8441 O[k + actualStart] = arguments[k + 2]; 8442 } 8443 O.length = len - actualDeleteCount + insertCount; 8444 return A; 8445 } 8446 }); 8447 }) 8448 ), 8449 /***/ 8450 "a4b4": ( 8451 /***/ 8452 (function(module2, exports$1, __webpack_require__) { 8453 var userAgent = __webpack_require__("342f"); 8454 module2.exports = /web0s(?!.*chrome)/i.test(userAgent); 8455 }) 8456 ), 8457 /***/ 8458 "a4d3": ( 8459 /***/ 8460 (function(module2, exports$1, __webpack_require__) { 8461 var $ = __webpack_require__("23e7"); 8462 var global = __webpack_require__("da84"); 8463 var getBuiltIn = __webpack_require__("d066"); 8464 var IS_PURE = __webpack_require__("c430"); 8465 var DESCRIPTORS = __webpack_require__("83ab"); 8466 var NATIVE_SYMBOL = __webpack_require__("4930"); 8467 var USE_SYMBOL_AS_UID = __webpack_require__("fdbf"); 8468 var fails = __webpack_require__("d039"); 8469 var has = __webpack_require__("5135"); 8470 var isArray2 = __webpack_require__("e8b5"); 8471 var isObject2 = __webpack_require__("861d"); 8472 var anObject = __webpack_require__("825a"); 8473 var toObject = __webpack_require__("7b0b"); 8474 var toIndexedObject = __webpack_require__("fc6a"); 8475 var toPrimitive = __webpack_require__("c04e"); 8476 var createPropertyDescriptor = __webpack_require__("5c6c"); 8477 var nativeObjectCreate = __webpack_require__("7c73"); 8478 var objectKeys = __webpack_require__("df75"); 8479 var getOwnPropertyNamesModule = __webpack_require__("241c"); 8480 var getOwnPropertyNamesExternal = __webpack_require__("057f"); 8481 var getOwnPropertySymbolsModule = __webpack_require__("7418"); 8482 var getOwnPropertyDescriptorModule = __webpack_require__("06cf"); 8483 var definePropertyModule = __webpack_require__("9bf2"); 8484 var propertyIsEnumerableModule = __webpack_require__("d1e7"); 8485 var createNonEnumerableProperty = __webpack_require__("9112"); 8486 var redefine = __webpack_require__("6eeb"); 8487 var shared = __webpack_require__("5692"); 8488 var sharedKey = __webpack_require__("f772"); 8489 var hiddenKeys = __webpack_require__("d012"); 8490 var uid = __webpack_require__("90e3"); 8491 var wellKnownSymbol = __webpack_require__("b622"); 8492 var wrappedWellKnownSymbolModule = __webpack_require__("e538"); 8493 var defineWellKnownSymbol = __webpack_require__("746f"); 8494 var setToStringTag = __webpack_require__("d44e"); 8495 var InternalStateModule = __webpack_require__("69f3"); 8496 var $forEach = __webpack_require__("b727").forEach; 8497 var HIDDEN = sharedKey("hidden"); 8498 var SYMBOL = "Symbol"; 8499 var PROTOTYPE = "prototype"; 8500 var TO_PRIMITIVE = wellKnownSymbol("toPrimitive"); 8501 var setInternalState = InternalStateModule.set; 8502 var getInternalState = InternalStateModule.getterFor(SYMBOL); 8503 var ObjectPrototype = Object[PROTOTYPE]; 8504 var $Symbol = global.Symbol; 8505 var $stringify = getBuiltIn("JSON", "stringify"); 8506 var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; 8507 var nativeDefineProperty = definePropertyModule.f; 8508 var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f; 8509 var nativePropertyIsEnumerable = propertyIsEnumerableModule.f; 8510 var AllSymbols = shared("symbols");
vendor: 10,434 bytes, lines 8511-8714
8511 var ObjectPrototypeSymbols = shared("op-symbols"); 8512 var StringToSymbolRegistry = shared("string-to-symbol-registry"); 8513 var SymbolToStringRegistry = shared("symbol-to-string-registry"); 8514 var WellKnownSymbolsStore = shared("wks"); 8515 var QObject = global.QObject; 8516 var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; 8517 var setSymbolDescriptor = DESCRIPTORS && fails(function() { 8518 return nativeObjectCreate(nativeDefineProperty({}, "a", { 8519 get: function() { 8520 return nativeDefineProperty(this, "a", { value: 7 }).a; 8521 } 8522 })).a != 7; 8523 }) ? function(O, P, Attributes) { 8524 var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); 8525 if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; 8526 nativeDefineProperty(O, P, Attributes); 8527 if (ObjectPrototypeDescriptor && O !== ObjectPrototype) { 8528 nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor); 8529 } 8530 } : nativeDefineProperty; 8531 var wrap = function(tag, description) { 8532 var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]); 8533 setInternalState(symbol, { 8534 type: SYMBOL, 8535 tag, 8536 description 8537 }); 8538 if (!DESCRIPTORS) symbol.description = description; 8539 return symbol; 8540 }; 8541 var isSymbol2 = USE_SYMBOL_AS_UID ? function(it) { 8542 return typeof it == "symbol"; 8543 } : function(it) { 8544 return Object(it) instanceof $Symbol; 8545 }; 8546 var $defineProperty = function defineProperty(O, P, Attributes) { 8547 if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes); 8548 anObject(O); 8549 var key = toPrimitive(P, true); 8550 anObject(Attributes); 8551 if (has(AllSymbols, key)) { 8552 if (!Attributes.enumerable) { 8553 if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {})); 8554 O[HIDDEN][key] = true; 8555 } else { 8556 if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; 8557 Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); 8558 } 8559 return setSymbolDescriptor(O, key, Attributes); 8560 } 8561 return nativeDefineProperty(O, key, Attributes); 8562 }; 8563 var $defineProperties = function defineProperties(O, Properties) { 8564 anObject(O); 8565 var properties = toIndexedObject(Properties); 8566 var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); 8567 $forEach(keys, function(key) { 8568 if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]); 8569 }); 8570 return O; 8571 }; 8572 var $create = function create(O, Properties) { 8573 return Properties === void 0 ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties); 8574 }; 8575 var $propertyIsEnumerable = function propertyIsEnumerable(V) { 8576 var P = toPrimitive(V, true); 8577 var enumerable = nativePropertyIsEnumerable.call(this, P); 8578 if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false; 8579 return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true; 8580 }; 8581 var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { 8582 var it = toIndexedObject(O); 8583 var key = toPrimitive(P, true); 8584 if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return; 8585 var descriptor = nativeGetOwnPropertyDescriptor(it, key); 8586 if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) { 8587 descriptor.enumerable = true; 8588 } 8589 return descriptor; 8590 }; 8591 var $getOwnPropertyNames = function getOwnPropertyNames(O) { 8592 var names = nativeGetOwnPropertyNames(toIndexedObject(O)); 8593 var result = []; 8594 $forEach(names, function(key) { 8595 if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key); 8596 }); 8597 return result; 8598 }; 8599 var $getOwnPropertySymbols = function getOwnPropertySymbols(O) { 8600 var IS_OBJECT_PROTOTYPE = O === ObjectPrototype; 8601 var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); 8602 var result = []; 8603 $forEach(names, function(key) { 8604 if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) { 8605 result.push(AllSymbols[key]); 8606 } 8607 }); 8608 return result; 8609 }; 8610 if (!NATIVE_SYMBOL) { 8611 $Symbol = function Symbol2() { 8612 if (this instanceof $Symbol) throw TypeError("Symbol is not a constructor"); 8613 var description = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]); 8614 var tag = uid(description); 8615 var setter = function(value) { 8616 if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value); 8617 if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; 8618 setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value)); 8619 }; 8620 if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); 8621 return wrap(tag, description); 8622 }; 8623 redefine($Symbol[PROTOTYPE], "toString", function toString() { 8624 return getInternalState(this).tag; 8625 }); 8626 redefine($Symbol, "withoutSetter", function(description) { 8627 return wrap(uid(description), description); 8628 }); 8629 propertyIsEnumerableModule.f = $propertyIsEnumerable; 8630 definePropertyModule.f = $defineProperty; 8631 getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; 8632 getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; 8633 getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; 8634 wrappedWellKnownSymbolModule.f = function(name) { 8635 return wrap(wellKnownSymbol(name), name); 8636 }; 8637 if (DESCRIPTORS) { 8638 nativeDefineProperty($Symbol[PROTOTYPE], "description", { 8639 configurable: true, 8640 get: function description() { 8641 return getInternalState(this).description; 8642 } 8643 }); 8644 if (!IS_PURE) { 8645 redefine(ObjectPrototype, "propertyIsEnumerable", $propertyIsEnumerable, { unsafe: true }); 8646 } 8647 } 8648 } 8649 $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { 8650 Symbol: $Symbol 8651 }); 8652 $forEach(objectKeys(WellKnownSymbolsStore), function(name) { 8653 defineWellKnownSymbol(name); 8654 }); 8655 $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, { 8656 // `Symbol.for` method 8657 // https://tc39.es/ecma262/#sec-symbol.for 8658 "for": function(key) { 8659 var string = String(key); 8660 if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; 8661 var symbol = $Symbol(string); 8662 StringToSymbolRegistry[string] = symbol; 8663 SymbolToStringRegistry[symbol] = string; 8664 return symbol; 8665 }, 8666 // `Symbol.keyFor` method 8667 // https://tc39.es/ecma262/#sec-symbol.keyfor 8668 keyFor: function keyFor(sym) { 8669 if (!isSymbol2(sym)) throw TypeError(sym + " is not a symbol"); 8670 if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; 8671 }, 8672 useSetter: function() { 8673 USE_SETTER = true; 8674 }, 8675 useSimple: function() { 8676 USE_SETTER = false; 8677 } 8678 }); 8679 $({ target: "Object", stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, { 8680 // `Object.create` method 8681 // https://tc39.es/ecma262/#sec-object.create 8682 create: $create, 8683 // `Object.defineProperty` method 8684 // https://tc39.es/ecma262/#sec-object.defineproperty 8685 defineProperty: $defineProperty, 8686 // `Object.defineProperties` method 8687 // https://tc39.es/ecma262/#sec-object.defineproperties 8688 defineProperties: $defineProperties, 8689 // `Object.getOwnPropertyDescriptor` method 8690 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors 8691 getOwnPropertyDescriptor: $getOwnPropertyDescriptor 8692 }); 8693 $({ target: "Object", stat: true, forced: !NATIVE_SYMBOL }, { 8694 // `Object.getOwnPropertyNames` method 8695 // https://tc39.es/ecma262/#sec-object.getownpropertynames 8696 getOwnPropertyNames: $getOwnPropertyNames, 8697 // `Object.getOwnPropertySymbols` method 8698 // https://tc39.es/ecma262/#sec-object.getownpropertysymbols 8699 getOwnPropertySymbols: $getOwnPropertySymbols 8700 }); 8701 $({ target: "Object", stat: true, forced: fails(function() { 8702 getOwnPropertySymbolsModule.f(1); 8703 }) }, { 8704 getOwnPropertySymbols: function getOwnPropertySymbols(it) { 8705 return getOwnPropertySymbolsModule.f(toObject(it)); 8706 } 8707 }); 8708 if ($stringify) { 8709 var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function() { 8710 var symbol = $Symbol(); 8711 return $stringify([symbol]) != "[null]" || $stringify({ a: symbol }) != "{}" || $stringify(Object(symbol)) != "{}"; 8712 }); 8713 $({ target: "JSON", stat: true, forced: FORCED_JSON_STRINGIFY }, { 8714 // eslint-disable-next-line no-unused-vars -- required for `.length`
8715 stringify: function stringify(it, replacer, space) { 8716 var args = [it]; 8717 var index = 1; 8718 var $replacer; 8719 while (arguments.length > index) args.push(arguments[index++]); 8720 $replacer = replacer; 8721 if (!isObject2(replacer) && it === void 0 || isSymbol2(it)) return; 8722 if (!isArray2(replacer)) replacer = function(key, value) { 8723 if (typeof $replacer == "function") value = $replacer.call(this, key, value); 8724 if (!isSymbol2(value)) return value; 8725 }; 8726 args[1] = replacer; 8727 return $stringify.apply(null, args); 8728 } 8729 }); 8730 } 8731 if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) { 8732 createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); 8733 } 8734 setToStringTag($Symbol, SYMBOL); 8735 hiddenKeys[HIDDEN] = true; 8736 }) 8737 ), 8738 /***/ 8739 "a630": ( 8740 /***/ 8741 (function(module2, exports$1, __webpack_require__) { 8742 var $ = __webpack_require__("23e7"); 8743 var from = __webpack_require__("4df4"); 8744 var checkCorrectnessOfIteration = __webpack_require__("1c7e"); 8745 var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function(iterable) { 8746 Array.from(iterable); 8747 }); 8748 $({ target: "Array", stat: true, forced: INCORRECT_ITERATION }, { 8749 from 8750 }); 8751 }) 8752 ), 8753 /***/ 8754 "a640": ( 8755 /***/ 8756 (function(module2, exports$1, __webpack_require__) { 8757 var fails = __webpack_require__("d039"); 8758 module2.exports = function(METHOD_NAME, argument) { 8759 var method = [][METHOD_NAME]; 8760 return !!method && fails(function() { 8761 method.call(null, argument || function() { 8762 throw 1; 8763 }, 1); 8764 }); 8765 }; 8766 }) 8767 ), 8768 /***/ 8769 "a691": ( 8770 /***/ 8771 (function(module2, exports$1) { 8772 var ceil = Math.ceil; 8773 var floor = Math.floor; 8774 module2.exports = function(argument) { 8775 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); 8776 }; 8777 }) 8778 ), 8779 /***/ 8780 "ac1f": ( 8781 /***/ 8782 (function(module2, exports$1, __webpack_require__) { 8783 var $ = __webpack_require__("23e7"); 8784 var exec = __webpack_require__("9263"); 8785 $({ target: "RegExp", proto: true, forced: /./.exec !== exec }, { 8786 exec 8787 }); 8788 }) 8789 ), 8790 /***/ 8791 "ad6d": ( 8792 /***/ 8793 (function(module2, exports$1, __webpack_require__) { 8794 var anObject = __webpack_require__("825a"); 8795 module2.exports = function() { 8796 var that = anObject(this); 8797 var result = ""; 8798 if (that.global) result += "g"; 8799 if (that.ignoreCase) result += "i"; 8800 if (that.multiline) result += "m"; 8801 if (that.dotAll) result += "s"; 8802 if (that.unicode) result += "u"; 8803 if (that.sticky) result += "y"; 8804 return result; 8805 }; 8806 }) 8807 ), 8808 /***/ 8809 "ae93": ( 8810 /***/ 8811 (function(module2, exports$1, __webpack_require__) { 8812 var fails = __webpack_require__("d039"); 8813 var getPrototypeOf = __webpack_require__("e163"); 8814 var createNonEnumerableProperty = __webpack_require__("9112"); 8815 var has = __webpack_require__("5135"); 8816 var wellKnownSymbol = __webpack_require__("b622"); 8817 var IS_PURE = __webpack_require__("c430"); 8818 var ITERATOR = wellKnownSymbol("iterator"); 8819 var BUGGY_SAFARI_ITERATORS = false; 8820 var returnThis = function() { 8821 return this; 8822 }; 8823 var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; 8824 if ([].keys) { 8825 arrayIterator = [].keys(); 8826 if (!("next" in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; 8827 else { 8828 PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); 8829 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; 8830 } 8831 } 8832 var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == void 0 || fails(function() { 8833 var test = {}; 8834 return IteratorPrototype[ITERATOR].call(test) !== test; 8835 }); 8836 if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; 8837 if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) { 8838 createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); 8839 } 8840 module2.exports = { 8841 IteratorPrototype, 8842 BUGGY_SAFARI_ITERATORS 8843 }; 8844 }) 8845 ), 8846 /***/ 8847 "b041": ( 8848 /***/ 8849 (function(module2, exports$1, __webpack_require__) { 8850 var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee"); 8851 var classof = __webpack_require__("f5df"); 8852 module2.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { 8853 return "[object " + classof(this) + "]"; 8854 }; 8855 }) 8856 ), 8857 /***/ 8858 "b0c0": ( 8859 /***/ 8860 (function(module2, exports$1, __webpack_require__) { 8861 var DESCRIPTORS = __webpack_require__("83ab"); 8862 var defineProperty = __webpack_require__("9bf2").f; 8863 var FunctionPrototype = Function.prototype; 8864 var FunctionPrototypeToString = FunctionPrototype.toString; 8865 var nameRE = /^\s*function ([^ (]*)/; 8866 var NAME = "name"; 8867 if (DESCRIPTORS && !(NAME in FunctionPrototype)) { 8868 defineProperty(FunctionPrototype, NAME, { 8869 configurable: true, 8870 get: function() { 8871 try { 8872 return FunctionPrototypeToString.call(this).match(nameRE)[1]; 8873 } catch (error) { 8874 return ""; 8875 } 8876 } 8877 }); 8878 } 8879 }) 8880 ), 8881 /***/ 8882 "b575": ( 8883 /***/ 8884 (function(module2, exports$1, __webpack_require__) { 8885 var global = __webpack_require__("da84"); 8886 var getOwnPropertyDescriptor = __webpack_require__("06cf").f; 8887 var macrotask = __webpack_require__("2cf4").set; 8888 var IS_IOS = __webpack_require__("1cdc"); 8889 var IS_WEBOS_WEBKIT = __webpack_require__("a4b4"); 8890 var IS_NODE = __webpack_require__("605d"); 8891 var MutationObserver = global.MutationObserver || global.WebKitMutationObserver; 8892 var document2 = global.document; 8893 var process = global.process; 8894 var Promise2 = global.Promise; 8895 var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, "queueMicrotask"); 8896 var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; 8897 var flush, head, last, notify, toggle, node, promise, then; 8898 if (!queueMicrotask) { 8899 flush = function() { 8900 var parent, fn; 8901 if (IS_NODE && (parent = process.domain)) parent.exit(); 8902 while (head) { 8903 fn = head.fn; 8904 head = head.next; 8905 try { 8906 fn(); 8907 } catch (error) { 8908 if (head) notify(); 8909 else last = void 0; 8910 throw error; 8911 } 8912 } 8913 last = void 0; 8914 if (parent) parent.enter(); 8915 }; 8916 if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document2) { 8917 toggle = true; 8918 node = document2.createTextNode(""); 8919 new MutationObserver(flush).observe(node, { characterData: true }); 8920 notify = function() { 8921 node.data = toggle = !toggle; 8922 }; 8923 } else if (Promise2 && Promise2.resolve) { 8924 promise = Promise2.resolve(void 0); 8925 then = promise.then; 8926 notify = function() { 8927 then.call(promise, flush); 8928 }; 8929 } else if (IS_NODE) { 8930 notify = function() { 8931 process.nextTick(flush); 8932 }; 8933 } else { 8934 notify = function() { 8935 macrotask.call(global, flush); 8936 }; 8937 } 8938 } 8939 module2.exports = queueMicrotask || function(fn) { 8940 var task = { fn, next: void 0 }; 8941 if (last) last.next = task; 8942 if (!head) { 8943 head = task; 8944 notify(); 8945 } 8946 last = task; 8947 }; 8948 }) 8949 ), 8950 /***/ 8951 "b622": ( 8952 /***/ 8953 (function(module2, exports$1, __webpack_require__) { 8954 var global = __webpack_require__("da84"); 8955 var shared = __webpack_require__("5692"); 8956 var has = __webpack_require__("5135"); 8957 var uid = __webpack_require__("90e3"); 8958 var NATIVE_SYMBOL = __webpack_require__("4930"); 8959 var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
vendor: 5,785 bytes, lines 8960-9097
8960 var WellKnownSymbolsStore = shared("wks"); 8961 var Symbol2 = global.Symbol; 8962 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid; 8963 module2.exports = function(name) { 8964 if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == "string")) { 8965 if (NATIVE_SYMBOL && has(Symbol2, name)) { 8966 WellKnownSymbolsStore[name] = Symbol2[name]; 8967 } else { 8968 WellKnownSymbolsStore[name] = createWellKnownSymbol("Symbol." + name); 8969 } 8970 } 8971 return WellKnownSymbolsStore[name]; 8972 }; 8973 }) 8974 ), 8975 /***/ 8976 "b64b": ( 8977 /***/ 8978 (function(module2, exports$1, __webpack_require__) { 8979 var $ = __webpack_require__("23e7"); 8980 var toObject = __webpack_require__("7b0b"); 8981 var nativeKeys = __webpack_require__("df75"); 8982 var fails = __webpack_require__("d039"); 8983 var FAILS_ON_PRIMITIVES = fails(function() { 8984 nativeKeys(1); 8985 }); 8986 $({ target: "Object", stat: true, forced: FAILS_ON_PRIMITIVES }, { 8987 keys: function keys(it) { 8988 return nativeKeys(toObject(it)); 8989 } 8990 }); 8991 }) 8992 ), 8993 /***/ 8994 "b727": ( 8995 /***/ 8996 (function(module2, exports$1, __webpack_require__) { 8997 var bind = __webpack_require__("0366"); 8998 var IndexedObject = __webpack_require__("44ad"); 8999 var toObject = __webpack_require__("7b0b"); 9000 var toLength = __webpack_require__("50c4"); 9001 var arraySpeciesCreate = __webpack_require__("65f0"); 9002 var push = [].push; 9003 var createMethod = function(TYPE) { 9004 var IS_MAP = TYPE == 1; 9005 var IS_FILTER = TYPE == 2; 9006 var IS_SOME = TYPE == 3; 9007 var IS_EVERY = TYPE == 4; 9008 var IS_FIND_INDEX = TYPE == 6; 9009 var IS_FILTER_OUT = TYPE == 7; 9010 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; 9011 return function($this, callbackfn, that, specificCreate) { 9012 var O = toObject($this); 9013 var self2 = IndexedObject(O); 9014 var boundFunction = bind(callbackfn, that, 3); 9015 var length = toLength(self2.length); 9016 var index = 0; 9017 var create = specificCreate || arraySpeciesCreate; 9018 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : void 0; 9019 var value, result; 9020 for (; length > index; index++) if (NO_HOLES || index in self2) { 9021 value = self2[index]; 9022 result = boundFunction(value, index, O); 9023 if (TYPE) { 9024 if (IS_MAP) target[index] = result; 9025 else if (result) switch (TYPE) { 9026 case 3: 9027 return true; 9028 // some 9029 case 5: 9030 return value; 9031 // find 9032 case 6: 9033 return index; 9034 // findIndex 9035 case 2: 9036 push.call(target, value); 9037 } 9038 else switch (TYPE) { 9039 case 4: 9040 return false; 9041 // every 9042 case 7: 9043 push.call(target, value); 9044 } 9045 } 9046 } 9047 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; 9048 }; 9049 }; 9050 module2.exports = { 9051 // `Array.prototype.forEach` method 9052 // https://tc39.es/ecma262/#sec-array.prototype.foreach 9053 forEach: createMethod(0), 9054 // `Array.prototype.map` method 9055 // https://tc39.es/ecma262/#sec-array.prototype.map 9056 map: createMethod(1), 9057 // `Array.prototype.filter` method 9058 // https://tc39.es/ecma262/#sec-array.prototype.filter 9059 filter: createMethod(2), 9060 // `Array.prototype.some` method 9061 // https://tc39.es/ecma262/#sec-array.prototype.some 9062 some: createMethod(3), 9063 // `Array.prototype.every` method 9064 // https://tc39.es/ecma262/#sec-array.prototype.every 9065 every: createMethod(4), 9066 // `Array.prototype.find` method 9067 // https://tc39.es/ecma262/#sec-array.prototype.find 9068 find: createMethod(5), 9069 // `Array.prototype.findIndex` method 9070 // https://tc39.es/ecma262/#sec-array.prototype.findIndex 9071 findIndex: createMethod(6), 9072 // `Array.prototype.filterOut` method 9073 // https://github.com/tc39/proposal-array-filtering 9074 filterOut: createMethod(7) 9075 }; 9076 }) 9077 ), 9078 /***/ 9079 "c04e": ( 9080 /***/ 9081 (function(module2, exports$1, __webpack_require__) { 9082 var isObject2 = __webpack_require__("861d"); 9083 module2.exports = function(input, PREFERRED_STRING) { 9084 if (!isObject2(input)) return input; 9085 var fn, val; 9086 if (PREFERRED_STRING && typeof (fn = input.toString) == "function" && !isObject2(val = fn.call(input))) return val; 9087 if (typeof (fn = input.valueOf) == "function" && !isObject2(val = fn.call(input))) return val; 9088 if (!PREFERRED_STRING && typeof (fn = input.toString) == "function" && !isObject2(val = fn.call(input))) return val; 9089 throw TypeError("Can't convert object to primitive value"); 9090 }; 9091 }) 9092 ), 9093 /***/ 9094 "c430": ( 9095 /***/ 9096 (function(module2, exports$1) { 9097 module2.exports = false;
9098 }) 9099 ), 9100 /***/ 9101 "c6b6": ( 9102 /***/ 9103 (function(module2, exports$1) { 9104 var toString = {}.toString; 9105 module2.exports = function(it) { 9106 return toString.call(it).slice(8, -1); 9107 }; 9108 }) 9109 ), 9110 /***/ 9111 "c6cd": ( 9112 /***/ 9113 (function(module2, exports$1, __webpack_require__) { 9114 var global = __webpack_require__("da84"); 9115 var setGlobal = __webpack_require__("ce4e"); 9116 var SHARED = "__core-js_shared__"; 9117 var store = global[SHARED] || setGlobal(SHARED, {}); 9118 module2.exports = store; 9119 }) 9120 ), 9121 /***/ 9122 "c8ba": ( 9123 /***/ 9124 (function(module2, exports$1) { 9125 var g; 9126 g = /* @__PURE__ */ (function() { 9127 return this; 9128 })(); 9129 try { 9130 g = g || new Function("return this")(); 9131 } catch (e) { 9132 if (typeof window === "object") g = window; 9133 } 9134 module2.exports = g; 9135 }) 9136 ), 9137 /***/ 9138 "ca84": ( 9139 /***/ 9140 (function(module2, exports$1, __webpack_require__) { 9141 var has = __webpack_require__("5135"); 9142 var toIndexedObject = __webpack_require__("fc6a"); 9143 var indexOf = __webpack_require__("4d64").indexOf; 9144 var hiddenKeys = __webpack_require__("d012"); 9145 module2.exports = function(object, names) { 9146 var O = toIndexedObject(object); 9147 var i = 0; 9148 var result = []; 9149 var key; 9150 for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); 9151 while (names.length > i) if (has(O, key = names[i++])) { 9152 ~indexOf(result, key) || result.push(key); 9153 } 9154 return result; 9155 }; 9156 }) 9157 ), 9158 /***/ 9159 "cc12": ( 9160 /***/ 9161 (function(module2, exports$1, __webpack_require__) { 9162 var global = __webpack_require__("da84"); 9163 var isObject2 = __webpack_require__("861d"); 9164 var document2 = global.document; 9165 var EXISTS = isObject2(document2) && isObject2(document2.createElement); 9166 module2.exports = function(it) { 9167 return EXISTS ? document2.createElement(it) : {}; 9168 }; 9169 }) 9170 ), 9171 /***/ 9172 "cdf9": ( 9173 /***/ 9174 (function(module2, exports$1, __webpack_require__) { 9175 var anObject = __webpack_require__("825a"); 9176 var isObject2 = __webpack_require__("861d"); 9177 var newPromiseCapability = __webpack_require__("f069"); 9178 module2.exports = function(C, x) { 9179 anObject(C); 9180 if (isObject2(x) && x.constructor === C) return x; 9181 var promiseCapability = newPromiseCapability.f(C); 9182 var resolve = promiseCapability.resolve; 9183 resolve(x); 9184 return promiseCapability.promise; 9185 }; 9186 }) 9187 ), 9188 /***/ 9189 "ce4e": ( 9190 /***/ 9191 (function(module2, exports$1, __webpack_require__) { 9192 var global = __webpack_require__("da84"); 9193 var createNonEnumerableProperty = __webpack_require__("9112"); 9194 module2.exports = function(key, value) { 9195 try { 9196 createNonEnumerableProperty(global, key, value); 9197 } catch (error) { 9198 global[key] = value; 9199 } 9200 return value; 9201 }; 9202 }) 9203 ), 9204 /***/ 9205 "d012": ( 9206 /***/ 9207 (function(module2, exports$1) { 9208 module2.exports = {}; 9209 }) 9210 ), 9211 /***/ 9212 "d039": ( 9213 /***/ 9214 (function(module2, exports$1) { 9215 module2.exports = function(exec) { 9216 try { 9217 return !!exec(); 9218 } catch (error) { 9219 return true; 9220 } 9221 }; 9222 }) 9223 ), 9224 /***/ 9225 "d066": ( 9226 /***/ 9227 (function(module2, exports$1, __webpack_require__) { 9228 var path = __webpack_require__("428f"); 9229 var global = __webpack_require__("da84"); 9230 var aFunction = function(variable) { 9231 return typeof variable == "function" ? variable : void 0; 9232 }; 9233 module2.exports = function(namespace, method) { 9234 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; 9235 }; 9236 }) 9237 ), 9238 /***/ 9239 "d1e7": ( 9240 /***/ 9241 (function(module2, exports$1, __webpack_require__) { 9242 var $propertyIsEnumerable = {}.propertyIsEnumerable; 9243 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 9244 var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); 9245 exports$1.f = NASHORN_BUG ? function propertyIsEnumerable(V) { 9246 var descriptor = getOwnPropertyDescriptor(this, V); 9247 return !!descriptor && descriptor.enumerable; 9248 } : $propertyIsEnumerable; 9249 }) 9250 ), 9251 /***/ 9252 "d28b": ( 9253 /***/ 9254 (function(module2, exports$1, __webpack_require__) { 9255 var defineWellKnownSymbol = __webpack_require__("746f"); 9256 defineWellKnownSymbol("iterator"); 9257 }) 9258 ), 9259 /***/ 9260 "d2bb": ( 9261 /***/ 9262 (function(module2, exports$1, __webpack_require__) { 9263 var anObject = __webpack_require__("825a"); 9264 var aPossiblePrototype = __webpack_require__("3bbe"); 9265 module2.exports = Object.setPrototypeOf || ("__proto__" in {} ? (function() { 9266 var CORRECT_SETTER = false;
vendor: 5,923 bytes, lines 9267-9415
9267 var test = {}; 9268 var setter; 9269 try { 9270 setter = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set; 9271 setter.call(test, []); 9272 CORRECT_SETTER = test instanceof Array; 9273 } catch (error) { 9274 } 9275 return function setPrototypeOf(O, proto) { 9276 anObject(O); 9277 aPossiblePrototype(proto); 9278 if (CORRECT_SETTER) setter.call(O, proto); 9279 else O.__proto__ = proto; 9280 return O; 9281 }; 9282 })() : void 0); 9283 }) 9284 ), 9285 /***/ 9286 "d3b7": ( 9287 /***/ 9288 (function(module2, exports$1, __webpack_require__) { 9289 var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee"); 9290 var redefine = __webpack_require__("6eeb"); 9291 var toString = __webpack_require__("b041"); 9292 if (!TO_STRING_TAG_SUPPORT) { 9293 redefine(Object.prototype, "toString", toString, { unsafe: true }); 9294 } 9295 }) 9296 ), 9297 /***/ 9298 "d44e": ( 9299 /***/ 9300 (function(module2, exports$1, __webpack_require__) { 9301 var defineProperty = __webpack_require__("9bf2").f; 9302 var has = __webpack_require__("5135"); 9303 var wellKnownSymbol = __webpack_require__("b622"); 9304 var TO_STRING_TAG = wellKnownSymbol("toStringTag"); 9305 module2.exports = function(it, TAG, STATIC) { 9306 if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { 9307 defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); 9308 } 9309 }; 9310 }) 9311 ), 9312 /***/ 9313 "d784": ( 9314 /***/ 9315 (function(module2, exports$1, __webpack_require__) { 9316 __webpack_require__("ac1f"); 9317 var redefine = __webpack_require__("6eeb"); 9318 var fails = __webpack_require__("d039"); 9319 var wellKnownSymbol = __webpack_require__("b622"); 9320 var createNonEnumerableProperty = __webpack_require__("9112"); 9321 var SPECIES = wellKnownSymbol("species"); 9322 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function() { 9323 var re = /./; 9324 re.exec = function() { 9325 var result = []; 9326 result.groups = { a: "7" }; 9327 return result; 9328 }; 9329 return "".replace(re, "$<a>") !== "7"; 9330 }); 9331 var REPLACE_KEEPS_$0 = (function() { 9332 return "a".replace(/./, "$0") === "$0"; 9333 })(); 9334 var REPLACE = wellKnownSymbol("replace"); 9335 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function() { 9336 if (/./[REPLACE]) { 9337 return /./[REPLACE]("a", "$0") === ""; 9338 } 9339 return false; 9340 })(); 9341 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function() { 9342 var re = /(?:)/; 9343 var originalExec = re.exec; 9344 re.exec = function() { 9345 return originalExec.apply(this, arguments); 9346 }; 9347 var result = "ab".split(re); 9348 return result.length !== 2 || result[0] !== "a" || result[1] !== "b"; 9349 }); 9350 module2.exports = function(KEY, length, exec, sham) { 9351 var SYMBOL = wellKnownSymbol(KEY); 9352 var DELEGATES_TO_SYMBOL = !fails(function() { 9353 var O = {}; 9354 O[SYMBOL] = function() { 9355 return 7; 9356 }; 9357 return ""[KEY](O) != 7; 9358 }); 9359 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function() { 9360 var execCalled = false; 9361 var re = /a/; 9362 if (KEY === "split") { 9363 re = {}; 9364 re.constructor = {}; 9365 re.constructor[SPECIES] = function() { 9366 return re; 9367 }; 9368 re.flags = ""; 9369 re[SYMBOL] = /./[SYMBOL]; 9370 } 9371 re.exec = function() { 9372 execCalled = true; 9373 return null; 9374 }; 9375 re[SYMBOL](""); 9376 return !execCalled; 9377 }); 9378 if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === "replace" && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0 && !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE) || KEY === "split" && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) { 9379 var nativeRegExpMethod = /./[SYMBOL]; 9380 var methods = exec(SYMBOL, ""[KEY], function(nativeMethod, regexp, str, arg2, forceStringMethod) { 9381 if (regexp.exec === RegExp.prototype.exec) { 9382 if (DELEGATES_TO_SYMBOL && !forceStringMethod) { 9383 return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; 9384 } 9385 return { done: true, value: nativeMethod.call(str, regexp, arg2) }; 9386 } 9387 return { done: false }; 9388 }, { 9389 REPLACE_KEEPS_$0, 9390 REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE 9391 }); 9392 var stringMethod = methods[0]; 9393 var regexMethod = methods[1]; 9394 redefine(String.prototype, KEY, stringMethod); 9395 redefine( 9396 RegExp.prototype, 9397 SYMBOL, 9398 length == 2 ? function(string, arg) { 9399 return regexMethod.call(string, this, arg); 9400 } : function(string) { 9401 return regexMethod.call(string, this); 9402 } 9403 ); 9404 } 9405 if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], "sham", true); 9406 }; 9407 }) 9408 ), 9409 /***/ 9410 "d81d": ( 9411 /***/ 9412 (function(module2, exports$1, __webpack_require__) { 9413 var $ = __webpack_require__("23e7"); 9414 var $map = __webpack_require__("b727").map; 9415 var arrayMethodHasSpeciesSupport = __webpack_require__("1
9415dde"); 9416 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport("map"); 9417 $({ target: "Array", proto: true, forced: !HAS_SPECIES_SUPPORT }, { 9418 map: function map(callbackfn) { 9419 return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : void 0); 9420 } 9421 }); 9422 }) 9423 ), 9424 /***/ 9425 "da84": ( 9426 /***/ 9427 (function(module2, exports$1, __webpack_require__) { 9428 (function(global) { 9429 var check = function(it) { 9430 return it && it.Math == Math && it; 9431 }; 9432 module2.exports = // eslint-disable-next-line es/no-global-this -- safe 9433 check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe 9434 check(typeof self == "object" && self) || check(typeof global == "object" && global) || // eslint-disable-next-line no-new-func -- fallback 9435 /* @__PURE__ */ (function() { 9436 return this; 9437 })() || Function("return this")(); 9438 }).call(this, __webpack_require__("c8ba")); 9439 }) 9440 ), 9441 /***/ 9442 "dbb4": ( 9443 /***/ 9444 (function(module2, exports$1, __webpack_require__) { 9445 var $ = __webpack_require__("23e7"); 9446 var DESCRIPTORS = __webpack_require__("83ab"); 9447 var ownKeys = __webpack_require__("56ef"); 9448 var toIndexedObject = __webpack_require__("fc6a"); 9449 var getOwnPropertyDescriptorModule = __webpack_require__("06cf"); 9450 var createProperty = __webpack_require__("8418"); 9451 $({ target: "Object", stat: true, sham: !DESCRIPTORS }, { 9452 getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { 9453 var O = toIndexedObject(object); 9454 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; 9455 var keys = ownKeys(O); 9456 var result = {}; 9457 var index = 0; 9458 var key, descriptor; 9459 while (keys.length > index) { 9460 descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); 9461 if (descriptor !== void 0) createProperty(result, key, descriptor); 9462 } 9463 return result; 9464 } 9465 }); 9466 }) 9467 ), 9468 /***/ 9469 "ddb0": ( 9470 /***/ 9471 (function(module2, exports$1, __webpack_require__) { 9472 var global = __webpack_require__("da84"); 9473 var DOMIterables = __webpack_require__("fdbc"); 9474 var ArrayIteratorMethods = __webpack_require__("e260"); 9475 var createNonEnumerableProperty = __webpack_require__("9112"); 9476 var wellKnownSymbol = __webpack_require__("b622"); 9477 var ITERATOR = wellKnownSymbol("iterator"); 9478 var TO_STRING_TAG = wellKnownSymbol("toStringTag"); 9479 var ArrayValues = ArrayIteratorMethods.values; 9480 for (var COLLECTION_NAME in DOMIterables) { 9481 var Collection = global[COLLECTION_NAME]; 9482 var CollectionPrototype = Collection && Collection.prototype; 9483 if (CollectionPrototype) { 9484 if (CollectionPrototype[ITERATOR] !== ArrayValues) try { 9485 createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); 9486 } catch (error) { 9487 CollectionPrototype[ITERATOR] = ArrayValues; 9488 } 9489 if (!CollectionPrototype[TO_STRING_TAG]) { 9490 createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); 9491 } 9492 if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { 9493 if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { 9494 createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); 9495 } catch (error) { 9496 CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; 9497 } 9498 } 9499 } 9500 } 9501 }) 9502 ), 9503 /***/ 9504 "df75": ( 9505 /***/ 9506 (function(module2, exports$1, __webpack_require__) { 9507 var internalObjectKeys = __webpack_require__("ca84"); 9508 var enumBugKeys = __webpack_require__("7839"); 9509 module2.exports = Object.keys || function keys(O) { 9510 return internalObjectKeys(O, enumBugKeys); 9511 }; 9512 }) 9513 ), 9514 /***/ 9515 "e01a": ( 9516 /***/ 9517 (function(module2, exports$1, __webpack_require__) { 9518 var $ = __webpack_require__("23e7"); 9519 var DESCRIPTORS = __webpack_require__("83ab"); 9520 var global = __webpack_require__("da84"); 9521 var has = __webpack_require__("5135"); 9522 var isObject2 = __webpack_require__("861d"); 9523 var defineProperty = __webpack_require__("9bf2").f; 9524 var copyConstructorProperties = __webpack_require__("e893"); 9525 var NativeSymbol = global.Symbol; 9526 if (DESCRIPTORS && typeof NativeSymbol == "function" && (!("description" in NativeSymbol.prototype) || // Safari 12 bug 9527 NativeSymbol().description !== void 0)) { 9528 var EmptyStringDescriptionStore = {}; 9529 var SymbolWrapper = function Symbol2() { 9530 var description = arguments.length < 1 || arguments[0] === void 0 ? void 0 : String(arguments[0]); 9531 var result = this instanceof SymbolWrapper ? new NativeSymbol(description) : description === void 0 ? NativeSymbol() : NativeSymbol(description); 9532 if (description === "") EmptyStringDescriptionStore[result] = true; 9533 return result; 9534 }; 9535 copyConstructorProperties(SymbolWrapper, NativeSymbol); 9536 var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype; 9537 symbolPrototype.constructor = SymbolWrapper; 9538 var symbolToString = symbolPrototype.toString; 9539 var native = String(NativeSymbol("test")) == "Symbol(test)"; 9540 var regexp = /^Symbol\((.*)\)[^)]+$/; 9541 defineProperty(symbolPrototype, "description", { 9542 configurable: true, 9543 get: function description() { 9544 var symbol = isObject2(this) ? this.valueOf() : this; 9545 var string = symbolToString.call(symbol); 9546 if (has(EmptyStringDescriptionStore, symbol)) return ""; 9547 var desc = native ? string.slice(7, -1) : string.replace(regexp, "$1"); 9548 return desc === "" ? void 0 : desc; 9549 } 9550 }); 9551 $({ global: true, forced: true }, {
9552 Symbol: SymbolWrapper 9553 }); 9554 } 9555 }) 9556 ), 9557 /***/ 9558 "e163": ( 9559 /***/ 9560 (function(module2, exports$1, __webpack_require__) { 9561 var has = __webpack_require__("5135"); 9562 var toObject = __webpack_require__("7b0b"); 9563 var sharedKey = __webpack_require__("f772"); 9564 var CORRECT_PROTOTYPE_GETTER = __webpack_require__("e177"); 9565 var IE_PROTO = sharedKey("IE_PROTO"); 9566 var ObjectPrototype = Object.prototype; 9567 module2.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function(O) { 9568 O = toObject(O); 9569 if (has(O, IE_PROTO)) return O[IE_PROTO]; 9570 if (typeof O.constructor == "function" && O instanceof O.constructor) { 9571 return O.constructor.prototype; 9572 } 9573 return O instanceof Object ? ObjectPrototype : null; 9574 }; 9575 }) 9576 ), 9577 /***/ 9578 "e177": ( 9579 /***/ 9580 (function(module2, exports$1, __webpack_require__) { 9581 var fails = __webpack_require__("d039"); 9582 module2.exports = !fails(function() { 9583 function F() { 9584 } 9585 F.prototype.constructor = null; 9586 return Object.getPrototypeOf(new F()) !== F.prototype; 9587 }); 9588 }) 9589 ), 9590 /***/ 9591 "e260": ( 9592 /***/ 9593 (function(module2, exports$1, __webpack_require__) { 9594 var toIndexedObject = __webpack_require__("fc6a"); 9595 var addToUnscopables = __webpack_require__("44d2"); 9596 var Iterators = __webpack_require__("3f8c"); 9597 var InternalStateModule = __webpack_require__("69f3"); 9598 var defineIterator = __webpack_require__("7dd0"); 9599 var ARRAY_ITERATOR = "Array Iterator"; 9600 var setInternalState = InternalStateModule.set; 9601 var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); 9602 module2.exports = defineIterator(Array, "Array", function(iterated, kind) { 9603 setInternalState(this, { 9604 type: ARRAY_ITERATOR, 9605 target: toIndexedObject(iterated), 9606 // target 9607 index: 0, 9608 // next index 9609 kind 9610 // kind 9611 }); 9612 }, function() { 9613 var state = getInternalState(this); 9614 var target = state.target; 9615 var kind = state.kind; 9616 var index = state.index++; 9617 if (!target || index >= target.length) { 9618 state.target = void 0; 9619 return { value: void 0, done: true }; 9620 } 9621 if (kind == "keys") return { value: index, done: false }; 9622 if (kind == "values") return { value: target[index], done: false }; 9623 return { value: [index, target[index]], done: false }; 9624 }, "values"); 9625 Iterators.Arguments = Iterators.Array; 9626 addToUnscopables("keys"); 9627 addToUnscopables("values"); 9628 addToUnscopables("entries"); 9629 }) 9630 ), 9631 /***/ 9632 "e2cc": ( 9633 /***/ 9634 (function(module2, exports$1, __webpack_require__) { 9635 var redefine = __webpack_require__("6eeb"); 9636 module2.exports = function(target, src, options) { 9637 for (var key in src) redefine(target, key, src[key], options); 9638 return target; 9639 }; 9640 }) 9641 ), 9642 /***/ 9643 "e439": ( 9644 /***/ 9645 (function(module2, exports$1, __webpack_require__) { 9646 var $ = __webpack_require__("23e7"); 9647 var fails = __webpack_require__("d039"); 9648 var toIndexedObject = __webpack_require__("fc6a"); 9649 var nativeGetOwnPropertyDescriptor = __webpack_require__("06cf").f; 9650 var DESCRIPTORS = __webpack_require__("83ab"); 9651 var FAILS_ON_PRIMITIVES = fails(function() { 9652 nativeGetOwnPropertyDescriptor(1); 9653 }); 9654 var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES; 9655 $({ target: "Object", stat: true, forced: FORCED, sham: !DESCRIPTORS }, { 9656 getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { 9657 return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key); 9658 } 9659 }); 9660 }) 9661 ), 9662 /***/ 9663 "e538": ( 9664 /***/ 9665 (function(module2, exports$1, __webpack_require__) { 9666 var wellKnownSymbol = __webpack_require__("b622"); 9667 exports$1.f = wellKnownSymbol; 9668 }) 9669 ), 9670 /***/ 9671 "e667": ( 9672 /***/ 9673 (function(module2, exports$1) { 9674 module2.exports = function(exec) { 9675 try { 9676 return { error: false, value: exec() }; 9677 } catch (error) { 9678 return { error: true, value: error }; 9679 } 9680 }; 9681 }) 9682 ), 9683 /***/ 9684 "e6cf": ( 9685 /***/ 9686 (function(module2, exports$1, __webpack_require__) { 9687 var $ = __webpack_require__("23e7"); 9688 var IS_PURE = __webpack_require__("c430"); 9689 var global = __webpack_require__("da84"); 9690 var getBuiltIn = __webpack_require__("d066"); 9691 var NativePromise = __webpack_require__("fea9"); 9692 var redefine = __webpack_require__("6eeb"); 9693 var redefineAll = __webpack_require__("e2cc"); 9694 var setToStringTag = __webpack_require__("d44e"); 9695 var setSpecies = __webpack_require__("2626"); 9696 var isObject2 = __webpack_require__("861d"); 9697 var aFunction = __webpack_require__("1c0b"); 9698 var anInstance = __webpack_require__("19aa"); 9699 var inspectSource = __webpack_require__("8925"); 9700 var iterate = __webpack_require__("2266"); 9701 var checkCorrectnessOfIteration = __webpack_require__("1c7e"); 9702 var speciesConstructor = __webpack_require__("4840"); 9703 var task = __webpack_require__("2cf4").set; 9704 var microtask = __webpack_require__("b575"); 9705 var promiseResolve = __webpack_require__("cdf9"); 9706 var hostReportErrors = __webpack_require__("44de"); 9707 var newPromiseCapabilityModule = __webpack_require__("f069"); 9708 var perform = __webpack_require__("e667"); 9709 var InternalStateModule = __webpack_require__("69f3"); 9710 var isForced = __webpack_require__("94ca"); 9711 var wellKnownSymbol = __webpack_require__("b622"); 9712 var IS_NODE = __webpack_require__("605d"); 9713 var V8_VERSION = __webpack_require__("2d00"); 9714 var SPECIES = wellKnownSymbol("species"); 9715 var PROMISE = "Promise"; 9716 var getInternalState = InternalStateModule.get; 9717 var setInternalState = InternalStateModule.set; 9718 var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); 9719 var PromiseConstructor = NativePromise; 9720 var TypeError2 = global.TypeError; 9721 var document2 = global.document; 9722 var process = global.process; 9723 var $fetch = getBuiltIn("fetch"); 9724 var newPromiseCapability = newPromiseCapabilityModule.f; 9725 var newGenericPromiseCapability = newPromiseCapability; 9726 var DISPATCH_EVENT = !!(document2 && document2.createEvent && global.dispatchEvent); 9727 var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == "function"; 9728 var UNHANDLED_REJECTION = "unhandledrejection"; 9729 var REJECTION_HANDLED = "rejectionhandled"; 9730 var PENDING = 0; 9731 var FULFILLED = 1; 9732 var REJECTED = 2; 9733 var HANDLED = 1; 9734 var UNHANDLED = 2; 9735 var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; 9736 var FORCED = isForced(PROMISE, function() { 9737 var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor); 9738 if (!GLOBAL_CORE_JS_PROMISE) { 9739 if (V8_VERSION === 66) return true; 9740 if (!IS_NODE && !NATIVE_REJECTION_EVENT) return true; 9741 } 9742 if (IS_PURE && !PromiseConstructor.prototype["finally"]) return true; 9743 if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
vendor: 11,056 bytes, lines 9744-9998
9744 var promise = PromiseConstructor.resolve(1); 9745 var FakePromise = function(exec) { 9746 exec(function() { 9747 }, function() { 9748 }); 9749 }; 9750 var constructor = promise.constructor = {}; 9751 constructor[SPECIES] = FakePromise; 9752 return !(promise.then(function() { 9753 }) instanceof FakePromise); 9754 }); 9755 var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function(iterable) { 9756 PromiseConstructor.all(iterable)["catch"](function() { 9757 }); 9758 }); 9759 var isThenable = function(it) { 9760 var then; 9761 return isObject2(it) && typeof (then = it.then) == "function" ? then : false; 9762 }; 9763 var notify = function(state, isReject) { 9764 if (state.notified) return; 9765 state.notified = true; 9766 var chain = state.reactions; 9767 microtask(function() { 9768 var value = state.value; 9769 var ok = state.state == FULFILLED; 9770 var index = 0; 9771 while (chain.length > index) { 9772 var reaction = chain[index++]; 9773 var handler = ok ? reaction.ok : reaction.fail; 9774 var resolve = reaction.resolve; 9775 var reject = reaction.reject; 9776 var domain = reaction.domain; 9777 var result, then, exited; 9778 try { 9779 if (handler) { 9780 if (!ok) { 9781 if (state.rejection === UNHANDLED) onHandleUnhandled(state); 9782 state.rejection = HANDLED; 9783 } 9784 if (handler === true) result = value; 9785 else { 9786 if (domain) domain.enter(); 9787 result = handler(value); 9788 if (domain) { 9789 domain.exit(); 9790 exited = true; 9791 } 9792 } 9793 if (result === reaction.promise) { 9794 reject(TypeError2("Promise-chain cycle")); 9795 } else if (then = isThenable(result)) { 9796 then.call(result, resolve, reject); 9797 } else resolve(result); 9798 } else reject(value); 9799 } catch (error) { 9800 if (domain && !exited) domain.exit(); 9801 reject(error); 9802 } 9803 } 9804 state.reactions = []; 9805 state.notified = false; 9806 if (isReject && !state.rejection) onUnhandled(state); 9807 }); 9808 }; 9809 var dispatchEvent = function(name, promise, reason) { 9810 var event, handler; 9811 if (DISPATCH_EVENT) { 9812 event = document2.createEvent("Event"); 9813 event.promise = promise; 9814 event.reason = reason; 9815 event.initEvent(name, false, true); 9816 global.dispatchEvent(event); 9817 } else event = { promise, reason }; 9818 if (!NATIVE_REJECTION_EVENT && (handler = global["on" + name])) handler(event); 9819 else if (name === UNHANDLED_REJECTION) hostReportErrors("Unhandled promise rejection", reason); 9820 }; 9821 var onUnhandled = function(state) { 9822 task.call(global, function() { 9823 var promise = state.facade; 9824 var value = state.value; 9825 var IS_UNHANDLED = isUnhandled(state); 9826 var result; 9827 if (IS_UNHANDLED) { 9828 result = perform(function() { 9829 if (IS_NODE) { 9830 process.emit("unhandledRejection", value, promise); 9831 } else dispatchEvent(UNHANDLED_REJECTION, promise, value); 9832 }); 9833 state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; 9834 if (result.error) throw result.value; 9835 } 9836 }); 9837 }; 9838 var isUnhandled = function(state) { 9839 return state.rejection !== HANDLED && !state.parent; 9840 }; 9841 var onHandleUnhandled = function(state) { 9842 task.call(global, function() { 9843 var promise = state.facade; 9844 if (IS_NODE) { 9845 process.emit("rejectionHandled", promise); 9846 } else dispatchEvent(REJECTION_HANDLED, promise, state.value); 9847 }); 9848 }; 9849 var bind = function(fn, state, unwrap) { 9850 return function(value) { 9851 fn(state, value, unwrap); 9852 }; 9853 }; 9854 var internalReject = function(state, value, unwrap) { 9855 if (state.done) return; 9856 state.done = true; 9857 if (unwrap) state = unwrap; 9858 state.value = value; 9859 state.state = REJECTED; 9860 notify(state, true); 9861 }; 9862 var internalResolve = function(state, value, unwrap) { 9863 if (state.done) return; 9864 state.done = true; 9865 if (unwrap) state = unwrap; 9866 try { 9867 if (state.facade === value) throw TypeError2("Promise can't be resolved itself"); 9868 var then = isThenable(value); 9869 if (then) { 9870 microtask(function() { 9871 var wrapper = { done: false }; 9872 try { 9873 then.call( 9874 value, 9875 bind(internalResolve, wrapper, state), 9876 bind(internalReject, wrapper, state) 9877 ); 9878 } catch (error) { 9879 internalReject(wrapper, error, state); 9880 } 9881 }); 9882 } else { 9883 state.value = value; 9884 state.state = FULFILLED; 9885 notify(state, false); 9886 } 9887 } catch (error) { 9888 internalReject({ done: false }, error, state); 9889 } 9890 }; 9891 if (FORCED) { 9892 PromiseConstructor = function Promise2(executor) { 9893 anInstance(this, PromiseConstructor, PROMISE); 9894 aFunction(executor); 9895 Internal.call(this); 9896 var state = getInternalState(this); 9897 try { 9898 executor(bind(internalResolve, state), bind(internalReject, state)); 9899 } catch (error) { 9900 internalReject(state, error); 9901 } 9902 }; 9903 Internal = function Promise2(executor) { 9904 setInternalState(this, { 9905 type: PROMISE, 9906 done: false, 9907 notified: false, 9908 parent: false, 9909 reactions: [], 9910 rejection: false, 9911 state: PENDING, 9912 value: void 0 9913 }); 9914 }; 9915 Internal.prototype = redefineAll(PromiseConstructor.prototype, { 9916 // `Promise.prototype.then` method 9917 // https://tc39.es/ecma262/#sec-promise.prototype.then 9918 then: function then(onFulfilled, onRejected) { 9919 var state = getInternalPromiseState(this); 9920 var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); 9921 reaction.ok = typeof onFulfilled == "function" ? onFulfilled : true; 9922 reaction.fail = typeof onRejected == "function" && onRejected; 9923 reaction.domain = IS_NODE ? process.domain : void 0; 9924 state.parent = true; 9925 state.reactions.push(reaction); 9926 if (state.state != PENDING) notify(state, false); 9927 return reaction.promise; 9928 }, 9929 // `Promise.prototype.catch` method 9930 // https://tc39.es/ecma262/#sec-promise.prototype.catch 9931 "catch": function(onRejected) { 9932 return this.then(void 0, onRejected); 9933 } 9934 }); 9935 OwnPromiseCapability = function() { 9936 var promise = new Internal(); 9937 var state = getInternalState(promise); 9938 this.promise = promise; 9939 this.resolve = bind(internalResolve, state); 9940 this.reject = bind(internalReject, state); 9941 }; 9942 newPromiseCapabilityModule.f = newPromiseCapability = function(C) { 9943 return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); 9944 }; 9945 if (!IS_PURE && typeof NativePromise == "function") { 9946 nativeThen = NativePromise.prototype.then; 9947 redefine(NativePromise.prototype, "then", function then(onFulfilled, onRejected) { 9948 var that = this; 9949 return new PromiseConstructor(function(resolve, reject) { 9950 nativeThen.call(that, resolve, reject); 9951 }).then(onFulfilled, onRejected); 9952 }, { unsafe: true }); 9953 if (typeof $fetch == "function") $({ global: true, enumerable: true, forced: true }, { 9954 // eslint-disable-next-line no-unused-vars -- required for `.length` 9955 fetch: function fetch2(input) { 9956 return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments)); 9957 } 9958 }); 9959 } 9960 } 9961 $({ global: true, wrap: true, forced: FORCED }, { 9962 Promise: PromiseConstructor 9963 }); 9964 setToStringTag(PromiseConstructor, PROMISE, false, true); 9965 setSpecies(PROMISE); 9966 PromiseWrapper = getBuiltIn(PROMISE); 9967 $({ target: PROMISE, stat: true, forced: FORCED }, { 9968 // `Promise.reject` method 9969 // https://tc39.es/ecma262/#sec-promise.reject 9970 reject: function reject(r) { 9971 var capability = newPromiseCapability(this); 9972 capability.reject.call(void 0, r); 9973 return capability.promise; 9974 } 9975 }); 9976 $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, { 9977 // `Promise.resolve` method 9978 // https://tc39.es/ecma262/#sec-promise.resolve 9979 resolve: function resolve(x) { 9980 return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x); 9981 } 9982 }); 9983 $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { 9984 // `Promise.all` method 9985 // https://tc39.es/ecma262/#sec-promise.all 9986 all: function all(iterable) { 9987 var C = this; 9988 var capability = newPromiseCapability(C); 9989 var resolve = capability.resolve; 9990 var reject = capability.reject; 9991 var result = perform(function() { 9992 var $promiseResolve = aFunction(C.resolve); 9993 var values = []; 9994 var counter = 0; 9995 var remaining = 1; 9996 iterate(iterable, function(promise) { 9997 var index = counter++; 9998 var alreadyCalled = false;
9999 values.push(void 0); 10000 remaining++; 10001 $promiseResolve.call(C, promise).then(function(value) { 10002 if (alreadyCalled) return; 10003 alreadyCalled = true; 10004 values[index] = value; 10005 --remaining || resolve(values); 10006 }, reject); 10007 }); 10008 --remaining || resolve(values); 10009 }); 10010 if (result.error) reject(result.value); 10011 return capability.promise; 10012 }, 10013 // `Promise.race` method 10014 // https://tc39.es/ecma262/#sec-promise.race 10015 race: function race(iterable) { 10016 var C = this; 10017 var capability = newPromiseCapability(C); 10018 var reject = capability.reject; 10019 var result = perform(function() { 10020 var $promiseResolve = aFunction(C.resolve); 10021 iterate(iterable, function(promise) { 10022 $promiseResolve.call(C, promise).then(capability.resolve, reject); 10023 }); 10024 }); 10025 if (result.error) reject(result.value); 10026 return capability.promise; 10027 } 10028 }); 10029 }) 10030 ), 10031 /***/ 10032 "e893": ( 10033 /***/ 10034 (function(module2, exports$1, __webpack_require__) { 10035 var has = __webpack_require__("5135"); 10036 var ownKeys = __webpack_require__("56ef"); 10037 var getOwnPropertyDescriptorModule = __webpack_require__("06cf"); 10038 var definePropertyModule = __webpack_require__("9bf2"); 10039 module2.exports = function(target, source) { 10040 var keys = ownKeys(source); 10041 var defineProperty = definePropertyModule.f; 10042 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; 10043 for (var i = 0; i < keys.length; i++) { 10044 var key = keys[i]; 10045 if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); 10046 } 10047 }; 10048 }) 10049 ), 10050 /***/ 10051 "e8b5": ( 10052 /***/ 10053 (function(module2, exports$1, __webpack_require__) { 10054 var classof = __webpack_require__("c6b6"); 10055 module2.exports = Array.isArray || function isArray2(arg) { 10056 return classof(arg) == "Array"; 10057 }; 10058 }) 10059 ), 10060 /***/ 10061 "e95a": ( 10062 /***/ 10063 (function(module2, exports$1, __webpack_require__) { 10064 var wellKnownSymbol = __webpack_require__("b622"); 10065 var Iterators = __webpack_require__("3f8c"); 10066 var ITERATOR = wellKnownSymbol("iterator"); 10067 var ArrayPrototype = Array.prototype; 10068 module2.exports = function(it) { 10069 return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); 10070 }; 10071 }) 10072 ), 10073 /***/ 10074 "f069": ( 10075 /***/ 10076 (function(module2, exports$1, __webpack_require__) { 10077 var aFunction = __webpack_require__("1c0b"); 10078 var PromiseCapability = function(C) { 10079 var resolve, reject; 10080 this.promise = new C(function($$resolve, $$reject) { 10081 if (resolve !== void 0 || reject !== void 0) throw TypeError("Bad Promise constructor"); 10082 resolve = $$resolve; 10083 reject = $$reject; 10084 }); 10085 this.resolve = aFunction(resolve); 10086 this.reject = aFunction(reject); 10087 }; 10088 module2.exports.f = function(C) { 10089 return new PromiseCapability(C); 10090 }; 10091 }) 10092 ), 10093 /***/ 10094 "f5df": ( 10095 /***/ 10096 (function(module2, exports$1, __webpack_require__) { 10097 var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee"); 10098 var classofRaw = __webpack_require__("c6b6"); 10099 var wellKnownSymbol = __webpack_require__("b622"); 10100 var TO_STRING_TAG = wellKnownSymbol("toStringTag"); 10101 var CORRECT_ARGUMENTS = classofRaw(/* @__PURE__ */ (function() { 10102 return arguments; 10103 })()) == "Arguments"; 10104 var tryGet = function(it, key) { 10105 try { 10106 return it[key]; 10107 } catch (error) { 10108 } 10109 }; 10110 module2.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) { 10111 var O, tag, result; 10112 return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == "string" ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == "Object" && typeof O.callee == "function" ? "Arguments" : result; 10113 }; 10114 }) 10115 ), 10116 /***/ 10117 "f772": ( 10118 /***/ 10119 (function(module2, exports$1, __webpack_require__) { 10120 var shared = __webpack_require__("5692"); 10121 var uid = __webpack_require__("90e3"); 10122 var keys = shared("keys"); 10123 module2.exports = function(key) { 10124 return keys[key] || (keys[key] = uid(key)); 10125 }; 10126 }) 10127 ), 10128 /***/ 10129 "fb15": ( 10130 /***/ 10131 (function(module2, __webpack_exports__, __webpack_require__) { 10132 __webpack_require__.r(__webpack_exports__); 10133 if (typeof window !== "undefined") { 10134 var currentScript = window.document.currentScript; 10135 { 10136 var getCurrentScript = __webpack_require__("8875"); 10137 currentScript = getCurrentScript(); 10138 if (!("currentScript" in document)) { 10139 Object.defineProperty(document, "currentScript", { get: getCurrentScript }); 10140 } 10141 } 10142 var setPublicPath_src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/); 10143 if (setPublicPath_src) { 10144 __webpack_require__.p = setPublicPath_src[1]; 10145 } 10146 } 10147 var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); 10148 var _hoisted_1 = { 10149 ref: "container", 10150 class: "lightgallery-vue" 10151 }; 10152 function render(_ctx, _cache, $props, $setup, $data, $options) { 10153 return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["render
vendor: 4,144 bytes, lines 10153-10250
10153Slot"])(_ctx.$slots, "default")], 512); 10154 } 10155 __webpack_require__("b64b"); 10156 __webpack_require__("a4d3"); 10157 __webpack_require__("4de4"); 10158 __webpack_require__("e439"); 10159 __webpack_require__("159b"); 10160 __webpack_require__("dbb4"); 10161 function _defineProperty(obj, key, value) { 10162 if (key in obj) { 10163 Object.defineProperty(obj, key, { 10164 value, 10165 enumerable: true, 10166 configurable: true, 10167 writable: true 10168 }); 10169 } else { 10170 obj[key] = value; 10171 } 10172 return obj; 10173 } 10174 function ownKeys(object, enumerableOnly) { 10175 var keys = Object.keys(object); 10176 if (Object.getOwnPropertySymbols) { 10177 var symbols = Object.getOwnPropertySymbols(object); 10178 if (enumerableOnly) symbols = symbols.filter(function(sym) { 10179 return Object.getOwnPropertyDescriptor(object, sym).enumerable; 10180 }); 10181 keys.push.apply(keys, symbols); 10182 } 10183 return keys; 10184 } 10185 function _objectSpread2(target) { 10186 for (var i = 1; i < arguments.length; i++) { 10187 var source = arguments[i] != null ? arguments[i] : {}; 10188 if (i % 2) { 10189 ownKeys(Object(source), true).forEach(function(key) { 10190 _defineProperty(target, key, source[key]); 10191 }); 10192 } else if (Object.getOwnPropertyDescriptors) { 10193 Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); 10194 } else { 10195 ownKeys(Object(source)).forEach(function(key) { 10196 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); 10197 }); 10198 } 10199 } 10200 return target; 10201 } 10202 function _classCallCheck(instance, Constructor) { 10203 if (!(instance instanceof Constructor)) { 10204 throw new TypeError("Cannot call a class as a function"); 10205 } 10206 } 10207 function _defineProperties(target, props) { 10208 for (var i = 0; i < props.length; i++) { 10209 var descriptor = props[i]; 10210 descriptor.enumerable = descriptor.enumerable || false; 10211 descriptor.configurable = true; 10212 if ("value" in descriptor) descriptor.writable = true; 10213 Object.defineProperty(target, descriptor.key, descriptor); 10214 } 10215 } 10216 function _createClass(Constructor, protoProps, staticProps) { 10217 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 10218 if (staticProps) _defineProperties(Constructor, staticProps); 10219 return Constructor; 10220 } 10221 function _setPrototypeOf(o, p) { 10222 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) { 10223 o2.__proto__ = p2; 10224 return o2; 10225 }; 10226 return _setPrototypeOf(o, p); 10227 } 10228 function _inherits(subClass, superClass) { 10229 if (typeof superClass !== "function" && superClass !== null) { 10230 throw new TypeError("Super expression must either be null or a function"); 10231 } 10232 subClass.prototype = Object.create(superClass && superClass.prototype, { 10233 constructor: { 10234 value: subClass, 10235 writable: true, 10236 configurable: true 10237 } 10238 }); 10239 if (superClass) _setPrototypeOf(subClass, superClass); 10240 } 10241 __webpack_require__("4ae1"); 10242 __webpack_require__("3410"); 10243 function _getPrototypeOf(o) { 10244 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) { 10245 return o2.__proto__ || Object.getPrototypeOf(o2); 10246 }; 10247 return _getPrototypeOf(o); 10248 } 10249 function _isNativeReflectConstruct() { 10250 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
10251 if (Reflect.construct.sham) return false; 10252 if (typeof Proxy === "function") return true; 10253 try { 10254 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { 10255 })); 10256 return true; 10257 } catch (e) { 10258 return false; 10259 } 10260 } 10261 var helpers_typeof = __webpack_require__("7037"); 10262 var typeof_default = /* @__PURE__ */ __webpack_require__.n(helpers_typeof); 10263 function _assertThisInitialized(self2) { 10264 if (self2 === void 0) { 10265 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 10266 } 10267 return self2; 10268 } 10269 function _possibleConstructorReturn(self2, call) { 10270 if (call && (typeof_default()(call) === "object" || typeof call === "function")) { 10271 return call; 10272 } 10273 return _assertThisInitialized(self2); 10274 } 10275 function _createSuper(Derived) { 10276 var hasNativeReflectConstruct = _isNativeReflectConstruct(); 10277 return function _createSuperInternal() { 10278 var Super = _getPrototypeOf(Derived), result; 10279 if (hasNativeReflectConstruct) { 10280 var NewTarget = _getPrototypeOf(this).constructor; 10281 result = Reflect.construct(Super, arguments, NewTarget); 10282 } else { 10283 result = Super.apply(this, arguments); 10284 } 10285 return _possibleConstructorReturn(this, result); 10286 }; 10287 } 10288 __webpack_require__("fb6a"); 10289 __webpack_require__("ac1f"); 10290 __webpack_require__("1276"); 10291 function __decorate(decorators, target, key, desc) { 10292 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 10293 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 10294 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 10295 return c > 3 && r && Object.defineProperty(target, key, r), r; 10296 } 10297 function vue_class_component_esm_bundler_classCallCheck(instance, Constructor) { 10298 if (!(instance instanceof Constructor)) { 10299 throw new TypeError("Cannot call a class as a function"); 10300 } 10301 } 10302 function vue_class_component_esm_bundler_defineProperties(target, props) { 10303 for (var i = 0; i < props.length; i++) { 10304 var descriptor = props[i]; 10305 descriptor.enumerable = descriptor.enumerable || false; 10306 descriptor.configurable = true; 10307 if ("value" in descriptor) descriptor.writable = true; 10308 Object.defineProperty(target, descriptor.key, descriptor); 10309 } 10310 } 10311 function vue_class_component_esm_bundler_createClass(Constructor, protoProps, staticProps) { 10312 if (staticProps) vue_class_component_esm_bundler_defineProperties(Constructor, staticProps); 10313 return Constructor; 10314 } 10315 function vue_class_component_esm_bundler_defineProperty(obj, key, value) { 10316 if (key in obj) { 10317 Object.defineProperty(obj, key, { 10318 value, 10319 enumerable: true, 10320 configurable: true, 10321 writable: true 10322 }); 10323 } else { 10324 obj[key] = value; 10325 } 10326 return obj; 10327 } 10328 function vue_class_component_esm_bundler_ownKeys(object, enumerableOnly) { 10329 var keys = Object.keys(object); 10330 if (Object.getOwnPropertySymbols) { 10331 var symbols = Object.getOwnPropertySymbols(object); 10332 if (enumerableOnly) symbols = symbols.filter(function(sym) { 10333 return Object.getOwnPropertyDescriptor(object, sym).enumerable; 10334 }); 10335 keys.push.apply(keys, symbols); 10336 } 10337 return keys; 10338 } 10339 function vue_class_component_esm_bundler_objectSpread2
10339(target) { 10340 for (var i = 1; i < arguments.length; i++) { 10341 var source = arguments[i] != null ? arguments[i] : {}; 10342 if (i % 2) { 10343 vue_class_component_esm_bundler_ownKeys(Object(source), true).forEach(function(key) { 10344 vue_class_component_esm_bundler_defineProperty(target, key, source[key]); 10345 }); 10346 } else if (Object.getOwnPropertyDescriptors) { 10347 Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); 10348 } else { 10349 vue_class_component_esm_bundler_ownKeys(Object(source)).forEach(function(key) { 10350 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); 10351 }); 10352 } 10353 } 10354 return target; 10355 } 10356 function vue_class_component_esm_bundler_inherits(subClass, superClass) { 10357 if (typeof superClass !== "function" && superClass !== null) { 10358 throw new TypeError("Super expression must either be null or a function"); 10359 } 10360 subClass.prototype = Object.create(superClass && superClass.prototype, { 10361 constructor: { 10362 value: subClass, 10363 writable: true, 10364 configurable: true 10365 } 10366 }); 10367 if (superClass) vue_class_component_esm_bundler_setPrototypeOf(subClass, superClass); 10368 } 10369 function vue_class_component_esm_bundler_getPrototypeOf(o) { 10370 vue_class_component_esm_bundler_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) { 10371 return o2.__proto__ || Object.getPrototypeOf(o2); 10372 }; 10373 return vue_class_component_esm_bundler_getPrototypeOf(o); 10374 } 10375 function vue_class_component_esm_bundler_setPrototypeOf(o, p) { 10376 vue_class_component_esm_bundler_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) { 10377 o2.__proto__ = p2; 10378 return o2; 10379 }; 10380 return vue_class_component_esm_bundler_setPrototypeOf(o, p); 10381 } 10382 function vue_class_component_esm_bundler_isNativeReflectConstruct() { 10383 if (typeof Reflect === "undefined" || !Reflect.construct) return false; 10384 if (Reflect.construct.sham) return false; 10385 if (typeof Proxy === "function") return true; 10386 try { 10387 Date.prototype.toString.call(Reflect.construct(Date, [], function() { 10388 })); 10389 return true; 10390 } catch (e) { 10391 return false; 10392 } 10393 } 10394 function vue_class_component_esm_bundler_assertThisInitialized(self2) { 10395 if (self2 === void 0) { 10396 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 10397 } 10398 return self2; 10399 } 10400 function vue_class_component_esm_bundler_possibleConstructorReturn(self2, call) { 10401 if (call && (typeof call === "object" || typeof call === "function")) { 10402 return call; 10403 } 10404 return vue_class_component_esm_bundler_assertThisInitialized(self2); 10405 } 10406 function vue_class_component_esm_bundler_createSuper(Derived) { 10407 var hasNativeReflectConstruct = vue_class_component_esm_bundler_isNativeReflectConstruct(); 10408 return function _createSuperInternal() { 10409 var Super = vue_class_component_esm_bundler_getPrototypeOf(Derived), result; 10410 if (hasNativeReflectConstruct) { 10411 var NewTarget = vue_class_component_esm_bundler_getPrototypeOf(this).constructor; 10412 result = Reflect.construct(Super, arguments, NewTarget); 10413 } else { 10414 result = Super.apply(this, arguments); 10415 } 10416 return vue_class_component_esm_bundler_possibleConstructorReturn(this, result); 10417 }; 10418 } 10419 function _toConsumableArray(arr) { 10420 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); 10421 } 10422 function _arrayWithoutHoles(arr) { 10423 if (Array.isArray(arr)) return _arrayLikeToArray(arr); 10424 } 10425 function _iterableToArray(iter) { 10426 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); 10427 } 10428 function _unsupportedIterableToArray(o, minLen) { 10429 if (!o) return; 10430 if (typeof o === "string") return _arrayLikeToArray(o, minLen); 10431 var n = Object.prototype.toString.call(o).slice(8, -1); 10432 if (n === "Object" && o.constructor) n = o.constructor.name; 10433 if (n === "Map" || n === "Set") return Array.from(o); 10434 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); 10435 } 10436 function _arrayLikeToArray(arr, len) { 10437 if (len == null || len > arr.length) len = arr.length; 10438 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; 10439 return arr2; 10440 } 10441 function _nonIterableSpread() { 10442 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 10443 } 10444 function defineGetter(obj, key, getter) { 10445 Object.defineProperty(obj, key, { 10446 get: getter, 10447 enumerable: false, 10448 configurable: true 10449 }); 10450 } 10451 function defineProxy(proxy, key, target) { 10452 Object.defineProperty(proxy, key, { 10453 get: function get() { 10454 return target[key].value; 10455 }, 10456 set: function set(value) { 10457 target[key].value = value; 10458 }, 10459 enumerable: true, 10460 configurable: true 10461 }); 10462 } 10463 function getSuper(Ctor) { 10464 var superProto = Object.getPrototypeOf(Ctor.prototype); 10465 if (!superProto) { 10466 return void 0; 10467 } 10468 return superProto.constructor; 10469 } 10470 function getOwn(value, key) { 10471 return value.hasOwnProperty(key) ? value[key] : void 0; 10472 } 10473 var vue_class_component_esm_bundler_VueImpl = /* @__PURE__ */ (function() { 10474 function VueImpl(props, ctx) { 10475 var _this = this; 10476 vue_class_component_esm_bundler_classCallCheck(this, VueImpl); 10477 defineGetter(this, "$props", function() { 10478 return props; 10479 }); 10480 defineGetter(this, "$attrs", function() { 10481 return ctx.attrs; 10482 }); 10483 defineGetter(this, "$slots", function() { 10484 return ctx.slots; 10485 }); 10486 defineGetter(this, "$emit", function() { 10487 return ctx.emit; 10488 });
10489 Object.keys(props).forEach(function(key) { 10490 Object.defineProperty(_this, key, { 10491 enumerable: false, 10492 configurable: true, 10493 writable: true, 10494 value: props[key] 10495 }); 10496 }); 10497 } 10498 vue_class_component_esm_bundler_createClass(VueImpl, null, [{ 10499 key: "registerHooks", 10500 value: function registerHooks(keys) { 10501 var _this$__h; 10502 (_this$__h = this.__h).push.apply(_this$__h, _toConsumableArray(keys)); 10503 } 10504 }, { 10505 key: "with", 10506 value: function _with(Props) { 10507 var propsMeta = new Props(); 10508 var props = {}; 10509 Object.keys(propsMeta).forEach(function(key) { 10510 var meta = propsMeta[key]; 10511 props[key] = meta !== null && meta !== void 0 ? meta : null; 10512 }); 10513 var PropsMixin = /* @__PURE__ */ (function(_this2) { 10514 vue_class_component_esm_bundler_inherits(PropsMixin2, _this2); 10515 var _super = vue_class_component_esm_bundler_createSuper(PropsMixin2); 10516 function PropsMixin2() { 10517 vue_class_component_esm_bundler_classCallCheck(this, PropsMixin2); 10518 return _super.apply(this, arguments); 10519 } 10520 return PropsMixin2; 10521 })(this); 10522 PropsMixin.__b = { 10523 props 10524 }; 10525 return PropsMixin; 10526 } 10527 }, { 10528 key: "__vccOpts", 10529 get: function get() { 10530 if (this === Vue) { 10531 return {}; 10532 } 10533 var Ctor = this; 10534 var cache = getOwn(Ctor, "__c"); 10535 if (cache) { 10536 return cache; 10537 } 10538 var options = vue_class_component_esm_bundler_objectSpread2({}, getOwn(Ctor, "__o")); 10539 Ctor.__c = options; 10540 var Super = getSuper(Ctor); 10541 if (Super) { 10542 options["extends"] = Super.__vccOpts; 10543 } 10544 var base = getOwn(Ctor, "__b"); 10545 if (base) { 10546 options.mixins = options.mixins || []; 10547 options.mixins.unshift(base); 10548 } 10549 options.methods = vue_class_component_esm_bundler_objectSpread2({}, options.methods); 10550 options.computed = vue_class_component_esm_bundler_objectSpread2({}, options.computed); 10551 var proto = Ctor.prototype; 10552 Object.getOwnPropertyNames(proto).forEach(function(key) { 10553 if (key === "constructor") { 10554 return; 10555 } 10556 if (Ctor.__h.indexOf(key) > -1) { 10557 options[key] = proto[key]; 10558 return; 10559 } 10560 var descriptor = Object.getOwnPropertyDescriptor(proto, key); 10561 if (typeof descriptor.value === "function") { 10562 options.methods[key] = descriptor.value; 10563 return; 10564 } 10565 if (descriptor.get || descriptor.set) { 10566 options.computed[key] = { 10567 get: descriptor.get, 10568 set: descriptor.set 10569 }; 10570 return; 10571 } 10572 }); 10573 options.setup = function(props, ctx) { 10574 var _promise; 10575 var data = new Ctor(props, ctx); 10576 var dataKeys = Object.keys(data); 10577 var plainData = {}; 10578 var promise = null; 10579 dataKeys.forEach(function(key) { 10580 if (data[key] === void 0 || data[key] && data[key].__s) { 10581 return; 10582 } 10583 plainData[key] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(data[key]); 10584 defineProxy(data, key, plainData); 10585 }); 10586 dataKeys.forEach(function(key) { 10587 if (data[key] && data[key].__s) { 10588 var setupState = data[key].__s(); 10589 if (setupState instanceof Promise) { 10590 if (!promise) { 10591 promise = Promise.resolve(plainData); 10592 } 10593 promise = promise.then(function() { 10594 return setupState.then(function(value) { 10595 plainData[key] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["proxyRefs"])(value); 10596 return plainData; 10597 }); 10598 }); 10599 } else { 10600 plainData[key] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["proxyRefs"])(setupState); 10601 } 10602 } 10603 }); 10604 return (_promise = promise) !== null && _promise !== void 0 ? _promise : plainData; 10605 }; 10606 var decorators = getOwn(Ctor, "__d"); 10607 if (decorators) {
10608 decorators.forEach(function(fn) { 10609 return fn(options); 10610 }); 10611 } 10612 var injections = ["render", "ssrRender", "__file", "__cssModules", "__scopeId", "__hmrId"]; 10613 injections.forEach(function(key) { 10614 if (Ctor[key]) { 10615 options[key] = Ctor[key]; 10616 } 10617 }); 10618 return options; 10619 } 10620 }]); 10621 return VueImpl; 10622 })(); 10623 vue_class_component_esm_bundler_VueImpl.__h = ["data", "beforeCreate", "created", "beforeMount", "mounted", "beforeUnmount", "unmounted", "beforeUpdate", "updated", "activated", "deactivated", "render", "errorCaptured", "serverPrefetch"]; 10624 var Vue = vue_class_component_esm_bundler_VueImpl; 10625 function Options(options) { 10626 return function(Component) { 10627 Component.__o = options; 10628 return Component; 10629 }; 10630 } 10631 __webpack_require__("99af"); 10632 __webpack_require__("7db0"); 10633 var lGEvents = { 10634 afterAppendSlide: "lgAfterAppendSlide", 10635 init: "lgInit", 10636 hasVideo: "lgHasVideo", 10637 containerResize: "lgContainerResize", 10638 updateSlides: "lgUpdateSlides", 10639 afterAppendSubHtml: "lgAfterAppendSubHtml", 10640 beforeOpen: "lgBeforeOpen", 10641 afterOpen: "lgAfterOpen", 10642 slideItemLoad: "lgSlideItemLoad", 10643 beforeSlide: "lgBeforeSlide", 10644 afterSlide: "lgAfterSlide", 10645 posterClick: "lgPosterClick", 10646 dragStart: "lgDragStart", 10647 dragMove: "lgDragMove", 10648 dragEnd: "lgDragEnd", 10649 beforeNextSlide: "lgBeforeNextSlide", 10650 beforePrevSlide: "lgBeforePrevSlide", 10651 beforeClose: "lgBeforeClose", 10652 afterClose: "lgAfterClose", 10653 rotateLeft: "lgRotateLeft", 10654 rotateRight: "lgRotateRight", 10655 flipHorizontal: "lgFlipHorizontal", 10656 flipVertical: "lgFlipVertical", 10657 autoplay: "lgAutoplay", 10658 autoplayStart: "lgAutoplayStart", 10659 autoplayStop: "lgAutoplayStop" 10660 }; 10661 var lightGalleryCoreSettings = { 10662 mode: "lg-slide", 10663 easing: "ease", 10664 speed: 400, 10665 licenseKey: "0000-0000-000-0000", 10666 height: "100%", 10667 width: "100%", 10668 addClass: "", 10669 startClass: "lg-start-zoom", 10670 backdropDuration: 300, 10671 container: "", 10672 startAnimationDuration: 400, 10673 zoomFromOrigin: true, 10674 hideBarsDelay: 0, 10675 showBarsAfter: 1e4, 10676 slideDelay: 0, 10677 supportLegacyBrowser: true, 10678 allowMediaOverlap: false, 10679 videoMaxSize: "1280-720", 10680 loadYouTubePoster: true, 10681 defaultCaptionHeight: 0, 10682 ariaLabelledby: "", 10683 ariaDescribedby: "", 10684 resetScrollPosition: true, 10685 hideScrollbar: false, 10686 closable: true, 10687 swipeToClose: true, 10688 closeOnTap: true, 10689 showCloseIcon: true, 10690 showMaximizeIcon: false, 10691 loop: true, 10692 escKey: true, 10693 keyPress: true, 10694 trapFocus: true, 10695 controls: true, 10696 slideEndAnimation: true, 10697 hideControlOnEnd: false, 10698 mousewheel: false, 10699 getCaptionFromTitleOrAlt: true, 10700 appendSubHtmlTo: ".lg-sub-html", 10701 subHtmlSelectorRelative: false, 10702 preload: 2, 10703 numberOfSlideItemsInDom: 10, 10704 selector: "", 10705 selectWithin: "", 10706 nextHtml: "", 10707 prevHtml: "", 10708 index: 0, 10709 iframeWidth: "100%", 10710 iframeHeight: "100%", 10711 iframeMaxWidth: "100%", 10712 iframeMaxHeight: "100%", 10713 download: true, 10714 counter: true, 10715 appendCounterTo: ".lg-toolbar", 10716 swipeThreshold: 50, 10717 enableSwipe: true, 10718 enableDrag: true,
10719 dynamic: false, 10720 dynamicEl: [], 10721 extraProps: [], 10722 exThumbImage: "", 10723 isMobile: void 0, 10724 mobileSettings: { 10725 controls: false, 10726 showCloseIcon: false, 10727 download: false 10728 }, 10729 plugins: [], 10730 strings: { 10731 closeGallery: "Close gallery", 10732 toggleMaximize: "Toggle maximize", 10733 previousSlide: "Previous slide", 10734 nextSlide: "Next slide", 10735 download: "Download", 10736 playVideo: "Play video", 10737 mediaLoadingFailed: "Oops... Failed to load content..." 10738 } 10739 }; 10740 function arrayLikeToArray_arrayLikeToArray(arr, len) { 10741 if (len == null || len > arr.length) len = arr.length; 10742 for (var i = 0, arr2 = new Array(len); i < len; i++) { 10743 arr2[i] = arr[i]; 10744 } 10745 return arr2; 10746 } 10747 function arrayWithoutHoles_arrayWithoutHoles(arr) { 10748 if (Array.isArray(arr)) return arrayLikeToArray_arrayLikeToArray(arr); 10749 } 10750 __webpack_require__("e01a"); 10751 __webpack_require__("d3b7"); 10752 __webpack_require__("d28b"); 10753 __webpack_require__("3ca3"); 10754 __webpack_require__("ddb0"); 10755 __webpack_require__("a630"); 10756 function iterableToArray_iterableToArray(iter) { 10757 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); 10758 } 10759 __webpack_require__("b0c0"); 10760 function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) { 10761 if (!o) return; 10762 if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen); 10763 var n = Object.prototype.toString.call(o).slice(8, -1); 10764 if (n === "Object" && o.constructor) n = o.constructor.name; 10765 if (n === "Map" || n === "Set") return Array.from(o); 10766 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen); 10767 } 10768 function nonIterableSpread_nonIterableSpread() { 10769 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 10770 } 10771 function toConsumableArray_toConsumableArray(arr) { 10772 return arrayWithoutHoles_arrayWithoutHoles(arr) || iterableToArray_iterableToArray(arr) || unsupportedIterableToArray_unsupportedIterableToArray(arr) || nonIterableSpread_nonIterableSpread(); 10773 } 10774 __webpack_require__("5319"); 10775 __webpack_require__("e6cf"); 10776 __webpack_require__("d81d"); 10777 __webpack_require__("a434"); 10778 __webpack_require__("466d"); 10779 __webpack_require__("25f0"); 10780 function initLgPolyfills() { 10781 (function() { 10782 if (typeof window.CustomEvent === "function") return false; 10783 function CustomEvent2(event, params) { 10784 params = params || { 10785 bubbles: false, 10786 cancelable: false, 10787 detail: null 10788 }; 10789 var evt = document.createEvent("CustomEvent"); 10790 evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); 10791 return evt; 10792 } 10793 window.CustomEvent = CustomEvent2; 10794 })(); 10795 (function() { 10796 if (!Element.prototype.matches) { 10797 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 10798 } 10799 })(); 10800 } 10801 var lgQuery_lgQuery = /* @__PURE__ */ (function() { 10802 function lgQuery(selector) { 10803 _classCallCheck(this, lgQuery); 10804 this.cssVenderPrefixes = ["TransitionDuration", "TransitionTimingFunction", "Transform", "Transition"]; 10805 this.selector = this._getSelector(selector); 10806 this.firstElement = this._getFirstEl(); 10807 return this; 10808 } 10809 _createClass(lgQuery, [{ 10810 key: "_getSelector", 10811 value: function _getSelector(selector) { 10812 var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : document; 10813 if (typeof selector !== "string") { 10814 return selector; 10815 } 10816 context = context || document; 10817 var fl = selector.substring(0, 1); 10818 if (fl === "#") { 10819 return context.querySelector(selector); 10820 } else { 10821 return context.querySelectorAll(selector); 10822 } 10823 } 10824 }, { 10825 key: "_each", 10826 value: function _each(func) { 10827 if (!this.selector) { 10828 return this; 10829 } 10830 if (this.selector.length !== void 0) { 10831 [].forEach.call(this.selector, func); 10832 } else { 10833 func(this.selector, 0); 10834 } 10835 return this; 10836 } 10837 }, { 10838 key: "_setCssVendorPrefix", 10839 value: function _setCssVendorPrefix(el, cssProperty, value) { 10840 var property = cssProperty.replace(/-([a-z])/gi, function(s, group1) { 10841 return group1.toUpperCase(); 10842 }); 10843 if (this.cssVenderPrefixes.indexOf(property) !== -1) { 10844 el.style[property.charAt(0).toLowerCase() + property.slice(1)] = value; 10845 el.style["webkit" + property] = value; 10846 el.style["moz" + property] = value; 10847 el.style["ms" + property] = value; 10848 el.style["o" + property] = value; 10849 } else { 10850 el.style[property] = value; 10851 } 10852 } 10853 }, { 10854 key: "_getFirstEl", 10855 value: function _getFirstEl() { 10856 if (this.selector && this.selector.length !== void 0) { 10857 return this.selector[0]; 10858 } else { 10859 return this.selector; 10860 } 10861 } 10862 }, { 10863 key: "isEventMatched", 10864 value: function isEventMatched(event, eventName) { 10865 var eventNamespace = eventName.split("."); 10866 return event.split(".").filter(function(e) { 10867 return e; 10868 }).every(function(e) { 10869 return eventNamespace.indexOf(e) !== -1; 10870 }); 10871 } 10872 }, { 10873 key: "attr", 10874 value: function attr(_attr, value) { 10875 if (value === void 0) { 10876 if (!this.firstElement) { 10877 return ""; 10878 } 10879 return this.firstElement.getAttribute(_attr); 10880 } 10881 this._each(function(el) { 10882 el.setAttribute(_attr, value); 10883 }); 10884 return this; 10885 } 10886 }, { 10887 key: "find", 10888 value: function find(selector) { 10889 return $LG(this._getSelector(selector, this.selector)); 10890 } 10891 }, { 10892 key: "first", 10893 value: function first() { 10894 if (this.selector && this.selector.length !== void 0) { 10895 return $LG(this.selector[0]); 10896 } else { 10897 return $LG(this.selector); 10898 } 10899 } 10900 }, { 10901 key: "eq", 10902 value: function eq(index) { 10903 return $LG(this.selector[index]); 10904 } 10905 }, { 10906 key: "parent", 10907 value: function parent() { 10908 return $LG(this.selector.parentElement); 10909 } 10910 }, { 10911 key: "get", 10912 value: function get() { 10913 return this._getFirstEl(); 10914 } 10915 }, { 10916 key: "removeAttr", 10917 value: function removeAttr(attributes) { 10918 var attrs = attributes.split(" "); 10919 this._each(function(el) {
10920 attrs.forEach(function(attr) { 10921 return el.removeAttribute(attr); 10922 }); 10923 }); 10924 return this; 10925 } 10926 }, { 10927 key: "wrap", 10928 value: function wrap(className) { 10929 if (!this.firstElement) { 10930 return this; 10931 } 10932 var wrapper = document.createElement("div"); 10933 wrapper.className = className; 10934 this.firstElement.parentNode.insertBefore(wrapper, this.firstElement); 10935 this.firstElement.parentNode.removeChild(this.firstElement); 10936 wrapper.appendChild(this.firstElement); 10937 return this; 10938 } 10939 }, { 10940 key: "addClass", 10941 value: function addClass() { 10942 var classNames = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; 10943 this._each(function(el) { 10944 classNames.split(" ").forEach(function(className) { 10945 if (className) { 10946 el.classList.add(className); 10947 } 10948 }); 10949 }); 10950 return this; 10951 } 10952 }, { 10953 key: "removeClass", 10954 value: function removeClass(classNames) { 10955 this._each(function(el) { 10956 classNames.split(" ").forEach(function(className) { 10957 if (className) { 10958 el.classList.remove(className); 10959 } 10960 }); 10961 }); 10962 return this; 10963 } 10964 }, { 10965 key: "hasClass", 10966 value: function hasClass(className) { 10967 if (!this.firstElement) { 10968 return false; 10969 } 10970 return this.firstElement.classList.contains(className); 10971 } 10972 }, { 10973 key: "hasAttribute", 10974 value: function hasAttribute(attribute) { 10975 if (!this.firstElement) { 10976 return false; 10977 } 10978 return this.firstElement.hasAttribute(attribute); 10979 } 10980 }, { 10981 key: "toggleClass", 10982 value: function toggleClass(className) { 10983 if (!this.firstElement) { 10984 return this; 10985 } 10986 if (this.hasClass(className)) { 10987 this.removeClass(className); 10988 } else { 10989 this.addClass(className); 10990 } 10991 return this; 10992 } 10993 }, { 10994 key: "css", 10995 value: function css(property, value) { 10996 var _this = this; 10997 this._each(function(el) { 10998 _this._setCssVendorPrefix(el, property, value); 10999 }); 11000 return this; 11001 } 11002 // Need to pass separate namespaces for separate elements 11003 }, { 11004 key: "on", 11005 value: function on(events, listener) { 11006 var _this2 = this; 11007 if (!this.selector) { 11008 return this; 11009 } 11010 events.split(" ").forEach(function(event) { 11011 if (!Array.isArray(lgQuery.eventListeners[event])) { 11012 lgQuery.eventListeners[event] = []; 11013 } 11014 lgQuery.eventListeners[event].push(listener); 11015 _this2.selector.addEventListener(event.split(".")[0], listener); 11016 }); 11017 return this; 11018 } 11019 // @todo - test this 11020 }, { 11021 key: "once", 11022 value: function once(event, listener) { 11023 var _this3 = this; 11024 this.on(event, function() { 11025 _this3.off(event); 11026 listener(event); 11027 }); 11028 return this; 11029 } 11030 }, { 11031 key: "off", 11032 value: function off(event) { 11033 var _this4 = this; 11034 if (!this.selector) { 11035 return this; 11036 }
11037 Object.keys(lgQuery.eventListeners).forEach(function(eventName) { 11038 if (_this4.isEventMatched(event, eventName)) { 11039 lgQuery.eventListeners[eventName].forEach(function(listener) { 11040 _this4.selector.removeEventListener(eventName.split(".")[0], listener); 11041 }); 11042 lgQuery.eventListeners[eventName] = []; 11043 } 11044 }); 11045 return this; 11046 } 11047 }, { 11048 key: "trigger", 11049 value: function trigger(event, detail) { 11050 if (!this.firstElement) { 11051 return this; 11052 } 11053 var customEvent = new CustomEvent(event.split(".")[0], { 11054 detail: detail || null 11055 }); 11056 this.firstElement.dispatchEvent(customEvent); 11057 return this; 11058 } 11059 // Does not support IE 11060 }, { 11061 key: "load", 11062 value: function load(url) { 11063 var _this5 = this; 11064 fetch(url).then(function(res) { 11065 return res.text(); 11066 }).then(function(html) { 11067 _this5.selector.innerHTML = html; 11068 }); 11069 return this; 11070 } 11071 }, { 11072 key: "html", 11073 value: function html(_html) { 11074 if (_html === void 0) { 11075 if (!this.firstElement) { 11076 return ""; 11077 } 11078 return this.firstElement.innerHTML; 11079 } 11080 this._each(function(el) { 11081 el.innerHTML = _html; 11082 }); 11083 return this; 11084 } 11085 }, { 11086 key: "append", 11087 value: function append(html) { 11088 this._each(function(el) { 11089 if (typeof html === "string") { 11090 el.insertAdjacentHTML("beforeend", html); 11091 } else { 11092 el.appendChild(html); 11093 } 11094 }); 11095 return this; 11096 } 11097 }, { 11098 key: "prepend", 11099 value: function prepend(html) { 11100 this._each(function(el) { 11101 if (typeof html === "string") { 11102 el.insertAdjacentHTML("afterbegin", html); 11103 } else if (html instanceof HTMLElement) { 11104 el.insertBefore(html.cloneNode(true), el.firstChild); 11105 } 11106 }); 11107 return this; 11108 } 11109 }, { 11110 key: "remove", 11111 value: function remove() { 11112 this._each(function(el) { 11113 el.parentNode.removeChild(el); 11114 }); 11115 return this; 11116 } 11117 }, { 11118 key: "empty", 11119 value: function empty() { 11120 this._each(function(el) { 11121 el.innerHTML = ""; 11122 }); 11123 return this; 11124 } 11125 }, { 11126 key: "scrollTop", 11127 value: function scrollTop(_scrollTop) { 11128 if (_scrollTop !== void 0) { 11129 document.body.scrollTop = _scrollTop; 11130 document.documentElement.scrollTop = _scrollTop; 11131 return this; 11132 } else { 11133 return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; 11134 } 11135 } 11136 }, { 11137 key: "scrollLeft", 11138 value: function scrollLeft(_scrollLeft) { 11139 if (_scrollLeft !== void 0) { 11140 document.body.scrollLeft = _scrollLeft; 11141 document.documentElement.scrollLeft = _scrollLeft; 11142 return this; 11143 } else { 11144 return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; 11145 } 11146 } 11147 }, { 11148 key: "offset", 11149 value: function offset() { 11150 if (!this.firstElement) { 11151 return { 11152 left: 0, 11153 top: 0 11154 }; 11155 } 11156 var rect = this.firstElement.getBoundingClientRect(); 11157 var bodyMarginLeft = $LG("body").style().marginLeft; 11158 return { 11159 left: rect.left - parseFloat(bodyMarginLeft) + this.scrollLeft(), 11160 top: rect.top + this.scrollTop() 11161 }; 11162 } 11163 }, { 11164 key: "style", 11165 value: function style() { 11166 if (!this.firstElement) { 11167 return {}; 11168 } 11169 return this.firstElement.currentStyle || window.getComputedStyle(this.firstElement); 11170 }
11171 // Width without padding and border even if box-sizing is used. 11172 }, { 11173 key: "width", 11174 value: function width() { 11175 var style = this.style(); 11176 return this.firstElement.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight); 11177 } 11178 // Height without padding and border even if box-sizing is used. 11179 }, { 11180 key: "height", 11181 value: function height() { 11182 var style = this.style(); 11183 return this.firstElement.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom); 11184 } 11185 }], [{ 11186 key: "generateUUID", 11187 value: function generateUUID() { 11188 return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) { 11189 var r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8; 11190 return v.toString(16); 11191 }); 11192 } 11193 }]); 11194 return lgQuery; 11195 })(); 11196 lgQuery_lgQuery.eventListeners = {}; 11197 function $LG(selector) { 11198 initLgPolyfills(); 11199 return new lgQuery_lgQuery(selector); 11200 } 11201 var defaultDynamicOptions = ["src", "sources", "subHtml", "subHtmlUrl", "html", "video", "poster", "slideName", "responsive", "srcset", "sizes", "iframe", "downloadUrl", "download", "width", "facebookShareUrl", "tweetText", "iframeTitle", "twitterShareUrl", "pinterestShareUrl", "pinterestText", "fbHtml", "disqusIdentifier", "disqusUrl"]; 11202 function convertToData(attr) { 11203 if (attr === "href") { 11204 return "src"; 11205 } 11206 attr = attr.replace("data-", ""); 11207 attr = attr.charAt(0).toLowerCase() + attr.slice(1); 11208 attr = attr.replace(/-([a-z])/g, function(g) { 11209 return g[1].toUpperCase(); 11210 }); 11211 return attr; 11212 } 11213 var utils = { 11214 /** 11215 * Fetches HTML content from a given URL and inserts it into a specified element. 11216 * 11217 * @param url - The URL to fetch the HTML content from. 11218 * @param element - The DOM element (jQuery object) to insert the HTML content into. 11219 * @param insertMethod - The method to insert the HTML ('append' or 'replace'). 11220 */ 11221 fetchCaptionFromUrl: function fetchCaptionFromUrl(url, element, insertMethod) { 11222 fetch(url).then(function(response) { 11223 return response.text(); 11224 }).then(function(htmlContent) { 11225 if (insertMethod === "append") { 11226 var contentDiv = '<div class="lg-sub-html">'.concat(htmlContent, "</div>"); 11227 element.append(contentDiv); 11228 } else { 11229 element.html(htmlContent); 11230 } 11231 }); 11232 }, 11233 /** 11234 * get possible width and height from the lgSize attribute. Used for ZoomFromOrigin option 11235 */ 11236 getSize: function getSize(el, container) { 11237 var spacing = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; 11238 var defaultLgSize = arguments.length > 3 ? arguments[3] : void 0; 11239 var LGel = $LG(el); 11240 var lgSize = LGel.attr("data-lg-size") || defaultLgSize; 11241 if (!lgSize) { 11242 return; 11243 } 11244 var isResponsiveSizes = lgSize.split(","); 11245 if (isResponsiveSizes[1]) { 11246 var wWidth = window.innerWidth; 11247 for (var i = 0; i < isResponsiveSizes.length; i++) { 11248 var _size = isResponsiveSizes[i]; 11249 var responsiveWidth = parseInt(_size.split("-")[2], 10); 11250 if (responsiveWidth > wWidth) { 11251 lgSize = _size; 11252 break; 11253 } 11254 if (i === isResponsiveSizes.length - 1) { 11255 lgSize = _size; 11256 } 11257 } 11258 } 11259 var size = lgSize.split("-"); 11260 var width = parseInt(size[0], 10); 11261 var height = parseInt(size[1], 10); 11262 var cWidth = container.width(); 11263 var cHeight = container.height() - spacing; 11264 var maxWidth = Math.min(cWidth, width); 11265 var maxHeight = Math.min(cHeight, height); 11266 var ratio = Math.min(maxWidth / width, maxHeight / height); 11267 return { 11268 width: width * ratio, 11269 height: height * ratio 11270 }; 11271 }, 11272 /**
11273 * @desc Get transform value based on the imageSize. Used for ZoomFromOrigin option 11274 * @param {jQuery Element} 11275 * @returns {String} Transform CSS string 11276 */ 11277 getTransform: function getTransform(el, container, top, bottom, imageSize) { 11278 if (!imageSize) { 11279 return; 11280 } 11281 var LGel = $LG(el).find("img").first(); 11282 if (!LGel.get()) { 11283 return; 11284 } 11285 var containerRect = container.get().getBoundingClientRect(); 11286 var wWidth = containerRect.width; 11287 var wHeight = container.height() - (top + bottom); 11288 var elWidth = LGel.width(); 11289 var elHeight = LGel.height(); 11290 var elStyle = LGel.style(); 11291 var x = (wWidth - elWidth) / 2 - LGel.offset().left + (parseFloat(elStyle.paddingLeft) || 0) + (parseFloat(elStyle.borderLeft) || 0) + $LG(window).scrollLeft() + containerRect.left; 11292 var y = (wHeight - elHeight) / 2 - LGel.offset().top + (parseFloat(elStyle.paddingTop) || 0) + (parseFloat(elStyle.borderTop) || 0) + $LG(window).scrollTop() + top; 11293 var scX = elWidth / imageSize.width; 11294 var scY = elHeight / imageSize.height; 11295 var transform2 = "translate3d(" + (x *= -1) + "px, " + (y *= -1) + "px, 0) scale3d(" + scX + ", " + scY + ", 1)"; 11296 return transform2; 11297 }, 11298 getIframeMarkup: function getIframeMarkup(iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) { 11299 var title = iframeTitle ? 'title="' + iframeTitle + '"' : ""; 11300 return '<div class="lg-media-cont lg-has-iframe" style="width:'.concat(iframeWidth, "; max-width:").concat(iframeMaxWidth, "; height: ").concat(iframeHeight, "; max-height:").concat(iframeMaxHeight, '">\n <iframe class="lg-object" frameborder="0" ').concat(title, ' src="').concat(src, '" allowfullscreen="true"></iframe>\n </div>'); 11301 }, 11302 getImgMarkup: function getImgMarkup(index, src, altAttr, srcset, sizes, sources) { 11303 var srcsetAttr = srcset ? 'srcset="'.concat(srcset, '"') : ""; 11304 var sizesAttr = sizes ? 'sizes="'.concat(sizes, '"') : ""; 11305 var imgMarkup = "<img ".concat(altAttr, " ").concat(srcsetAttr, " ").concat(sizesAttr, ' class="lg-object lg-image" data-index="').concat(index, '" src="').concat(src, '" />'); 11306 var sourceTag = ""; 11307 if (sources) { 11308 var sourceObj = typeof sources === "string" ? JSON.parse(sources) : sources; 11309 sourceTag = sourceObj.map(function(source) { 11310 var attrs = ""; 11311 Object.keys(source).forEach(function(key) { 11312 attrs += " ".concat(key, '="').concat(source[key], '"'); 11313 }); 11314 return "<source ".concat(attrs, "></source>"); 11315 }); 11316 } 11317 return "".concat(sourceTag).concat(imgMarkup); 11318 }, 11319 // Get src from responsive src 11320 getResponsiveSrc: function getResponsiveSrc(srcItms) { 11321 var rsWidth = []; 11322 var rsSrc = []; 11323 var src = ""; 11324 for (var i = 0; i < srcItms.length; i++) { 11325 var _src = srcItms[i].split(" "); 11326 if (_src[0] === "") { 11327 _src.splice(0, 1); 11328 } 11329 rsSrc.push(_src[0]); 11330 rsWidth.push(_src[1]); 11331 } 11332 var wWidth = window.innerWidth; 11333 for (var j = 0; j < rsWidth.length; j++) { 11334 if (parseInt(rsWidth[j], 10) > wWidth) { 11335 src = rsSrc[j]; 11336 break; 11337 } 11338 } 11339 return src; 11340 }, 11341 isImageLoaded: function isImageLoaded(img) { 11342 if (!img) return false; 11343 if (!img.complete) { 11344 return false; 11345 } 11346 if (img.naturalWidth === 0) { 11347 return false;
11348 } 11349 return true; 11350 }, 11351 getVideoPosterMarkup: function getVideoPosterMarkup(_poster, dummyImg, videoContStyle, playVideoString, _isVideo) { 11352 var videoClass = ""; 11353 if (_isVideo && _isVideo.youtube) { 11354 videoClass = "lg-has-youtube"; 11355 } else if (_isVideo && _isVideo.vimeo) { 11356 videoClass = "lg-has-vimeo"; 11357 } else { 11358 videoClass = "lg-has-html5"; 11359 } 11360 var _dummy = dummyImg; 11361 if (typeof dummyImg !== "string") { 11362 _dummy = dummyImg.outerHTML; 11363 } 11364 return '<div class="lg-video-cont '.concat(videoClass, '" style="').concat(videoContStyle, '">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="').concat(playVideoString, '"\n role="img"\n class="lg-video-play-icon"\n >\n <title>').concat(playVideoString, '</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n ').concat(_dummy, '\n <img class="lg-object lg-video-poster" src="').concat(_poster, '" />\n </div>'); 11365 }, 11366 getFocusableElements: function getFocusableElements(container) { 11367 var elements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'); 11368 var visibleElements = [].filter.call(elements, function(element) { 11369 var style = window.getComputedStyle(element); 11370 return style.display !== "none" && style.visibility !== "hidden"; 11371 }); 11372 return visibleElements; 11373 }, 11374 /** 11375 * @desc Create dynamic elements array from gallery items when dynamic option is false 11376 * It helps to avoid frequent DOM interaction 11377 * and avoid multiple checks for dynamic elments 11378 * 11379 * @returns {Array} dynamicEl 11380 */ 11381 getDynamicOptions: function getDynamicOptions(items, extraProps, getCaptionFromTitleOrAlt, exThumbImage) { 11382 var dynamicElements = []; 11383 var availableDynamicOptions = [].concat(defaultDynamicOptions, toConsumableArray_toConsumableArray(extraProps)); 11384 [].forEach.call(items, function(item) { 11385 var dynamicEl = {}; 11386 for (var i = 0; i < item.attributes.length; i++) { 11387 var attr = item.attributes[i]; 11388 if (attr.specified) { 11389 var dynamicAttr = convertToData(attr.name); 11390 var label = ""; 11391 if (availableDynamicOptions.indexOf(dynamicAttr) > -1) { 11392 label = dynamicAttr; 11393 } 11394 if (label) { 11395 dynamicEl[label] = attr.value; 11396 } 11397 } 11398 } 11399 var currentItem = $LG(item); 11400 var alt = currentItem.find("img").first().attr("alt"); 11401 var title = currentItem.attr("title"); 11402 var thumb = exThumbImage ? currentItem.attr(exThumbImage) : currentItem.find("img").first().attr("src"); 11403 dynamicEl.thumb = thumb; 11404 if (getCaptionFromTitleOrAlt && !dynamicEl.subHtml) { 11405 dynamicEl.subHtml = title || alt || ""; 11406 } 11407 dynamicEl.alt = alt || title || ""; 11408 dynamicElements.push(dynamicEl); 11409 }); 11410 return dynamicElements; 11411 }, 11412 isMobile: function isMobile() { 11413 return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); 11414 }, 11415 /**
11416 * @desc Check the given src is video 11417 * @param {String} src 11418 * @return {Object} video type 11419 * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] } 11420 * 11421 * @todo - this information can be moved to dynamicEl to avoid frequent calls 11422 */ 11423 isVideo: function isVideo(src, isHTML5VIdeo, index) { 11424 if (!src) { 11425 if (isHTML5VIdeo) { 11426 return { 11427 html5: true 11428 }; 11429 } else { 11430 console.error("lightGallery :- data-src is not provided on slide item " + (index + 1) + ". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/"); 11431 return; 11432 } 11433 } 11434 var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i); 11435 var vimeo = src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i); 11436 var wistia = src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/); 11437 if (youtube) { 11438 return { 11439 youtube 11440 }; 11441 } else if (vimeo) { 11442 return { 11443 vimeo 11444 }; 11445 } else if (wistia) { 11446 return { 11447 wistia 11448 }; 11449 } 11450 } 11451 }; 11452 var lg_utils = utils; 11453 var lgId = 0; 11454 var lightgallery_LightGallery = /* @__PURE__ */ (function() { 11455 function LightGallery(element, options) { 11456 _classCallCheck(this, LightGallery); 11457 this.lgOpened = false; 11458 this.index = 0; 11459 this.plugins = []; 11460 this.lGalleryOn = false; 11461 this.lgBusy = false; 11462 this.currentItemsInDom = []; 11463 this.prevScrollTop = 0; 11464 this.bodyPaddingRight = 0; 11465 this.isDummyImageRemoved = false; 11466 this.dragOrSwipeEnabled = false; 11467 this.mediaContainerPosition = { 11468 top: 0, 11469 bottom: 0 11470 }; 11471 if (!element) { 11472 return this; 11473 } 11474 lgId++; 11475 this.lgId = lgId; 11476 this.el = element; 11477 this.LGel = $LG(element); 11478 this.generateSettings(options); 11479 this.buildModules(); 11480 if (this.settings.dynamic && this.settings.dynamicEl !== void 0 && !Array.isArray(this.settings.dynamicEl)) { 11481 throw "When using dynamic mode, you must also define dynamicEl as an Array."; 11482 } 11483 this.galleryItems = this.getItems(); 11484 this.normalizeSettings(); 11485 this.init(); 11486 this.validateLicense(); 11487 return this; 11488 } 11489 _createClass(LightGallery, [{ 11490 key: "generateSettings", 11491 value: function generateSettings(options) { 11492 this.settings = _objectSpread2(_objectSpread2({}, lightGalleryCoreSettings), options); 11493 if (this.settings.isMobile && typeof this.settings.isMobile === "function" ? this.settings.isMobile() : lg_utils.isMobile()) { 11494 var mobileSettings = _objectSpread2(_objectSpread2({}, this.settings.mobileSettings), this.settings.mobileSettings); 11495 this.settings = _objectSpread2(_objectSpread2({}, this.settings), mobileSettings); 11496 } 11497 } 11498 }, { 11499 key: "normalizeSettings", 11500 value: function normalizeSettings() { 11501 if (this.settings.slideEndAnimation) { 11502 this.settings.hideControlOnEnd = false; 11503 } 11504 if (!this.settings.closable) { 11505 this.settings.swipeToClose = false; 11506 } 11507 this.zoomFromOrigin = this.settings.zoomFromOrigin; 11508 if (this.settings.dynamic) { 11509 this.zoomFromOrigin = false;
11510 } 11511 if (this.settings.container) { 11512 var container = this.settings.container; 11513 if (typeof container === "function") { 11514 this.settings.container = container(); 11515 } else if (typeof container === "string") { 11516 var el = document.querySelector(container); 11517 this.settings.container = el !== null && el !== void 0 ? el : document.body; 11518 } 11519 } else { 11520 this.settings.container = document.body; 11521 } 11522 this.settings.preload = Math.min(this.settings.preload, this.galleryItems.length); 11523 } 11524 }, { 11525 key: "init", 11526 value: function init() { 11527 var _this = this; 11528 this.addSlideVideoInfo(this.galleryItems); 11529 this.buildStructure(); 11530 this.LGel.trigger(lGEvents.init, { 11531 instance: this 11532 }); 11533 if (this.settings.keyPress) { 11534 this.keyPress(); 11535 } 11536 setTimeout(function() { 11537 _this.enableDrag(); 11538 _this.enableSwipe(); 11539 _this.triggerPosterClick(); 11540 }, 50); 11541 this.arrow(); 11542 if (this.settings.mousewheel) { 11543 this.mousewheel(); 11544 } 11545 if (!this.settings.dynamic) { 11546 this.openGalleryOnItemClick(); 11547 } 11548 } 11549 }, { 11550 key: "openGalleryOnItemClick", 11551 value: function openGalleryOnItemClick() { 11552 var _this2 = this; 11553 var _loop2 = function _loop22(index2) { 11554 var element = _this2.items[index2]; 11555 var $element = $LG(element); 11556 var uuid = lgQuery_lgQuery.generateUUID(); 11557 $element.attr("data-lg-id", uuid).on("click.lgcustom-item-".concat(uuid), function(e) { 11558 e.preventDefault(); 11559 var currentItemIndex = _this2.settings.index || index2; 11560 _this2.openGallery(currentItemIndex, element); 11561 }); 11562 }; 11563 for (var index = 0; index < this.items.length; index++) { 11564 _loop2(index); 11565 } 11566 } 11567 /** 11568 * Module constructor 11569 * Modules are build incrementally. 11570 * Gallery should be opened only once all the modules are initialized. 11571 * use moduleBuildTimeout to make sure this 11572 */ 11573 }, { 11574 key: "buildModules", 11575 value: function buildModules() { 11576 var _this3 = this; 11577 this.settings.plugins.forEach(function(plugin) { 11578 _this3.plugins.push(new plugin(_this3, $LG)); 11579 }); 11580 } 11581 }, { 11582 key: "validateLicense", 11583 value: function validateLicense() { 11584 if (!this.settings.licenseKey) { 11585 console.error("Please provide a valid license key"); 11586 } else if (this.settings.licenseKey === "0000-0000-000-0000") { 11587 console.warn("lightGallery: ".concat(this.settings.licenseKey, " license key is not valid for production use")); 11588 } 11589 } 11590 }, { 11591 key: "getSlideItem", 11592 value: function getSlideItem(index) { 11593 return $LG(this.getSlideItemId(index)); 11594 } 11595 }, { 11596 key: "getSlideItemId", 11597 value: function getSlideItemId(index) { 11598 return "#lg-item-".concat(this.lgId, "-").concat(index); 11599 } 11600 }, { 11601 key: "getIdName", 11602 value: function getIdName(id) { 11603 return "".concat(id, "-").concat(this.lgId); 11604 } 11605 }, { 11606 key: "getElementById", 11607 value: function getElementById(id) { 11608 return $LG("#".concat(this.getIdName(id))); 11609 } 11610 }, { 11611 key: "manageSingleSlideClassName", 11612 value: function manageSingleSlideClassName() { 11613 if (this.galleryItems.length < 2) { 11614 this.outer.addClass("lg-single-item"); 11615 } else { 11616 this.outer.removeClass("lg-single-item"); 11617 } 11618 } 11619 }, { 11620 key: "buildStructure", 11621 value: function buildStructure() { 11622 var _this4 = this; 11623 var container = this.$container && this.$container.get(); 11624 if (container) { 11625 return; 11626 } 11627 var controls = ""; 11628 var subHtmlCont = ""; 11629 if (this.settings.controls) { 11630 controls = '<button type="button" id="'.concat(this.getIdName("lg-prev"), '" aria-label="').concat(this.settings.strings["previousSlide"], '" class="lg-prev lg-icon"> ').concat(this.settings.prevHtml, ' </button>\n <button type="button" id="').concat(this.getIdName("lg-next"), '" aria-label="').concat(this.settings.strings["nextSlide"], '" class="lg-next lg-icon"> ').concat(this.settings.nextHtml, " </button>"); 11631 } 11632 if (this.settings.appendSubHtmlTo !== ".lg-item") { 11633 subHtmlCont = '<div class="lg-sub-html" role="status" aria-l
11633ive="polite"></div>'; 11634 } 11635 var addClasses = ""; 11636 if (this.settings.allowMediaOverlap) { 11637 addClasses += "lg-media-overlap "; 11638 } 11639 var ariaLabelledby = this.settings.ariaLabelledby ? 'aria-labelledby="' + this.settings.ariaLabelledby + '"' : ""; 11640 var ariaDescribedby = this.settings.ariaDescribedby ? 'aria-describedby="' + this.settings.ariaDescribedby + '"' : ""; 11641 var containerClassName = "lg-container ".concat(this.settings.addClass, " ").concat(document.body !== this.settings.container ? "lg-inline" : ""); 11642 var closeIcon = this.settings.closable && this.settings.showCloseIcon ? '<button type="button" aria-label="'.concat(this.settings.strings["closeGallery"], '" id="').concat(this.getIdName("lg-close"), '" class="lg-close lg-icon"></button>') : ""; 11643 var maximizeIcon = this.settings.showMaximizeIcon ? '<button type="button" aria-label="'.concat(this.settings.strings["toggleMaximize"], '" id="').concat(this.getIdName("lg-maximize"), '" class="lg-maximize lg-icon"></button>') : ""; 11644 var template = '\n <div class="'.concat(containerClassName, '" id="').concat(this.getIdName("lg-container"), '" tabindex="-1" aria-modal="true" ').concat(ariaLabelledby, " ").concat(ariaDescribedby, ' role="dialog"\n >\n <div id="').concat(this.getIdName("lg-backdrop"), '" class="lg-backdrop"></div>\n\n <div id="').concat(this.getIdName("lg-outer"), '" class="lg-outer lg-use-css3 lg-css3 lg-hide-items ').concat(addClasses, ' ">\n\n <div id="').concat(this.getIdName("lg-content"), '" class="lg-content">\n <div id="').concat(this.getIdName("lg-inner"), '" class="lg-inner">\n </div>\n ').concat(controls, '\n </div>\n <div id="').concat(this.getIdName("lg-toolbar"), '" class="lg-toolbar lg-group">\n ').concat(maximizeIcon, "\n ").concat(closeIcon, "\n </div>\n ").concat(this.settings.appendSubHtmlTo === ".lg-outer" ? subHtmlCont : "", '\n <div id="').concat(this.getIdName("lg-components"), '" class="lg-components">\n ').concat(this.settings.appendSubHtmlTo === ".lg-sub-html" ? subHtmlCont : "", "\n </div>\n </div>\n </div>\n "); 11645 $LG(this.settings.container).append(template); 11646 if (document.body !== this.settings.container) { 11647 $LG(this.settings.container).css("position", "relative"); 11648 } 11649 this.outer = this.getElementById("lg-outer"); 11650 this.$lgComponents = this.getElementById("lg-components"); 11651 this.$backdrop = this.getElementById("lg-backdrop"); 11652 this.$container = this.getElementById("lg-container"); 11653 this.$inner = this.getElementById("lg-inner"); 11654 this.$content = this.getElementById("lg-content"); 11655 this.$toolbar = this.getElementById("lg-toolbar"); 11656 this.$backdrop.css("transition-duration", this.settings.backdropDuration + "ms"); 11657 var outerClassNames = "".concat(this.settings.mode, " "); 11658 this.manageSingleSlideClassName(); 11659 if (this.settings.enableDrag) { 11660 outerClassNames += "lg-grab "; 11661 } 11662 this.outer.addClass(outerClassNames); 11663 this.$inner.css("transition-timing-function", this.settings.easing); 11664 this.$inner.css("transition-duration", this.settings.speed + "ms"); 11665 if (this.settings.download) { 11666 this.$toolbar.append('<a id="'.concat(this.getIdName("lg-download"), '" target="_blank" rel="noopener" aria-label="').concat(this.settings.strings["download"], '" download class="lg-download lg-icon"></a>')); 11667 } 11668 this.counter(); 11669 $LG(window).on("resize.lg.global".concat(this.lgId, " orientationchange.lg.global").concat(this.lgId), function() { 11670 _this4.refreshOnResize(); 11671 }); 11672 this.hideBars(); 11673 this.manageCloseGallery(); 11674 this.toggleMaximize(); 11675 this.initModules(); 11676 } 11677 }, { 11678 key: "refreshOnResize", 11679 value: function refreshOnResize() { 11680 if (this.lgOpened) { 11681 var currentGalleryItem = this.galleryItems[this.index]; 11682 var __slideVideoInfo = currentGalleryItem.__slideVideoInfo; 11683 this.mediaContainerPosition = this.getMediaContainerPosition(); 11684 var _this$mediaContainerP = this.mediaContainerPosition, top = _this$mediaContainerP.top, bottom = _this$mediaContainerP.bottom; 11685 this.currentImageSize = lg_utils.getSize(this.items[this.index], this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize); 11686 if (__slideVideoInfo) { 11687 this.resizeVideoSlide(this.index, this.currentImageSize); 11688 } 11689 if (this.zoomFromOrigin && !this.isDummyImageRemoved) { 11690 var imgStyle = this.getDummyImgStyles(this.currentImageSize); 11691 this.outer.find(".lg-current .lg-dummy-img").first().attr("style", imgStyle); 11692 } 11693 this.LGel.trigger(lGEvents.containerResize); 11694 } 11695 } 11696 }, { 11697 key: "resizeVideoSlide", 11698 value: function resizeVideoSlide(index, imageSize) { 11699 var lgVideoStyle = this.getVideoContStyle(imageSize);
vendor: 3,256 bytes, lines 11700-11772
11700 var currentSlide = this.getSlideItem(index); 11701 currentSlide.find(".lg-video-cont").attr("style", lgVideoStyle); 11702 } 11703 /** 11704 * Update slides dynamically. 11705 * Add, edit or delete slides dynamically when lightGallery is opened. 11706 * Modify the current gallery items and pass it via updateSlides method 11707 * @note 11708 * - Do not mutate existing lightGallery items directly. 11709 * - Always pass new list of gallery items 11710 * - You need to take care of thumbnails outside the gallery if any 11711 * - user this method only if you want to update slides when the gallery is opened. Otherwise, use `refresh()` method. 11712 * @param items Gallery items 11713 * @param index After the update operation, which slide gallery should navigate to 11714 * @category lGPublicMethods 11715 * @example 11716 * const plugin = lightGallery(); 11717 * 11718 * // Adding slides dynamically 11719 * let galleryItems = [ 11720 * // Access existing lightGallery items 11721 * // galleryItems are automatically generated internally from the gallery HTML markup 11722 * // or directly from galleryItems when dynamic gallery is used 11723 * ...plugin.galleryItems, 11724 * ...[ 11725 * { 11726 * src: 'img/img-1.png', 11727 * thumb: 'img/thumb1.png', 11728 * }, 11729 * ], 11730 * ]; 11731 * plugin.updateSlides( 11732 * galleryItems, 11733 * plugin.index, 11734 * ); 11735 * 11736 * 11737 * // Remove slides dynamically 11738 * galleryItems = JSON.parse( 11739 * JSON.stringify(updateSlideInstance.galleryItems), 11740 * ); 11741 * galleryItems.shift(); 11742 * updateSlideInstance.updateSlides(galleryItems, 1); 11743 * @see <a href="/demos/update-slides/">Demo</a> 11744 */ 11745 }, { 11746 key: "updateSlides", 11747 value: function updateSlides(items, index) { 11748 if (this.index > items.length - 1) { 11749 this.index = items.length - 1; 11750 } 11751 if (items.length === 1) { 11752 this.index = 0; 11753 } 11754 if (!items.length) { 11755 this.closeGallery(); 11756 return; 11757 } 11758 var currentSrc = this.galleryItems[index].src; 11759 this.galleryItems = items; 11760 this.updateControls(); 11761 this.$inner.empty(); 11762 this.currentItemsInDom = []; 11763 var _index = 0; 11764 this.galleryItems.some(function(galleryItem, itemIndex) { 11765 if (galleryItem.src === currentSrc) { 11766 _index = itemIndex; 11767 return true; 11768 } 11769 return false; 11770 }); 11771 this.currentItemsInDom = this.organizeSlideItems(_index, -1); 11772 this.loadContent(_index, true);
11773 this.getSlideItem(_index).addClass("lg-current"); 11774 this.index = _index; 11775 this.updateCurrentCounter(_index); 11776 this.LGel.trigger(lGEvents.updateSlides); 11777 } 11778 // Get gallery items based on multiple conditions 11779 }, { 11780 key: "getItems", 11781 value: function getItems() { 11782 this.items = []; 11783 if (!this.settings.dynamic) { 11784 if (this.settings.selector === "this") { 11785 this.items.push(this.el); 11786 } else if (this.settings.selector) { 11787 if (typeof this.settings.selector === "string") { 11788 if (this.settings.selectWithin) { 11789 var selectWithin = $LG(this.settings.selectWithin); 11790 this.items = selectWithin.find(this.settings.selector).get(); 11791 } else { 11792 this.items = this.el.querySelectorAll(this.settings.selector); 11793 } 11794 } else { 11795 this.items = this.settings.selector; 11796 } 11797 } else { 11798 this.items = this.el.children; 11799 } 11800 return lg_utils.getDynamicOptions(this.items, this.settings.extraProps, this.settings.getCaptionFromTitleOrAlt, this.settings.exThumbImage); 11801 } else { 11802 return this.settings.dynamicEl || []; 11803 } 11804 } 11805 }, { 11806 key: "shouldHideScrollbar", 11807 value: function shouldHideScrollbar() { 11808 return this.settings.hideScrollbar && document.body === this.settings.container; 11809 } 11810 }, { 11811 key: "hideScrollbar", 11812 value: function hideScrollbar() { 11813 if (!this.shouldHideScrollbar()) { 11814 return; 11815 } 11816 this.bodyPaddingRight = parseFloat($LG("body").style().paddingRight); 11817 var bodyRect = document.documentElement.getBoundingClientRect(); 11818 var scrollbarWidth = window.innerWidth - bodyRect.width; 11819 $LG(document.body).css("padding-right", scrollbarWidth + this.bodyPaddingRight + "px"); 11820 $LG(document.body).addClass("lg-overlay-open"); 11821 } 11822 }, { 11823 key: "resetScrollBar", 11824 value: function resetScrollBar() { 11825 if (!this.shouldHideScrollbar()) { 11826 return; 11827 } 11828 $LG(document.body).css("padding-right", this.bodyPaddingRight + "px"); 11829 $LG(document.body).removeClass("lg-overlay-open"); 11830 } 11831 /** 11832 * Open lightGallery. 11833 * Open gallery with specific slide by passing index of the slide as parameter. 11834 * @category lGPublicMethods 11835 * @param {Number} index - index of the slide 11836 * @param {HTMLElement} element - Which image lightGallery should zoom from 11837 * 11838 * @example 11839 * const $dynamicGallery = document.getElementById('dynamic-gallery-demo'); 11840 * const dynamicGallery = lightGallery($dynamicGallery, { 11841 * dynamic: true, 11842 * dynamicEl: [ 11843 * { 11844 * src: 'img/1.jpg', 11845 * thumb: 'img/thumb-1.jpg', 11846 * subHtml: '<h4>Image 1 title</h4><p>Image 1 descriptions.</p>', 11847 * }, 11848 * ... 11849 * ], 11850 * }); 11851 * $dynamicGallery.addEventListener('click', function () { 11852 * // Starts with third item.(Optional). 11853 * // This is useful if you want use dynamic mode with 11854 * // custom thumbnails (thumbnails outside gallery), 11855 * dynamicGallery.openGallery(2); 11856 * }); 11857 * 11858 */ 11859 }, { 11860 key: "openGallery", 11861 value: function openGallery() { 11862 var _this5 = this; 11863 var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.settings.index; 11864 var element = arguments.length > 1 ? arguments[1] : void 0; 11865 if (this.lgOpened) return; 11866 this.lgOpened = true; 11867 this.outer.removeClass("lg-hide-items"); 11868 this.hideScrollbar(); 11869 this.$container.addClass("lg-show"); 11870 var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, index); 11871 this.currentItemsInDom = itemsToBeInsertedToDom; 11872 var items = ""; 11873 itemsToBeInsertedToDom.forEach(function(item) { 11874 items = items + '<div id="'.concat(item, '" class="lg-item"></div>'); 11875 }); 11876 this.$inner.append(items); 11877 this.addHtml(index); 11878 var transform2 = ""; 11879 this.mediaContainerPosition = this.getMediaContainerPosition(); 11880 var _this$mediaContainerP2 = this.mediaContainerPosition, top = _this$mediaContainerP2.top, bottom = _this$mediaContainerP2.bottom;
vendor: 1,081 bytes, lines 11881-11898
11881 if (!this.settings.allowMediaOverlap) { 11882 this.setMediaContainerPosition(top, bottom); 11883 } 11884 var __slideVideoInfo = this.galleryItems[index].__slideVideoInfo; 11885 if (this.zoomFromOrigin && element) { 11886 this.currentImageSize = lg_utils.getSize(element, this.outer, top + bottom, __slideVideoInfo && this.settings.videoMaxSize); 11887 transform2 = lg_utils.getTransform(element, this.outer, top, bottom, this.currentImageSize); 11888 } 11889 if (!this.zoomFromOrigin || !transform2) { 11890 this.outer.addClass(this.settings.startClass); 11891 this.getSlideItem(index).removeClass("lg-complete"); 11892 } 11893 var timeout = this.settings.zoomFromOrigin ? 100 : this.settings.backdropDuration; 11894 setTimeout(function() { 11895 _this5.outer.addClass("lg-components-open"); 11896 }, timeout); 11897 this.index = index; 11898 this.LGel.trigger(lGEvents.beforeOpen);
11899 this.getSlideItem(index).addClass("lg-current"); 11900 this.lGalleryOn = false; 11901 this.prevScrollTop = $LG(window).scrollTop(); 11902 setTimeout(function() { 11903 if (_this5.zoomFromOrigin && transform2) { 11904 var currentSlide = _this5.getSlideItem(index); 11905 currentSlide.css("transform", transform2); 11906 setTimeout(function() { 11907 currentSlide.addClass("lg-start-progress lg-start-end-progress").css("transition-duration", _this5.settings.startAnimationDuration + "ms"); 11908 _this5.outer.addClass("lg-zoom-from-image"); 11909 }); 11910 setTimeout(function() { 11911 currentSlide.css("transform", "translate3d(0, 0, 0)"); 11912 }, 100); 11913 } 11914 setTimeout(function() { 11915 _this5.$backdrop.addClass("in"); 11916 _this5.$container.addClass("lg-show-in"); 11917 }, 10); 11918 setTimeout(function() { 11919 if (_this5.settings.trapFocus && document.body === _this5.settings.container) { 11920 _this5.trapFocus(); 11921 } 11922 }, _this5.settings.backdropDuration + 50); 11923 if (!_this5.zoomFromOrigin || !transform2) { 11924 setTimeout(function() { 11925 _this5.outer.addClass("lg-visible"); 11926 }, _this5.settings.backdropDuration); 11927 } 11928 _this5.slide(index, false, false, false); 11929 _this5.LGel.trigger(lGEvents.afterOpen); 11930 }); 11931 if (document.body === this.settings.container) { 11932 $LG("html").addClass("lg-on"); 11933 } 11934 } 11935 /** 11936 * Note - Changing the position of the media on every slide transition creates a flickering effect. 11937 * Therefore, The height of the caption is calculated dynamically, only once based on the first slide caption. 11938 * if you have dynamic captions for each media, 11939 * you can provide an appropriate height for the captions via allowMediaOverlap option 11940 */ 11941 }, { 11942 key: "getMediaContainerPosition", 11943 value: function getMediaContainerPosition() { 11944 if (this.settings.allowMediaOverlap) { 11945 return { 11946 top: 0, 11947 bottom: 0 11948 }; 11949 } 11950 var top = this.$toolbar.get().clientHeight || 0; 11951 var subHtml = this.outer.find(".lg-components .lg-sub-html").get(); 11952 var captionHeight = this.settings.defaultCaptionHeight || subHtml && subHtml.clientHeight || 0; 11953 var thumbContainer = this.outer.find(".lg-thumb-outer").get(); 11954 var thumbHeight = thumbContainer ? thumbContainer.clientHeight : 0; 11955 var bottom = thumbHeight + captionHeight; 11956 return { 11957 top, 11958 bottom 11959 }; 11960 } 11961 }, { 11962 key: "setMediaContainerPosition", 11963 value: function setMediaContainerPosition() { 11964 var top = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; 11965 var bottom = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; 11966 this.$content.css("top", top + "px").css("bottom", bottom + "px"); 11967 } 11968 }, { 11969 key: "hideBars", 11970 value: function hideBars() { 11971 var _this6 = this; 11972 setTimeout(function() { 11973 _this6.outer.removeClass("lg-hide-items"); 11974 if (_this6.settings.hideBarsDelay > 0) { 11975 _this6.outer.on("mousemove.lg click.lg touchstart.lg", function() { 11976 _this6.outer.removeClass("lg-hide-items"); 11977 clearTimeout(_this6.hideBarTimeout); 11978 _this6.hideBarTimeout = setTimeout(function() { 11979 _this6.outer.addClass("lg-hide-items"); 11980 }, _this6.settings.hideBarsDelay); 11981 }); 11982 _this6.outer.trigger("mousemove.lg"); 11983 } 11984 }, this.settings.showBarsAfter); 11985 } 11986 }, { 11987 key: "initPictureFill", 11988 value: function initPictureFill($img) { 11989 if (this.settings.supportLegacyBrowser) { 11990 try { 11991 picturefill({ 11992 elements: [$img.get()] 11993 }); 11994 } catch (e) { 11995 console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document."); 11996 } 11997 } 11998 } 11999 /** 12000 * @desc Create image counter 12001 * Ex: 1/10 12002 */ 12003 }, { 12004 key: "counter", 12005 value: function counter() { 12006 if (this.settings.counter) { 12007 var counterHtml = '<div class="lg-counter" role="status" aria-l
12007ive="polite">\n <span id="'.concat(this.getIdName("lg-counter-current"), '" class="lg-counter-current">').concat(this.index + 1, ' </span> /\n <span id="').concat(this.getIdName("lg-counter-all"), '" class="lg-counter-all">').concat(this.galleryItems.length, " </span></div>"); 12008 this.outer.find(this.settings.appendCounterTo).append(counterHtml); 12009 } 12010 } 12011 /** 12012 * @desc add sub-html into the slide 12013 * @param {Number} index - index of the slide 12014 */ 12015 }, { 12016 key: "addHtml", 12017 value: function addHtml(index) { 12018 var subHtml; 12019 var subHtmlUrl; 12020 if (this.galleryItems[index].subHtmlUrl) { 12021 subHtmlUrl = this.galleryItems[index].subHtmlUrl; 12022 } else { 12023 subHtml = this.galleryItems[index].subHtml; 12024 } 12025 if (!subHtmlUrl) { 12026 if (subHtml) { 12027 var fL = subHtml.substring(0, 1); 12028 if (fL === "." || fL === "#") { 12029 try { 12030 if (this.settings.subHtmlSelectorRelative && !this.settings.dynamic) { 12031 subHtml = $LG(this.items).eq(index).find(subHtml).first().html(); 12032 } else { 12033 subHtml = $LG(subHtml).first().html(); 12034 } 12035 } catch (error) { 12036 console.warn('Error processing subHtml selector "'.concat(subHtml, '"')); 12037 subHtml = ""; 12038 } 12039 } 12040 } else { 12041 subHtml = ""; 12042 } 12043 } 12044 if (this.settings.appendSubHtmlTo !== ".lg-item") { 12045 if (subHtmlUrl) { 12046 lg_utils.fetchCaptionFromUrl(subHtmlUrl, this.outer.find(".lg-sub-html"), "replace"); 12047 } else { 12048 this.outer.find(".lg-sub-html").html(subHtml); 12049 } 12050 } else { 12051 var currentSlide = $LG(this.getSlideItemId(index)); 12052 if (subHtmlUrl) { 12053 lg_utils.fetchCaptionFromUrl(subHtmlUrl, currentSlide, "append"); 12054 } else { 12055 currentSlide.append('<div class="lg-sub-html">'.concat(subHtml, "</div>")); 12056 } 12057 } 12058 if (typeof subHtml !== "undefined" && subHtml !== null) { 12059 if (subHtml === "") { 12060 this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"); 12061 } else { 12062 this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html"); 12063 } 12064 } 12065 this.LGel.trigger(lGEvents.afterAppendSubHtml, { 12066 index 12067 }); 12068 } 12069 /** 12070 * @desc Preload slides 12071 * @param {Number} index - index of the slide 12072 * @todo preload not working for the first slide, Also, should work for the first and last slide as well 12073 */ 12074 }, { 12075 key: "preload", 12076 value: function preload(index) { 12077 for (var i = 1; i <= this.settings.preload; i++) { 12078 if (i >= this.galleryItems.length - index) { 12079 break; 12080 } 12081 this.loadContent(index + i, false); 12082 } 12083 for (var j = 1; j <= this.settings.preload; j++) { 12084 if (index - j < 0) { 12085 break; 12086 } 12087 this.loadContent(index - j, false); 12088 } 12089 } 12090 }, { 12091 key: "getDummyImgStyles", 12092 value: function getDummyImgStyles(imageSize) { 12093 if (!imageSize) return ""; 12094 return "width:".concat(imageSize.width, "px;\n margin-left: -").concat(imageSize.width / 2, "px;\n margin-top: -").concat(imageSize.height / 2, "px;\n height:").concat(imageSize.height, "px"); 12095 } 12096 }, { 12097 key: "getVideoContStyle", 12098 value: function getVideoContStyle(imageSize) { 12099 if (!imageSize) return ""; 12100 return "width:".concat(imageSize.width, "px;\n height:").concat(imageSize.height, "px"); 12101 } 12102 }, { 12103 key: "getDummyImageContent", 12104 value: function getDummyImageContent($currentSlide, index, alt) { 12105 var $currentItem; 12106 if (!this.settings.dynamic) { 12107 $currentItem = $LG(this.items).eq(index); 12108 } 12109 if ($currentItem) { 12110 var _dummyImgSrc; 12111 if (!this.settings.exThumbImage) { 12112 _dummyImgSrc = $currentItem.find("img").first().attr("src"); 12113 } else { 12114 _dummyImgSrc = $currentItem.attr(this.settings.exThumbImage); 12115 } 12116 if (!_dummyImgSrc) return ""; 12117 var imgStyle = this.getDummyImgStyles(this.currentImageSize); 12118 var dummyImgContentImg = document.createElement("img"); 12119 dummyImgContentImg.alt = alt || ""; 12120 dummyImgContentImg.src = _dummyImgSrc; 12121 dummyImgContentImg.className = "lg-dummy-img"; 12122 dummyImgContentImg.style.cssText = imgStyle; 12123 $currentSlide.addClass("lg-first-slide"); 12124 this.outer.addClass("lg-first-slide-loading"); 12125 return dummyImgContentImg; 12126 } 12127 return ""; 12128 } 12129 }, { 12130 key: "setImgMarkup", 12131 value: function setImgMarkup(src, $currentSlide, index) { 12132 var currentGalleryItem = this.galleryItems[index]; 12133 var alt = currentGalleryItem.alt, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; 12134 var imgContent = ""; 12135 var altAttr = alt ? 'alt="' + alt + '"' : ""; 12136 if (this.isFirstSlideWithZoomAnimation()) { 12137 imgContent = this.getDummyImageContent($currentSlide, index, altAttr); 12138 } else { 12139 imgContent = lg_utils.getImgMarkup(index, src, altAttr, srcset, sizes, sources); 12140 } 12141 var picture = document.createElement("picture"); 12142 picture.className = "lg-img-wrap"; 12143 $LG(picture).append(imgContent); 12144 $currentSlide.prepend(picture); 12145 } 12146 }, { 12147 key: "onSlideObjectLoad", 12148 value: function onSlideObjectLoad($slide, isHTML5VideoWithoutPoster, onLoad, onError) {
12149 var mediaObject = $slide.find(".lg-object").first(); 12150 if (lg_utils.isImageLoaded(mediaObject.get()) || isHTML5VideoWithoutPoster) { 12151 onLoad(); 12152 } else { 12153 mediaObject.on("load.lg error.lg", function() { 12154 onLoad && onLoad(); 12155 }); 12156 mediaObject.on("error.lg", function() { 12157 onError && onError(); 12158 }); 12159 } 12160 } 12161 /** 12162 * 12163 * @param $el Current slide item 12164 * @param index 12165 * @param delay Delay is 0 except first time 12166 * @param speed Speed is same as delay, except it is 0 if gallery is opened via hash plugin 12167 * @param isFirstSlide 12168 */ 12169 }, { 12170 key: "onLgObjectLoad", 12171 value: function onLgObjectLoad(currentSlide, index, delay, speed, isFirstSlide, isHTML5VideoWithoutPoster) { 12172 var _this7 = this; 12173 this.onSlideObjectLoad(currentSlide, isHTML5VideoWithoutPoster, function() { 12174 _this7.triggerSlideItemLoad(currentSlide, index, delay, speed, isFirstSlide); 12175 }, function() { 12176 currentSlide.addClass("lg-complete lg-complete_"); 12177 currentSlide.html('<span class="lg-error-msg">' + _this7.settings.strings["mediaLoadingFailed"] + "</span>"); 12178 }); 12179 } 12180 }, { 12181 key: "triggerSlideItemLoad", 12182 value: function triggerSlideItemLoad($currentSlide, index, delay, speed, isFirstSlide) { 12183 var _this8 = this; 12184 var currentGalleryItem = this.galleryItems[index]; 12185 var _speed = isFirstSlide && this.getSlideType(currentGalleryItem) === "video" && !currentGalleryItem.poster ? speed : 0; 12186 setTimeout(function() { 12187 $currentSlide.addClass("lg-complete lg-complete_"); 12188 _this8.LGel.trigger(lGEvents.slideItemLoad, { 12189 index, 12190 delay: delay || 0, 12191 isFirstSlide 12192 }); 12193 }, _speed); 12194 } 12195 }, { 12196 key: "isFirstSlideWithZoomAnimation", 12197 value: function isFirstSlideWithZoomAnimation() { 12198 return !!(!this.lGalleryOn && this.zoomFromOrigin && this.currentImageSize); 12199 } 12200 // Add video slideInfo 12201 }, { 12202 key: "addSlideVideoInfo", 12203 value: function addSlideVideoInfo(items) { 12204 var _this9 = this; 12205 items.forEach(function(element, index) { 12206 element.__slideVideoInfo = lg_utils.isVideo(element.src, !!element.video, index); 12207 if (element.__slideVideoInfo && _this9.settings.loadYouTubePoster && !element.poster && element.__slideVideoInfo.youtube) { 12208 element.poster = "//img.youtube.com/vi/".concat(element.__slideVideoInfo.youtube[1], "/maxresdefault.jpg"); 12209 } 12210 }); 12211 } 12212 /** 12213 * Load slide content into slide. 12214 * This is used to load content into slides that is not visible too 12215 * @param {Number} index - index of the slide. 12216 * @param {Boolean} rec - if true call loadcontent() function again. 12217 */ 12218 }, { 12219 key: "loadContent", 12220 value: function loadContent(index, rec) { 12221 var _this10 = this; 12222 var currentGalleryItem = this.galleryItems[index]; 12223 var $currentSlide = $LG(this.getSlideItemId(index)); 12224 var poster = currentGalleryItem.poster, srcset = currentGalleryItem.srcset, sizes = currentGalleryItem.sizes, sources = currentGalleryItem.sources; 12225 var src = currentGalleryItem.src; 12226 var video = currentGalleryItem.video; 12227 var _html5Video = video && typeof video === "string" ? JSON.parse(video) : video; 12228 if (currentGalleryItem.responsive) { 12229 var srcDyItms = currentGalleryItem.responsive.split(","); 12230 src = lg_utils.getResponsiveSrc(srcDyItms) || src; 12231 } 12232 var videoInfo = currentGalleryItem.__slideVideoInfo; 12233 var lgVideoStyle = ""; 12234 var iframe = !!currentGalleryItem.iframe; 12235 var isFirstSlide = !this.lGalleryOn;
vendor: 4,735 bytes, lines 12236-12317
12236 var delay = 0; 12237 if (isFirstSlide) { 12238 if (this.zoomFromOrigin && this.currentImageSize) { 12239 delay = this.settings.startAnimationDuration + 10; 12240 } else { 12241 delay = this.settings.backdropDuration + 10; 12242 } 12243 } 12244 if (!$currentSlide.hasClass("lg-loaded")) { 12245 if (videoInfo) { 12246 var _this$mediaContainerP3 = this.mediaContainerPosition, top = _this$mediaContainerP3.top, bottom = _this$mediaContainerP3.bottom; 12247 var videoSize = lg_utils.getSize(this.items[index], this.outer, top + bottom, videoInfo && this.settings.videoMaxSize); 12248 lgVideoStyle = this.getVideoContStyle(videoSize); 12249 } 12250 if (iframe) { 12251 var markup = lg_utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle); 12252 $currentSlide.prepend(markup); 12253 } else if (poster) { 12254 var dummyImg = ""; 12255 var hasStartAnimation = isFirstSlide && this.zoomFromOrigin && this.currentImageSize; 12256 if (hasStartAnimation) { 12257 dummyImg = this.getDummyImageContent($currentSlide, index, ""); 12258 } 12259 var _markup = lg_utils.getVideoPosterMarkup(poster, dummyImg || "", lgVideoStyle, this.settings.strings["playVideo"], videoInfo); 12260 $currentSlide.prepend(_markup); 12261 } else if (videoInfo) { 12262 var _markup2 = '<div class="lg-video-cont " style="'.concat(lgVideoStyle, '"></div>'); 12263 $currentSlide.prepend(_markup2); 12264 } else { 12265 this.setImgMarkup(src, $currentSlide, index); 12266 if (srcset || sources) { 12267 var $img = $currentSlide.find(".lg-object"); 12268 this.initPictureFill($img); 12269 } 12270 } 12271 if (poster || videoInfo) { 12272 this.LGel.trigger(lGEvents.hasVideo, { 12273 index, 12274 src, 12275 html5Video: _html5Video, 12276 hasPoster: !!poster 12277 }); 12278 } 12279 this.LGel.trigger(lGEvents.afterAppendSlide, { 12280 index 12281 }); 12282 if (this.lGalleryOn && this.settings.appendSubHtmlTo === ".lg-item") { 12283 this.addHtml(index); 12284 } 12285 } 12286 var _speed = 0; 12287 if (delay && !$LG(document.body).hasClass("lg-from-hash")) { 12288 _speed = delay; 12289 } 12290 if (this.isFirstSlideWithZoomAnimation()) { 12291 setTimeout(function() { 12292 $currentSlide.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style"); 12293 }, this.settings.startAnimationDuration + 100); 12294 if (!$currentSlide.hasClass("lg-loaded")) { 12295 setTimeout(function() { 12296 if (_this10.getSlideType(currentGalleryItem) === "image") { 12297 var alt = currentGalleryItem.alt; 12298 var altAttr = alt ? 'alt="' + alt + '"' : ""; 12299 $currentSlide.find(".lg-img-wrap").append(lg_utils.getImgMarkup(index, src, altAttr, srcset, sizes, currentGalleryItem.sources)); 12300 if (srcset || sources) { 12301 var _$img = $currentSlide.find(".lg-object"); 12302 _this10.initPictureFill(_$img); 12303 } 12304 } 12305 if (_this10.getSlideType(currentGalleryItem) === "image" || _this10.getSlideType(currentGalleryItem) === "video" && poster) { 12306 _this10.onLgObjectLoad($currentSlide, index, delay, _speed, true, false); 12307 _this10.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function() { 12308 _this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); 12309 }, function() { 12310 _this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed); 12311 }); 12312 } 12313 }, this.settings.startAnimationDuration + 100); 12314 } 12315 } 12316 $currentSlide.addClass("lg-loaded"); 12317 if (!this.isFirstSlideWithZoomAnimation() || this.get
12317SlideType(currentGalleryItem) === "video" && !poster) { 12318 this.onLgObjectLoad($currentSlide, index, delay, _speed, isFirstSlide, !!(videoInfo && videoInfo.html5 && !poster)); 12319 } 12320 if ((!this.zoomFromOrigin || !this.currentImageSize) && $currentSlide.hasClass("lg-complete_") && !this.lGalleryOn) { 12321 setTimeout(function() { 12322 $currentSlide.addClass("lg-complete"); 12323 }, this.settings.backdropDuration); 12324 } 12325 this.lGalleryOn = true; 12326 if (rec === true) { 12327 if (!$currentSlide.hasClass("lg-complete_")) { 12328 $currentSlide.find(".lg-object").first().on("load.lg error.lg", function() { 12329 _this10.preload(index); 12330 }); 12331 } else { 12332 this.preload(index); 12333 } 12334 } 12335 } 12336 /** 12337 * @desc Remove dummy image content and load next slides 12338 * Called only for the first time if zoomFromOrigin animation is enabled 12339 * @param index 12340 * @param $currentSlide 12341 * @param speed 12342 */ 12343 }, { 12344 key: "loadContentOnFirstSlideLoad", 12345 value: function loadContentOnFirstSlideLoad(index, $currentSlide, speed) { 12346 var _this11 = this; 12347 setTimeout(function() { 12348 $currentSlide.find(".lg-dummy-img").remove(); 12349 $currentSlide.removeClass("lg-first-slide"); 12350 _this11.outer.removeClass("lg-first-slide-loading"); 12351 _this11.isDummyImageRemoved = true; 12352 _this11.preload(index); 12353 }, speed + 300); 12354 } 12355 }, { 12356 key: "getItemsToBeInsertedToDom", 12357 value: function getItemsToBeInsertedToDom(index, prevIndex) { 12358 var _this12 = this; 12359 var numberOfItems = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; 12360 var itemsToBeInsertedToDom = []; 12361 var possibleNumberOfItems = Math.max(numberOfItems, 3); 12362 possibleNumberOfItems = Math.min(possibleNumberOfItems, this.galleryItems.length); 12363 var prevIndexItem = "lg-item-".concat(this.lgId, "-").concat(prevIndex); 12364 if (this.galleryItems.length <= 3) { 12365 this.galleryItems.forEach(function(_element, index2) { 12366 itemsToBeInsertedToDom.push("lg-item-".concat(_this12.lgId, "-").concat(index2)); 12367 }); 12368 return itemsToBeInsertedToDom; 12369 } 12370 if (index < (this.galleryItems.length - 1) / 2) { 12371 for (var idx = index; idx > index - possibleNumberOfItems / 2 && idx >= 0; idx--) { 12372 itemsToBeInsertedToDom.push("lg-item-".concat(this.lgId, "-").concat(idx)); 12373 } 12374 var numberOfExistingItems = itemsToBeInsertedToDom.length; 12375 for (var _idx = 0; _idx < possibleNumberOfItems - numberOfExistingItems; _idx++) { 12376 itemsToBeInsertedToDom.push("lg-item-".concat(this.lgId, "-").concat(index + _idx + 1)); 12377 } 12378 } else { 12379 for (var _idx2 = index; _idx2 <= this.galleryItems.length - 1 && _idx2 < index + possibleNumberOfItems / 2; _idx2++) { 12380 itemsToBeInsertedToDom.push("lg-item-".concat(this.lgId, "-").concat(_idx2)); 12381 } 12382 var _numberOfExistingItems = itemsToBeInsertedToDom.length; 12383 for (var _idx3 = 0; _idx3 < possibleNumberOfItems - _numberOfExistingItems; _idx3++) { 12384 itemsToBeInsertedToDom.push("lg-item-".concat(this.lgId, "-").concat(index - _idx3 - 1)); 12385 } 12386 } 12387 if (this.settings.loop) { 12388 if (index === this.galleryItems.length - 1) { 12389 itemsToBeInsertedToDom.push("lg-item-".concat(this.lgId, "-", 0)); 12390 } else if (index === 0) {
12391 itemsToBeInsertedToDom.push("lg-item-".concat(this.lgId, "-").concat(this.galleryItems.length - 1)); 12392 } 12393 } 12394 if (itemsToBeInsertedToDom.indexOf(prevIndexItem) === -1) { 12395 itemsToBeInsertedToDom.push("lg-item-".concat(this.lgId, "-").concat(prevIndex)); 12396 } 12397 return itemsToBeInsertedToDom; 12398 } 12399 }, { 12400 key: "organizeSlideItems", 12401 value: function organizeSlideItems(index, prevIndex) { 12402 var _this13 = this; 12403 var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom); 12404 itemsToBeInsertedToDom.forEach(function(item) { 12405 if (_this13.currentItemsInDom.indexOf(item) === -1) { 12406 _this13.$inner.append('<div id="'.concat(item, '" class="lg-item"></div>')); 12407 } 12408 }); 12409 this.currentItemsInDom.forEach(function(item) { 12410 if (itemsToBeInsertedToDom.indexOf(item) === -1) { 12411 $LG("#".concat(item)).remove(); 12412 } 12413 }); 12414 return itemsToBeInsertedToDom; 12415 } 12416 /** 12417 * Get previous index of the slide 12418 */ 12419 }, { 12420 key: "getPreviousSlideIndex", 12421 value: function getPreviousSlideIndex() { 12422 var prevIndex = 0; 12423 try { 12424 var currentItemId = this.outer.find(".lg-current").first().attr("id"); 12425 prevIndex = parseInt(currentItemId.split("-")[3]) || 0; 12426 } catch (error) { 12427 prevIndex = 0; 12428 } 12429 return prevIndex; 12430 } 12431 }, { 12432 key: "setDownloadValue", 12433 value: function setDownloadValue(index) { 12434 if (this.settings.download) { 12435 var currentGalleryItem = this.galleryItems[index]; 12436 var hideDownloadBtn = currentGalleryItem.downloadUrl === false || currentGalleryItem.downloadUrl === "false"; 12437 if (hideDownloadBtn) { 12438 this.outer.addClass("lg-hide-download"); 12439 } else { 12440 var $download = this.getElementById("lg-download"); 12441 this.outer.removeClass("lg-hide-download"); 12442 $download.attr("href", currentGalleryItem.downloadUrl || currentGalleryItem.src); 12443 if (currentGalleryItem.download) { 12444 $download.attr("download", currentGalleryItem.download); 12445 } 12446 } 12447 } 12448 } 12449 }, { 12450 key: "makeSlideAnimation", 12451 value: function makeSlideAnimation(direction, currentSlideItem, previousSlideItem) { 12452 var _this14 = this; 12453 if (this.lGalleryOn) { 12454 previousSlideItem.addClass("lg-slide-progress"); 12455 } 12456 setTimeout(function() { 12457 _this14.outer.addClass("lg-no-trans"); 12458 _this14.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"); 12459 if (direction === "prev") { 12460 currentSlideItem.addClass("lg-prev-slide"); 12461 previousSlideItem.addClass("lg-next-slide"); 12462 } else { 12463 currentSlideItem.addClass("lg-next-slide"); 12464 previousSlideItem.addClass("lg-prev-slide"); 12465 } 12466 setTimeout(function() { 12467 _this14.outer.find(".lg-item").removeClass("lg-current"); 12468 currentSlideItem.addClass("lg-current"); 12469 _this14.outer.removeClass("lg-no-trans"); 12470 }, 50); 12471 }, this.lGalleryOn ? this.settings.slideDelay : 0); 12472 } 12473 /** 12474 * Goto a specific slide. 12475 * @param {Number} index - index of the slide 12476 * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag 12477 * @param {Boolean} fromThumb - true if slide function called via thumbnail click 12478 * @param {String} direction - Direction of the slide(next/prev) 12479 * @category lGPublicMethods 12480 * @example 12481 * const plugin = lightGallery(); 12482 * // to go to 3rd slide 12483 * plugin.slide(2); 12484 * 12485 */ 12486 }, { 12487 key: "slide", 12488 value: function slide(index, fromTouch, fromThumb, direction) { 12489 var _this15 = this; 12490 var prevIndex = this.getPreviousSlideIndex(); 12491 this.currentItemsInDom = this.organizeSlideItems(index, prevIndex); 12492 if (this.lGalleryOn && prevIndex === index) { 12493 return; 12494 } 12495 var numberOfGalleryItems = this.galleryItems.length; 12496 if (!this.lgBusy) { 12497 if (this.settings.counter) { 12498 this.updateCurrentCounter(index); 12499 }
vendor: 2,495 bytes, lines 12500-12547
12500 var currentSlideItem = this.getSlideItem(index); 12501 var previousSlideItem = this.getSlideItem(prevIndex); 12502 var currentGalleryItem = this.galleryItems[index]; 12503 var videoInfo = currentGalleryItem.__slideVideoInfo; 12504 this.outer.attr("data-lg-slide-type", this.getSlideType(currentGalleryItem)); 12505 this.setDownloadValue(index); 12506 if (videoInfo) { 12507 var _this$mediaContainerP4 = this.mediaContainerPosition, top = _this$mediaContainerP4.top, bottom = _this$mediaContainerP4.bottom; 12508 var videoSize = lg_utils.getSize(this.items[index], this.outer, top + bottom, videoInfo && this.settings.videoMaxSize); 12509 this.resizeVideoSlide(index, videoSize); 12510 } 12511 this.LGel.trigger(lGEvents.beforeSlide, { 12512 prevIndex, 12513 index, 12514 fromTouch: !!fromTouch, 12515 fromThumb: !!fromThumb 12516 }); 12517 this.lgBusy = true; 12518 clearTimeout(this.hideBarTimeout); 12519 this.arrowDisable(index); 12520 if (!direction) { 12521 if (index < prevIndex) { 12522 direction = "prev"; 12523 } else if (index > prevIndex) { 12524 direction = "next"; 12525 } 12526 } 12527 if (!fromTouch) { 12528 this.makeSlideAnimation(direction, currentSlideItem, previousSlideItem); 12529 } else { 12530 this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide"); 12531 var touchPrev; 12532 var touchNext; 12533 if (numberOfGalleryItems > 2) { 12534 touchPrev = index - 1; 12535 touchNext = index + 1; 12536 if (index === 0 && prevIndex === numberOfGalleryItems - 1) { 12537 touchNext = 0; 12538 touchPrev = numberOfGalleryItems - 1; 12539 } else if (index === numberOfGalleryItems - 1 && prevIndex === 0) { 12540 touchNext = 0; 12541 touchPrev = numberOfGalleryItems - 1; 12542 } 12543 } else { 12544 touchPrev = 0; 12545 touchNext = 1; 12546 } 12547 if (direction === "prev") {
12548 this.getSlideItem(touchNext).addClass("lg-next-slide"); 12549 } else { 12550 this.getSlideItem(touchPrev).addClass("lg-prev-slide"); 12551 } 12552 currentSlideItem.addClass("lg-current"); 12553 } 12554 if (!this.lGalleryOn) { 12555 this.loadContent(index, true); 12556 } else { 12557 setTimeout(function() { 12558 _this15.loadContent(index, true); 12559 if (_this15.settings.appendSubHtmlTo !== ".lg-item") { 12560 _this15.addHtml(index); 12561 } 12562 }, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay)); 12563 } 12564 setTimeout(function() { 12565 _this15.lgBusy = false; 12566 previousSlideItem.removeClass("lg-slide-progress"); 12567 _this15.LGel.trigger(lGEvents.afterSlide, { 12568 prevIndex, 12569 index, 12570 fromTouch, 12571 fromThumb 12572 }); 12573 }, (this.lGalleryOn ? this.settings.speed + 100 : 100) + (fromTouch ? 0 : this.settings.slideDelay)); 12574 } 12575 this.index = index; 12576 } 12577 }, { 12578 key: "updateCurrentCounter", 12579 value: function updateCurrentCounter(index) { 12580 this.getElementById("lg-counter-current").html(index + 1 + ""); 12581 } 12582 }, { 12583 key: "updateCounterTotal", 12584 value: function updateCounterTotal() { 12585 this.getElementById("lg-counter-all").html(this.galleryItems.length + ""); 12586 } 12587 }, { 12588 key: "getSlideType", 12589 value: function getSlideType(item) { 12590 if (item.__slideVideoInfo) { 12591 return "video"; 12592 } else if (item.iframe) { 12593 return "iframe"; 12594 } else { 12595 return "image"; 12596 } 12597 } 12598 }, { 12599 key: "touchMove", 12600 value: function touchMove(startCoords, endCoords, e) {
vendor: 3,955 bytes, lines 12601-12673
12601 var distanceX = endCoords.pageX - startCoords.pageX; 12602 var distanceY = endCoords.pageY - startCoords.pageY; 12603 var allowSwipe = false; 12604 if (this.swipeDirection) { 12605 allowSwipe = true; 12606 } else { 12607 if (Math.abs(distanceX) > 15) { 12608 this.swipeDirection = "horizontal"; 12609 allowSwipe = true; 12610 } else if (Math.abs(distanceY) > 15) { 12611 this.swipeDirection = "vertical"; 12612 allowSwipe = true; 12613 } 12614 } 12615 if (!allowSwipe) { 12616 return; 12617 } 12618 var $currentSlide = this.getSlideItem(this.index); 12619 if (this.swipeDirection === "horizontal") { 12620 e === null || e === void 0 ? void 0 : e.preventDefault(); 12621 this.outer.addClass("lg-dragging"); 12622 this.setTranslate($currentSlide, distanceX, 0); 12623 var width = $currentSlide.get().offsetWidth; 12624 var slideWidthAmount = width * 15 / 100; 12625 var gutter = slideWidthAmount - Math.abs(distanceX * 10 / 100); 12626 this.setTranslate(this.outer.find(".lg-prev-slide").first(), -width + distanceX - gutter, 0); 12627 this.setTranslate(this.outer.find(".lg-next-slide").first(), width + distanceX + gutter, 0); 12628 } else if (this.swipeDirection === "vertical") { 12629 if (this.settings.swipeToClose) { 12630 e === null || e === void 0 ? void 0 : e.preventDefault(); 12631 this.$container.addClass("lg-dragging-vertical"); 12632 var opacity = 1 - Math.abs(distanceY) / window.innerHeight; 12633 this.$backdrop.css("opacity", opacity); 12634 var scale = 1 - Math.abs(distanceY) / (window.innerWidth * 2); 12635 this.setTranslate($currentSlide, 0, distanceY, scale, scale); 12636 if (Math.abs(distanceY) > 100) { 12637 this.outer.addClass("lg-hide-items").removeClass("lg-components-open"); 12638 } 12639 } 12640 } 12641 } 12642 }, { 12643 key: "touchEnd", 12644 value: function touchEnd(endCoords, startCoords, event) { 12645 var _this16 = this; 12646 var distance; 12647 if (this.settings.mode !== "lg-slide") { 12648 this.outer.addClass("lg-slide"); 12649 } 12650 setTimeout(function() { 12651 _this16.$container.removeClass("lg-dragging-vertical"); 12652 _this16.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open"); 12653 var triggerClick = true; 12654 if (_this16.swipeDirection === "horizontal") { 12655 distance = endCoords.pageX - startCoords.pageX; 12656 var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX); 12657 if (distance < 0 && distanceAbs > _this16.settings.swipeThreshold) { 12658 _this16.goToNextSlide(true); 12659 triggerClick = false; 12660 } else if (distance > 0 && distanceAbs > _this16.settings.swipeThreshold) { 12661 _this16.goToPrevSlide(true); 12662 triggerClick = false; 12663 } 12664 } else if (_this16.swipeDirection === "vertical") { 12665 distance = Math.abs(endCoords.pageY - startCoords.pageY); 12666 if (_this16.settings.closable && _this16.settings.swipeToClose && distance > 100) { 12667 _this16.closeGallery(); 12668 return; 12669 } else { 12670 _this16.$backdrop.css("opacity", 1); 12671 } 12672 } 12673 _this16.outer.find(".lg-item").removeAttr("style");
12674 if (triggerClick && Math.abs(endCoords.pageX - startCoords.pageX) < 5) { 12675 var target = $LG(event.target); 12676 if (_this16.isPosterElement(target)) { 12677 _this16.LGel.trigger(lGEvents.posterClick); 12678 } 12679 } 12680 _this16.swipeDirection = void 0; 12681 }); 12682 setTimeout(function() { 12683 if (!_this16.outer.hasClass("lg-dragging") && _this16.settings.mode !== "lg-slide") { 12684 _this16.outer.removeClass("lg-slide"); 12685 } 12686 }, this.settings.speed + 100); 12687 } 12688 }, { 12689 key: "enableSwipe", 12690 value: function enableSwipe() { 12691 var _this17 = this; 12692 var startCoords = {}; 12693 var endCoords = {}; 12694 var isMoved = false; 12695 var isSwiping = false; 12696 if (this.settings.enableSwipe) { 12697 this.$inner.on("touchstart.lg", function(e) { 12698 _this17.dragOrSwipeEnabled = true; 12699 var $item = _this17.getSlideItem(_this17.index); 12700 if (($LG(e.target).hasClass("lg-item") || $item.get().contains(e.target)) && !_this17.outer.hasClass("lg-zoomed") && !_this17.lgBusy && e.touches.length === 1) { 12701 isSwiping = true; 12702 _this17.touchAction = "swipe"; 12703 _this17.manageSwipeClass(); 12704 startCoords = { 12705 pageX: e.touches[0].pageX, 12706 pageY: e.touches[0].pageY 12707 }; 12708 } 12709 }); 12710 this.$inner.on("touchmove.lg", function(e) { 12711 if (isSwiping && _this17.touchAction === "swipe" && e.touches.length === 1) { 12712 endCoords = { 12713 pageX: e.touches[0].pageX, 12714 pageY: e.touches[0].pageY 12715 }; 12716 _this17.touchMove(startCoords, endCoords, e); 12717 isMoved = true; 12718 } 12719 }); 12720 this.$inner.on("touchend.lg", function(event) { 12721 if (_this17.touchAction === "swipe") { 12722 if (isMoved) { 12723 isMoved = false; 12724 _this17.touchEnd(endCoords, startCoords, event); 12725 } else if (isSwiping) { 12726 var target = $LG(event.target); 12727 if (_this17.isPosterElement(target)) { 12728 _this17.LGel.trigger(lGEvents.posterClick); 12729 } 12730 } 12731 _this17.touchAction = void 0; 12732 isSwiping = false; 12733 } 12734 }); 12735 } 12736 } 12737 }, { 12738 key: "enableDrag", 12739 value: function enableDrag() { 12740 var _this18 = this; 12741 var startCoords = {}; 12742 var endCoords = {}; 12743 var isDraging = false; 12744 var isMoved = false; 12745 if (this.settings.enableDrag) { 12746 this.outer.on("mousedown.lg", function(e) { 12747 _this18.dragOrSwipeEnabled = true; 12748 var $item = _this18.getSlideItem(_this18.index); 12749 if ($LG(e.target).hasClass("lg-item") || $item.get().contains(e.target)) { 12750 if (!_this18.outer.hasClass("lg-zoomed") && !_this18.lgBusy) { 12751 e.preventDefault(); 12752 if (!_this18.lgBusy) { 12753 _this18.manageSwipeClass(); 12754 startCoords = { 12755 pageX: e.pageX, 12756 pageY: e.pageY 12757 }; 12758 isDraging = true; 12759 _this18.outer.get().scrollLeft += 1; 12760 _this18.outer.get().scrollLeft -= 1; 12761 _this18.outer.removeClass("lg-grab").addClass("lg-grabbing"); 12762 _this18.LGel.trigger(lGEvents.dragStart); 12763 } 12764 } 12765 } 12766 }); 12767 $LG(window).on("mousemove.lg.global".concat(this.lgId), function(e) { 12768 if (isDraging && _this18.lgOpened) { 12769 isMoved = true; 12770 endCoords = { 12771 pageX: e.pageX, 12772 pageY: e.pageY 12773 }; 12774 _this18.touchMove(startCoords, endCoords); 12775 _this18.LGel.trigger(lGEvents.dragMove); 12776 } 12777 }); 12778 $LG(window).on("mouseup.lg.global".concat(this.lgId), function(event) { 12779 if (!_this18.lgOpened) { 12780 return; 12781 } 12782 var target = $LG(event.target); 12783 if (isMoved) { 12784 isMoved = false;
vendor: 1,615 bytes, lines 12785-12820
12785 _this18.touchEnd(endCoords, startCoords, event); 12786 _this18.LGel.trigger(lGEvents.dragEnd); 12787 } else if (_this18.isPosterElement(target)) { 12788 _this18.LGel.trigger(lGEvents.posterClick); 12789 } 12790 if (isDraging) { 12791 isDraging = false; 12792 _this18.outer.removeClass("lg-grabbing").addClass("lg-grab"); 12793 } 12794 }); 12795 } 12796 } 12797 }, { 12798 key: "triggerPosterClick", 12799 value: function triggerPosterClick() { 12800 var _this19 = this; 12801 this.$inner.on("click.lg", function(event) { 12802 if (!_this19.dragOrSwipeEnabled && _this19.isPosterElement($LG(event.target))) { 12803 _this19.LGel.trigger(lGEvents.posterClick); 12804 } 12805 }); 12806 } 12807 }, { 12808 key: "manageSwipeClass", 12809 value: function manageSwipeClass() { 12810 var _touchNext = this.index + 1; 12811 var _touchPrev = this.index - 1; 12812 if (this.settings.loop && this.galleryItems.length > 2) { 12813 if (this.index === 0) { 12814 _touchPrev = this.galleryItems.length - 1; 12815 } else if (this.index === this.galleryItems.length - 1) { 12816 _touchNext = 0; 12817 } 12818 } 12819 this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"); 12820 if (_touchPrev > -1) {
12821 this.getSlideItem(_touchPrev).addClass("lg-prev-slide"); 12822 } 12823 this.getSlideItem(_touchNext).addClass("lg-next-slide"); 12824 } 12825 /** 12826 * Go to next slide 12827 * @param {Boolean} fromTouch - true if slide function called via touch event 12828 * @category lGPublicMethods 12829 * @example 12830 * const plugin = lightGallery(); 12831 * plugin.goToNextSlide(); 12832 * @see <a href="/demos/methods/">Demo</a> 12833 */ 12834 }, { 12835 key: "goToNextSlide", 12836 value: function goToNextSlide(fromTouch) { 12837 var _this20 = this; 12838 var _loop = this.settings.loop; 12839 if (fromTouch && this.galleryItems.length < 3) { 12840 _loop = false; 12841 } 12842 if (!this.lgBusy) { 12843 if (this.index + 1 < this.galleryItems.length) { 12844 this.index++; 12845 this.LGel.trigger(lGEvents.beforeNextSlide, { 12846 index: this.index 12847 }); 12848 this.slide(this.index, !!fromTouch, false, "next"); 12849 } else { 12850 if (_loop) { 12851 this.index = 0; 12852 this.LGel.trigger(lGEvents.beforeNextSlide, { 12853 index: this.index 12854 }); 12855 this.slide(this.index, !!fromTouch, false, "next"); 12856 } else if (this.settings.slideEndAnimation && !fromTouch) { 12857 this.outer.addClass("lg-right-end"); 12858 setTimeout(function() { 12859 _this20.outer.removeClass("lg-right-end"); 12860 }, 400); 12861 } 12862 } 12863 } 12864 } 12865 /** 12866 * Go to previous slides 12867 * @param {Boolean} fromTouch - true if slide function called via touch event 12868 * @category lGPublicMethods 12869 * @example 12870 * const plugin = lightGallery({}); 12871 * plugin.goToPrevSlide(); 12872 * @see <a href="/demos/methods/">Demo</a> 12873 * 12874 */ 12875 }, { 12876 key: "goToPrevSlide", 12877 value: function goToPrevSlide(fromTouch) { 12878 var _this21 = this; 12879 var _loop = this.settings.loop; 12880 if (fromTouch && this.galleryItems.length < 3) { 12881 _loop = false; 12882 } 12883 if (!this.lgBusy) { 12884 if (this.index > 0) { 12885 this.index--; 12886 this.LGel.trigger(lGEvents.beforePrevSlide, { 12887 index: this.index, 12888 fromTouch 12889 }); 12890 this.slide(this.index, !!fromTouch, false, "prev"); 12891 } else { 12892 if (_loop) { 12893 this.index = this.galleryItems.length - 1; 12894 this.LGel.trigger(lGEvents.beforePrevSlide, { 12895 index: this.index, 12896 fromTouch 12897 }); 12898 this.slide(this.index, !!fromTouch, false, "prev"); 12899 } else if (this.settings.slideEndAnimation && !fromTouch) { 12900 this.outer.addClass("lg-left-end"); 12901 setTimeout(function() { 12902 _this21.outer.removeClass("lg-left-end"); 12903 }, 400); 12904 } 12905 } 12906 } 12907 } 12908 }, { 12909 key: "keyPress", 12910 value: function keyPress() { 12911 var _this22 = this; 12912 $LG(window).on("keydown.lg.global".concat(this.lgId), function(e) { 12913 if (_this22.lgOpened && _this22.settings.escKey === true && e.keyCode === 27) { 12914 e.preventDefault(); 12915 if (_this22.settings.allowMediaOverlap && _this22.outer.hasClass("lg-can-toggle") && _this22.outer.hasClass("lg-components-open")) { 12916 _this22.outer.removeClass("lg-components-open"); 12917 } else { 12918 _this22.closeGallery(); 12919 } 12920 } 12921 if (_this22.lgOpened && _this22.galleryItems.length > 1) { 12922 if (e.keyCode === 37) { 12923 e.preventDefault(); 12924 _this22.goToPrevSlide(); 12925 } 12926 if (e.keyCode === 39) { 12927 e.preventDefault(); 12928 _this22.goToNextSlide(); 12929 } 12930 } 12931 }); 12932 } 12933 }, { 12934 key: "arrow", 12935 value: function arrow() { 12936 var _this23 = this; 12937 this.getElementById("lg-prev").on("click.lg", function() { 12938 _this23.goToPrevSlide(); 12939 }); 12940 this.getElementById("lg-next").on("click.lg", function() { 12941 _this23.goToNextSlide(); 12942 }); 12943 } 12944 }, { 12945 key: "arrowDisable", 12946 value: function arrowDisable(index) { 12947 if (!this.settings.loop && this.settings.hideControlOnEnd) { 12948 var $prev = this.getElementById("lg-prev"); 12949 var $next = this.getElementById("lg-next"); 12950 if (index + 1 === this.galleryItems.length) { 12951 $next.attr("disabled", "disabled").addClass("disabled"); 12952 } else { 12953 $next.removeAttr("disabled").removeClass("disabled"); 12954 } 12955 if (index === 0) { 12956 $prev.attr("disabled", "disabled").addClass("disabled"); 12957 } else { 12958 $prev.removeAttr("disabled").removeClass("disabled"); 12959 } 12960 } 12961 } 12962 }, { 12963 key: "setTranslate", 12964 value: function setTranslate($el, xValue, yValue) { 12965 var scaleX = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1; 12966 var scaleY = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1; 12967 $el.css("transform", "translate3d(" + xValue + "px, " + yValue + "px, 0px) scale3d(" + scaleX + ", " + scaleY + ", 1)"); 12968 } 12969 }, { 12970 key: "mousewheel", 12971 value: function mousewheel() { 12972 var _this24 = this; 12973 var lastCall = 0; 12974 this.outer.on("wheel.lg", function(e) { 12975 if (!e.deltaY || _this24.galleryItems.length < 2) { 12976 return; 12977 } 12978 e.preventDefault(); 12979 var now = (/* @__PURE__ */ new Date()).getTime(); 12980 if (now - lastCall < 1e3) { 12981 return; 12982 }
12983 lastCall = now; 12984 if (e.deltaY > 0) { 12985 _this24.goToNextSlide(); 12986 } else if (e.deltaY < 0) { 12987 _this24.goToPrevSlide(); 12988 } 12989 }); 12990 } 12991 }, { 12992 key: "isSlideElement", 12993 value: function isSlideElement(target) { 12994 return target.hasClass("lg-outer") || target.hasClass("lg-item") || target.hasClass("lg-img-wrap") || target.hasClass("lg-img-rotate"); 12995 } 12996 }, { 12997 key: "isPosterElement", 12998 value: function isPosterElement(target) { 12999 var playButton = this.getSlideItem(this.index).find(".lg-video-play-button").get(); 13000 return target.hasClass("lg-video-poster") || target.hasClass("lg-video-play-button") || playButton && playButton.contains(target.get()); 13001 } 13002 /** 13003 * Maximize minimize inline gallery. 13004 * @category lGPublicMethods 13005 */ 13006 }, { 13007 key: "toggleMaximize", 13008 value: function toggleMaximize() { 13009 var _this25 = this; 13010 this.getElementById("lg-maximize").on("click.lg", function() { 13011 _this25.$container.toggleClass("lg-inline"); 13012 _this25.refreshOnResize(); 13013 }); 13014 } 13015 }, { 13016 key: "invalidateItems",
13017 value: function invalidateItems() { 13018 for (var index = 0; index < this.items.length; index++) { 13019 var element = this.items[index]; 13020 var $element = $LG(element); 13021 $element.off("click.lgcustom-item-".concat($element.attr("data-lg-id"))); 13022 } 13023 } 13024 }, { 13025 key: "trapFocus", 13026 value: function trapFocus() { 13027 var _this26 = this; 13028 this.$container.get().focus({ 13029 preventScroll: true 13030 }); 13031 $LG(window).on("keydown.lg.global".concat(this.lgId), function(e) { 13032 if (!_this26.lgOpened) { 13033 return; 13034 } 13035 var isTabPressed = e.key === "Tab" || e.keyCode === 9; 13036 if (!isTabPressed) { 13037 return; 13038 } 13039 var focusableEls = lg_utils.getFocusableElements(_this26.$container.get()); 13040 var firstFocusableEl = focusableEls[0]; 13041 var lastFocusableEl = focusableEls[focusableEls.length - 1]; 13042 if (e.shiftKey) { 13043 if (document.activeElement === firstFocusableEl) {
vendor: 3,538 bytes, lines 13044-13117
13044 lastFocusableEl.focus(); 13045 e.preventDefault(); 13046 } 13047 } else { 13048 if (document.activeElement === lastFocusableEl) { 13049 firstFocusableEl.focus(); 13050 e.preventDefault(); 13051 } 13052 } 13053 }); 13054 } 13055 }, { 13056 key: "manageCloseGallery", 13057 value: function manageCloseGallery() { 13058 var _this27 = this; 13059 if (!this.settings.closable) return; 13060 var mousedown = false; 13061 this.getElementById("lg-close").on("click.lg", function() { 13062 _this27.closeGallery(); 13063 }); 13064 if (this.settings.closeOnTap) { 13065 this.outer.on("mousedown.lg", function(e) { 13066 var target = $LG(e.target); 13067 if (_this27.isSlideElement(target)) { 13068 mousedown = true; 13069 } else { 13070 mousedown = false; 13071 } 13072 }); 13073 this.outer.on("mousemove.lg", function() { 13074 mousedown = false; 13075 }); 13076 this.outer.on("mouseup.lg", function(e) { 13077 var target = $LG(e.target); 13078 if (_this27.isSlideElement(target) && mousedown) { 13079 if (!_this27.outer.hasClass("lg-dragging")) { 13080 _this27.closeGallery(); 13081 } 13082 } 13083 }); 13084 } 13085 } 13086 /** 13087 * Close lightGallery if it is opened. 13088 * 13089 * @description If closable is false in the settings, you need to pass true via closeGallery method to force close gallery 13090 * @return returns the estimated time to close gallery completely including the close animation duration 13091 * @category lGPublicMethods 13092 * @example 13093 * const plugin = lightGallery(); 13094 * plugin.closeGallery(); 13095 * 13096 */ 13097 }, { 13098 key: "closeGallery", 13099 value: function closeGallery(force) { 13100 var _this28 = this; 13101 if (!this.lgOpened || !this.settings.closable && !force) { 13102 return 0; 13103 } 13104 this.LGel.trigger(lGEvents.beforeClose); 13105 if (this.settings.resetScrollPosition && !this.settings.hideScrollbar) { 13106 $LG(window).scrollTop(this.prevScrollTop); 13107 } 13108 var currentItem = this.items[this.index]; 13109 var transform2; 13110 if (this.zoomFromOrigin && currentItem) { 13111 var _this$mediaContainerP5 = this.mediaContainerPosition, top = _this$mediaContainerP5.top, bottom = _this$mediaContainerP5.bottom; 13112 var _this$galleryItems$th = this.galleryItems[this.index], __slideVideoInfo = _this$galleryItems$th.__slideVideoInfo, poster = _this$galleryItems$th.poster; 13113 var imageSize = lg_utils.getSize(currentItem, this.outer, top + bottom, __slideVideoInfo && poster && this.settings.videoMaxSize); 13114 transform2 = lg_utils.getTransform(currentItem, this.outer, top, bottom, imageSize); 13115 } 13116 if (this.zoomFromOrigin && transform2) { 13117 this.outer.addClass("lg-closing lg-zoom-from-image");
13118 this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration", this.settings.startAnimationDuration + "ms").css("transform", transform2); 13119 } else { 13120 this.outer.addClass("lg-hide-items"); 13121 this.outer.removeClass("lg-zoom-from-image"); 13122 } 13123 this.destroyModules(); 13124 this.lGalleryOn = false; 13125 this.isDummyImageRemoved = false; 13126 this.zoomFromOrigin = this.settings.zoomFromOrigin; 13127 clearTimeout(this.hideBarTimeout); 13128 this.hideBarTimeout = false; 13129 $LG("html").removeClass("lg-on"); 13130 this.outer.removeClass("lg-visible lg-components-open"); 13131 this.$backdrop.removeClass("in").css("opacity", 0); 13132 var removeTimeout = this.zoomFromOrigin && transform2 ? Math.max(this.settings.startAnimationDuration, this.settings.backdropDuration) : this.settings.backdropDuration; 13133 this.$container.removeClass("lg-show-in"); 13134 setTimeout(function() { 13135 if (_this28.zoomFromOrigin && transform2) { 13136 _this28.outer.removeClass("lg-zoom-from-image"); 13137 } 13138 _this28.$container.removeClass("lg-show"); 13139 _this28.resetScrollBar(); 13140 _this28.$backdrop.removeAttr("style").css("transition-duration", _this28.settings.backdropDuration + "ms"); 13141 _this28.outer.removeClass("lg-closing ".concat(_this28.settings.startClass)); 13142 _this28.getSlideItem(_this28.index).removeClass("lg-start-end-progress"); 13143 _this28.$inner.empty(); 13144 if (_this28.lgOpened) { 13145 _this28.LGel.trigger(lGEvents.afterClose, { 13146 instance: _this28 13147 }); 13148 } 13149 if (_this28.$container.get()) { 13150 _this28.$container.get().blur(); 13151 } 13152 _this28.lgOpened = false; 13153 }, removeTimeout + 100); 13154 return removeTimeout + 100; 13155 } 13156 }, { 13157 key: "initModules", 13158 value: function initModules() { 13159 this.plugins.forEach(function(module3) { 13160 try { 13161 module3.init(); 13162 } catch (err) { 13163 console.warn("lightGallery:- make sure lightGallery module is properly initiated"); 13164 } 13165 }); 13166 } 13167 }, { 13168 key: "destroyModules", 13169 value: function destroyModules(destroy) { 13170 this.plugins.forEach(function(module3) { 13171 try { 13172 if (destroy) { 13173 module3.destroy(); 13174 } else { 13175 module3.closeGallery && module3.closeGallery(); 13176 } 13177 } catch (err) { 13178 console.warn("lightGallery:- make sure lightGallery module is properly destroyed"); 13179 } 13180 }); 13181 } 13182 /** 13183 * Refresh lightGallery with new set of children. 13184 * 13185 * @description This is useful to update the gallery when the child elements are changed without calling destroy method. 13186 * 13187 * If you are using dynamic mode, you can pass the modified array of dynamicEl as the first parameter to refresh the dynamic gallery 13188 * @see <a href="/demos/dynamic-mode/">Demo</a> 13189 * @category lGPublicMethods 13190 * @example 13191 * const plugin = lightGallery(); 13192 * // Delete or add children, then call 13193 * plugin.refresh(); 13194 * 13195 */ 13196 }, { 13197 key: "refresh", 13198 value: function refresh(galleryItems) { 13199 if (!this.settings.dynamic) { 13200 this.invalidateItems(); 13201 } 13202 if (galleryItems) { 13203 this.galleryItems = galleryItems; 13204 } else { 13205 this.galleryItems = this.getItems(); 13206 } 13207 this.updateControls(); 13208 this.openGalleryOnItemClick(); 13209 this.LGel.trigger(lGEvents.updateSlides); 13210 } 13211 }, { 13212 key: "updateControls", 13213 value: function updateControls() { 13214 this.addSlideVideoInfo(this.galleryItems); 13215 this.updateCounterTotal(); 13216 this.manageSingleSlideClassName(); 13217 } 13218 }, {
13219 key: "destroyGallery", 13220 value: function destroyGallery() { 13221 this.destroyModules(true); 13222 if (!this.settings.dynamic) { 13223 this.invalidateItems(); 13224 } 13225 $LG(window).off(".lg.global".concat(this.lgId)); 13226 this.LGel.off(".lg"); 13227 this.$container.remove(); 13228 } 13229 /** 13230 * Destroy lightGallery. 13231 * Destroy lightGallery and its plugin instances completely 13232 * 13233 * @description This method also calls CloseGallery function internally. Returns the time takes to completely close and destroy the instance. 13234 * In case if you want to re-initialize lightGallery right after destroying it, initialize it only once the destroy process is completed. 13235 * You can use refresh method most of the times. 13236 * @category lGPublicMethods 13237 * @example 13238 * const plugin = lightGallery(); 13239 * plugin.destroy(); 13240 * 13241 */ 13242 }, { 13243 key: "destroy", 13244 value: function destroy() { 13245 var closeTimeout = this.closeGallery(true); 13246 if (closeTimeout) { 13247 setTimeout(this.destroyGallery.bind(this), closeTimeout); 13248 } else { 13249 this.destroyGallery(); 13250 } 13251 return closeTimeout; 13252 } 13253 }]); 13254 return LightGallery; 13255 })(); 13256 function lightGallery(el, options) { 13257 return new lightgallery_LightGallery(el, options); 13258 } 13259 var src_0 = lightGallery; 13260 var LightGalleryvue_type_script_lang_ts_Lightgallery = /* @__PURE__ */ (function(_Vue) { 13261 _inherits(Lightgallery2, _Vue); 13262 var _super = _createSuper(Lightgallery2); 13263 function Lightgallery2() { 13264 _classCallCheck(this, Lightgallery2); 13265 return _super.apply(this, arguments); 13266 } 13267 _createClass(Lightgallery2, [{ 13268 key: "mounted", 13269 value: function mounted() { 13270 this.registerEvents.call(this); 13271 this.LG = src_0(this.$refs.container, _objectSpread2({}, this.settings)); 13272 } 13273 }, { 13274 key: "unmounted", 13275 value: function unmounted() { 13276 this.LG.destroy(); 13277 } 13278 /* eslint-disable */ 13279 }, { 13280 key: "getMethodName", 13281 value: function getMethodName(word) { 13282 return "on".concat(word.charAt(0).toUpperCase() + word.slice(1)); 13283 } 13284 /* eslint-enable */ 13285 }, { 13286 key: "registerEvents", 13287 value: function registerEvents() { 13288 var _this = this; 13289 Object.keys(lGEvents).forEach(function(key) { 13290 _this.$refs.container.addEventListener(lGEvents[key].split(".")[0], function(event) { 13291 if (_this[_this.getMethodName(key)]) { 13292 _this[_this.getMethodName.call(_this, key)](event.detail); 13293 } 13294 }); 13295 }); 13296 } 13297 }]); 13298 return Lightgallery2; 13299 })(Vue); 13300 LightGalleryvue_type_script_lang_ts_Lightgallery = __decorate([Options({ 13301 props: { 13302 settings: { 13303 type: Object 13304 }, 13305 onAfterAppendSlide: { 13306 type: Function 13307 }, 13308 onInit: { 13309 type: Function 13310 }, 13311 onHasVideo: { 13312 type: Function 13313 }, 13314 onContainerResize: { 13315 type: Function 13316 }, 13317 onAfterAppendSubHtml: { 13318 type: Function 13319 }, 13320 onBeforeOpen: { 13321 type: Function 13322 }, 13323 onAfterOpen: { 13324 type: Function 13325 }, 13326 onSlideItemLoad: { 13327 type: Function 13328 }, 13329 onBeforeSlide: { 13330 type: Function 13331 }, 13332 onAfterSlide: { 13333 type: Function 13334 }, 13335 onPosterClick: { 13336 type: Function 13337 }, 13338 onDragStart: { 13339 type: Function 13340 }, 13341 onDragMove: { 13342 type: Function 13343 }, 13344 onDragEnd: { 13345 type: Function 13346 }, 13347 onBeforeNextSlide: { 13348 type: Function 13349 }, 13350 onBeforePrevSlide: { 13351 type: Function 13352 }, 13353 onBeforeClose: { 13354 type: Function 13355 }, 13356 onAfterClose: { 13357 type: Function 13358 }, 13359 onRotateLeft: { 13360 type: Function 13361 }, 13362 onRotateRight: { 13363 type: Function 13364 }, 13365 onFlipHorizontal: { 13366 type: Function 13367 }, 13368 onFlipVertical: { 13369 type: Function 13370 } 13371 } 13372 })], LightGalleryvue_type_script_lang_ts_Lightgallery); 13373 var LightGalleryvue_type_script_lang_ts = LightGalleryvue_type_script_lang_ts_Lightgallery; 13374 var exportHelper = __webpack_require__("6b0d"); 13375 var exportHelper_default = /* @__PURE__ */ __webpack_require__.n(exportHelper); 13376 const __exports__ = /* @__PURE__ */ exportHelper_default()(LightGalleryvue_type_script_lang_ts, [["render", render]]); 13377 var components_LightGallery = __exports__; 13378 __webpack_exports__["default"] = components_LightGallery; 13379 }) 13380 ), 13381 /***/ 13382 "fb6a": ( 13383 /***/ 13384 (function(module2, exports$1, __webpack_require__) { 13385 var $ = __webpack_require__("23e7"); 13386 var isObject2 = __webpack_require__("861d"); 13387 var isArray2 = __webpack_require__("e8b5"); 13388 var toAbsoluteIndex = __webpack_require__("23cb"); 13389 var toLength = __webpack_require__("50c4"); 13390 var toIndexedObject = __webpack_require__("fc6a"); 13391 var createProperty = __webpack_require__("8418"); 13392 var wellKnownSymbol = __webpack_require__("b622"); 13393 var arrayMethodHasSpeciesSupport = __webpack_require__("1
13393dde"); 13394 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport("slice"); 13395 var SPECIES = wellKnownSymbol("species"); 13396 var nativeSlice = [].slice; 13397 var max = Math.max; 13398 $({ target: "Array", proto: true, forced: !HAS_SPECIES_SUPPORT }, { 13399 slice: function slice(start, end) { 13400 var O = toIndexedObject(this); 13401 var length = toLength(O.length); 13402 var k = toAbsoluteIndex(start, length); 13403 var fin = toAbsoluteIndex(end === void 0 ? length : end, length); 13404 var Constructor, result, n; 13405 if (isArray2(O)) { 13406 Constructor = O.constructor; 13407 if (typeof Constructor == "function" && (Constructor === Array || isArray2(Constructor.prototype))) { 13408 Constructor = void 0; 13409 } else if (isObject2(Constructor)) { 13410 Constructor = Constructor[SPECIES]; 13411 if (Constructor === null) Constructor = void 0; 13412 } 13413 if (Constructor === Array || Constructor === void 0) { 13414 return nativeSlice.call(O, k, fin); 13415 } 13416 } 13417 result = new (Constructor === void 0 ? Array : Constructor)(max(fin - k, 0)); 13418 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); 13419 result.length = n; 13420 return result; 13421 } 13422 }); 13423 }) 13424 ), 13425 /***/ 13426 "fc6a": ( 13427 /***/ 13428 (function(module2, exports$1, __webpack_require__) { 13429 var IndexedObject = __webpack_require__("44ad"); 13430 var requireObjectCoercible = __webpack_require__("1d80"); 13431 module2.exports = function(it) { 13432 return IndexedObject(requireObjectCoercible(it)); 13433 }; 13434 }) 13435 ), 13436 /***/ 13437 "fdbc": ( 13438 /***/ 13439 (function(module2, exports$1) { 13440 module2.exports = { 13441 CSSRuleList: 0, 13442 CSSStyleDeclaration: 0, 13443 CSSValueList: 0, 13444 ClientRectList: 0, 13445 DOMRectList: 0, 13446 DOMStringList: 0, 13447 DOMTokenList: 1, 13448 DataTransferItemList: 0, 13449 FileList: 0, 13450 HTMLAllCollection: 0, 13451 HTMLCollection: 0, 13452 HTMLFormElement: 0, 13453 HTMLSelectElement: 0, 13454 MediaList: 0, 13455 MimeTypeArray: 0, 13456 NamedNodeMap: 0, 13457 NodeList: 1, 13458 PaintRequestList: 0, 13459 Plugin: 0, 13460 PluginArray: 0, 13461 SVGLengthList: 0, 13462 SVGNumberList: 0, 13463 SVGPathSegList: 0, 13464 SVGPointList: 0, 13465 SVGStringList: 0, 13466 SVGTransformList: 0, 13467 SourceBufferList: 0, 13468 StyleSheetList: 0, 13469 TextTrackCueList: 0, 13470 TextTrackList: 0, 13471 TouchList: 0 13472 }; 13473 }) 13474 ), 13475 /***/ 13476 "fdbf": ( 13477 /***/ 13478 (function(module2, exports$1, __webpack_require__) { 13479 var NATIVE_SYMBOL = __webpack_require__("4930"); 13480 module2.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol"; 13481 }) 13482 ), 13483 /***/ 13484 "fea9": ( 13485 /***/ 13486 (function(module2, exports$1, __webpack_require__) { 13487 var global = __webpack_require__("da84"); 13488 module2.exports = global.Promise; 13489 }) 13490 ) 13491 /******/ 13492 })["default"]; 13493 })(LightGalleryVue_common); 13494 return LightGalleryVue_common.exports; 13495} 13496var LightGalleryVue_commonExports = requireLightGalleryVue_common(); 13497const Lightgallery = /* @__PURE__ */ getDefaultExportFromCjs(LightGalleryVue_commonExports); 13498export { 13499 Lightgallery as L 13500};
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.