1/* 2GOAL: This module should mirror the NodeJS module system according the documented behavior. 3The module transport will send down code that registers module definitions by an assigned path. In addition, 4the module transport will send down code that registers additional metadata to allow the module resolver to 5resolve modules in the browser. Additional metadata includes the following: 6 7- "mains": The mapping of module directory paths to a fully resolved module path 8- "remaps": The remapping of one fully resolved module path to another fully resolved module path (used for browser overrides) 9- "run": A list of entry point modules that should be executed when ready 10 11Inspired by: 12https://github.com/joyent/node/blob/master/lib/module.js 13*/ 14(function() { 15 var win; 16 17 if (typeof window !== 'undefined') { 18 win = window; 19 20 // This lasso modules client has already been loaded on the page. Do nothing; 21 if (win.$_mod) { 22 return; 23 } 24 25 win.global = win; 26 } 27 28 /** the module runtime */ 29 var $_mod; 30 31 // this object stores the module factories with the keys being module paths and 32 // values being a factory function or object (e.g. "/baz$3.0.0/lib/index" --> Function) 33 var definitions = Object.create(null); 34 35 // Search path that will be checked when looking for modules 36 var searchPaths = []; 37 38 // The _ready flag is used to determine if "run" modules can 39 // be executed or if they should be deferred until all dependencies 40 // have been loaded 41 var _ready = false; 42 43 // If $_mod.run() is called when the page is not ready then 44 // we queue up the run modules to be executed later 45 var runQueue = []; 46 47 // this object stores the Module instance cache with the keys being paths of modules (e.g., "/foo$1.0.0/bar" --> Module) 48 var instanceCache = Object.create(null); 49 50 // This object maps installed dependencies to specific versions 51 // 52 // For example: 53 // { 54 // // The package "foo" with version 1.0.0 has an installed package named "bar" (foo/node_modules/bar") and 55 // // the version of "bar" is 3.0.0 56 // "/foo$1.0.0/bar": "3.0.0" 57 // } 58 var installed = Object.create(null); 59 60 // Maps builtin modules such as "path", "buffer" to their fully resolved paths 61 var builtins = Object.create(null); 62 63 // this object maps a directory to the fully resolved module path 64 // 65 // For example: 66 // 67 var mains = Object.create(null); 68 69 // used to remap a one fully resolved module path to another fully resolved module path 70 var remapped = Object.create(null); 71 72 function moduleNotFoundError(target, from) { 73 var err = new Error('Cannot find module "' + target + '"' + (from ? ' from "' + from + '"' : '')); 74 75 err.code = 'MODULE_NOT_FOUND'; 76 return err; 77 } 78 79 function Module(filename) { 80 /* 81 A Node module has these properties: 82 - filename: The path of the module 83 - id: The path of the module (same as filename) 84 - exports: The exports provided during load 85 - loaded: Has module been fully loaded (set to false until factory function returns) 86 87 NOT SUPPORTED: 88 - parent: parent Module 89 - paths: The search path used by this module (NOTE: not documented in Node.js module system so we don't need support) 90 - children: The modules that were required by this module 91 */ 92 this.id = this.filename = filename; 93 this.loaded = false; 94 this.exports = undefined; 95 } 96 97 Module.cache = instanceCache; 98 99 // temporary variable for referencing the Module prototype 100 var Module_prototype = Module.prototype; 101 102 Module_prototype.load = function(factoryOrObject) { 103 var filename = this.id; 104 105 if (typeof factoryOrObject === "function") { 106 // find the value for the __dirname parameter to factory 107 var dirname = filename.slice(0, filename.lastIndexOf('/')); 108 // this is the require used by the module 109 var instanceRequire = function(target) { 110 return require(target, dirname); 111 }; 112 113 // The require method should have a resolve method that will return the resolved 114 // path but not actually instantiate the module. 115 // This resolve function will make sure a definition exists for the corresponding 116 // path of the target but it will not instantiate a new instance of the target. 117 instanceRequire.resolve = function(target) { 118 if (!target) { 119 throw moduleNotFoundError(''); 120 } 121 122 var resolved = resolve(target, dirname); 123 124 if (resolved === undefined) { 125 throw moduleNotFoundError(target, dirname); 126 } 127 128 return resolved; 129 }; 130 131 // NodeJS provides access to the cache as a property of the "require" function 132 instanceRequire.cache = instanceCache; 133 134 // Expose the module system runtime via the `runtime` property 135 // TODO: We should deprecate this in favor of `Module.prototype.__runtime` 136 // @deprecated 137 instanceRequire.runtime = $_mod; 138 139 // $_mod.def("/foo$1.0.0/lib/index", function(require, exports, module, __filename, __dirname) { 140 this.exports = {}; 141 142 // call the factory function 143 factoryOrObject(instanceRequire, this.exports, this, filename, dirname); 144 } else { 145 // factoryOrObject is not a function so have exports reference factoryOrObject 146 this.exports = factoryOrObject; 147 } 148 149 this.loaded = true; 150 }; 151 152 /** 153 * Defines a packages whose metadata is used by raptor-loader to load the package. 154 */ 155 function define(path, factoryOrObject, options) { 156 /* 157 $_mod.def('/baz$3.0.0/lib/index', function(require, exports, module, __filename, __dirname) { 158 // module source code goes here 159 }); 160 */ 161 162 var globals = options && options.globals; 163 164 definitions[path] = factoryOrObject; 165 166 if (globals) { 167 var target = win || global; 168 var globalMod = require(path, "/"); 169 for (var i=0;i<globals.length; i++) { 170 target[globals[i]] = globalMod; 171 } 172 } 173 } 174 175 function registerMain(path, relativePath) { 176 mains[path] = relativePath; 177 } 178 179 function remap(fromPath, toPath) { 180 remapped[fromPath] = toPath; 181 } 182 183 function builtin(name, target) { 184 builtins[name] = target; 185 } 186 187 function registerInstalledDependency(parentPath, packageName, packageVersion) { 188 // Example: 189 // dependencies['/my-package$1.0.0/$/my-installed-package'] = '2.0.0' 190 installed[parentPath + '/' + packageName] = packageVersion; 191 } 192 193 function join(from, target) { 194 var fromLen = from.length; 195 var fromLastIndex = fromLen; 196 var targetStartIndex = 0; 197 var char; 198 199 while ((char = target[targetStartIndex]) === ".") { 200 targetStartIndex++; 201 202 if ((char = target[targetStartIndex]) === ".") { 203 targetStartIndex++; 204 205 if (fromLastIndex) { 206 fromLastIndex = from.lastIndexOf("/", fromLastIndex - 1); 207 208 if (fromLastIndex === -1) { 209 fromLastIndex = 0; 210 } 211 } 212 } 213 214 if ((char = target[targetStartIndex]) === "/") { 215 targetStartIndex++; 216 } else { 217 break; 218 } 219 } 220 221 if (char) { 222 if (fromLastIndex) { 223 return from.slice(0, fromLastIndex) + "/" + target.slice(targetStartIndex); 224 } 225 226 return target.slice(targetStartIndex); 227 } 228 229 if (fromLastIndex) { 230 return fromLastIndex === fromLen ? from : from.slice(0, fromLastIndex); 231 } 232 233 return from[0] === "/" ? "/" : "."; 234 } 235 236 function withoutExtension(path) { 237 var lastDotPos = path.lastIndexOf('.'); 238 var lastSlashPos; 239 240 /* jshint laxbreak:true */ 241 return ((lastDotPos === -1) || ((lastSlashPos = path.lastIndexOf('/')) !== -1) && (lastSlashPos > lastDotPos)) 242 ? undefined // use undefined to indicate that returned path is same as given path 243 : path.substring(0, lastDotPos); 244 } 245 246 function splitPackageIdAndSubpath(path) { 247 path = path.substring(1); /* Skip past the first slash */ 248 // Examples: 249 // '/my-package$1.0.0/foo/bar' --> ['my-package$1.0.0', '/foo/bar'] 250 // '/my-package$1.0.0' --> ['my-package$1.0.0', ''] 251 // '/my-package$1.0.0/' --> ['my-package$1.0.0', '/'] 252 // '/@my-scoped-package/foo/$1.0.0/' --> ['@my-scoped-package/foo$1.0.0', '/'] 253 var slashPos = path.indexOf('/'); 254 255 if (path[1] === '@') { 256 // path is something like "/@my-user-name/my-scoped-package/subpath" 257 // For scoped packages, the package name is two parts. We need to skip 258 // past the second slash to get the full package name 259 slashPos = path.indexOf('/', slashPos+1); 260 } 261 262 var packageIdEnd = slashPos === -1 ? path.length : slashPos; 263 264 return [ 265 path.substring(0, packageIdEnd), // Everything up to the slash 266 path.substring(packageIdEnd) // Everything after the package ID 267 ]; 268 } 269 270 function resolveInstalledModule(target, from) { 271 // Examples: 272 // target='foo', from='/my-package$1.0.0/hello/world' 273 274 if (target[target.length-1] === '/') { 275 // This is a hack because I found require('util/') in the wild and 276 // it did not work because of the trailing slash 277 target = target.slice(0, -1); 278 } 279 280 // Check to see if the target module is a builtin module. 281 // For example: 282 // builtins['path'] = '/path-browserify$0.0.0/index' 283 var builtinPath = builtins[target]; 284 if (builtinPath) { 285 return builtinPath; 286 } 287 288 var fromParts = splitPackageIdAndSubpath(from); 289 var fromPackageId = fromParts[0]; 290 291 292 var targetSlashPos = target.indexOf('/'); 293 var targetPackageName; 294 var targetSubpath; 295
296 if (targetSlashPos < 0) { 297 targetPackageName = target; 298 targetSubpath = ''; 299 } else { 300 301 if (target[0] === '@') { 302 // target is something like "@my-user-name/my-scoped-package/subpath" 303 // For scoped packages, the package name is two parts. We need to skip 304 // past the first slash to get the full package name 305 targetSlashPos = target.indexOf('/', targetSlashPos + 1); 306 } 307 308 targetPackageName = target.substring(0, targetSlashPos); 309 targetSubpath = target.substring(targetSlashPos); 310 } 311 312 var targetPackageVersion = installed[fromPackageId + '/' + targetPackageName]; 313 if (targetPackageVersion) { 314 var resolvedPath = '/' + targetPackageName + '$' + targetPackageVersion; 315 if (targetSubpath) { 316 resolvedPath += targetSubpath; 317 } 318 return resolvedPath; 319 } 320 } 321 322 function resolve(target, from) { 323 var resolvedPath; 324 325 if (target[0] === '/') { 326 // handle targets such as "/my/file" or "/$/foo/$/baz" 327 resolvedPath = target; 328 } else if (target[0] === '.') { 329 // turn relative path into absolute path 330 resolvedPath = join(from, target); 331 } else { 332 var len = searchPaths.length; 333 for (var i = 0; i < len; i++) { 334 // search path entries always end in "/"; 335 var candidate = searchPaths[i] + target; 336 var resolved = resolve(candidate, from); 337 if (resolved) { 338 return resolved; 339 } 340 } 341 342 resolvedPath = resolveInstalledModule(target, from); 343 } 344 345 if (!resolvedPath) { 346 return undefined; 347 } 348 349 // target is something like "/foo/baz" 350 // There is no installed module in the path 351 var relativePath = mains[resolvedPath]; 352 353 // check to see if "target" is a "directory" which has a registered main file 354 if (relativePath !== undefined) { 355 // there is a main file corresponding to the given target so add the relative path 356 resolvedPath = join(resolvedPath, relativePath || 'index'); 357 } 358 359 var remappedPath = remapped[resolvedPath]; 360 if (remappedPath) { 361 resolvedPath = remappedPath; 362 } 363 364 if (definitions[resolvedPath] === undefined) { 365 // check for definition for given path but without extension 366 resolvedPath = withoutExtension(resolvedPath); 367 368 if (resolvedPath !== undefined && definitions[resolvedPath] === undefined) { 369 resolvedPath = undefined; 370 } 371 } 372 373 return resolvedPath; 374 } 375 376 function requireModule(target, from) { 377 if (!target) { 378 throw moduleNotFoundError(''); 379 } 380 381 var resolvedPath = resolve(target, from); 382 383 if (resolvedPath === undefined) { 384 throw moduleNotFoundError(target, from); 385 } 386 387 var module = instanceCache[resolvedPath]; 388 389 if (module === undefined) { 390 // cache the instance before loading (allows support for circular dependency with partial loading) 391 module = instanceCache[resolvedPath] = new Module(resolvedPath); 392 module.load(definitions[resolvedPath]); 393 } 394 395 return module; 396 } 397 398 function require(target, from) { 399 return requireModule(target, from).exports; 400 } 401 402 /* 403 $_mod.run('/$/installed-module', '/src/foo'); 404 */ 405 function run(path, options) { 406 var wait = !options || (options.wait !== false); 407 if (wait && !_ready) { 408 return runQueue.push([path, options]); 409 } 410 411 requireModule(path, '/'); 412 } 413 414 /* 415 * Mark the page as being ready and execute any of the 416 * run modules that were deferred 417 */ 418 function ready() { 419 _ready = true; 420 421 var len; 422 while((len = runQueue.length)) { 423 // store a reference to the queue before we reset it 424 var queue = runQueue; 425 426 // clear out the queue 427 runQueue = []; 428 429 // run all of the current jobs 430 for (var i = 0; i < len; i++) { 431 var args = queue[i]; 432 run(args[0], args[1]); 433 } 434 435 // stop running jobs in the queue if we change to not ready 436 if (!_ready) { 437 break; 438 } 439 } 440 } 441 442 function addSearchPath(prefix) { 443 searchPaths.push(prefix); 444 } 445 446 var pendingCount = 0; 447 var onPendingComplete = function() { 448 pendingCount--; 449 if (!pendingCount) { 450 // Trigger any "require-run" modules in the queue to run 451 ready(); 452 } 453 }; 454 455 /*
456 * $_mod is the short-hand version that that the transport layer expects 457 * to be in the browser window object 458 */ 459 Module_prototype.__runtime = $_mod = { 460 /** 461 * Used to register a module factory/object (*internal*) 462 */ 463 def: define, 464 465 /** 466 * Used to register an installed dependency (e.g. "/$/foo" depends on "baz") (*internal*) 467 */ 468 installed: registerInstalledDependency, 469 run: run, 470 main: registerMain, 471 remap: remap, 472 builtin: builtin, 473 require: require, 474 resolve: function (target, from) { 475 var resolved = resolve(target, from); 476 if (resolved !== undefined) { 477 return [resolved, definitions[resolved]]; 478 } 479 }, 480 join: join, 481 ready: ready, 482 483 /** 484 * Add a search path entry (internal) 485 */ 486 searchPath: addSearchPath, 487 488 /** 489 * Sets the loader metadata for this build. 490 * 491 * @param asyncPackageName {String} name of asynchronous package 492 * @param contentType {String} content type ("js" or "css") 493 * @param bundleUrl {String} URL of bundle that belongs to package 494 */ 495 loaderMetadata: function(data) { 496 // We store loader metadata in the prototype of Module 497 // so that `lasso-loader` can read it from 498 // `module.__loaderMetadata`. 499 Module_prototype.__loaderMetadata = data; 500 }, 501 502 /** 503 * Asynchronous bundle loaders should call `pending()` to instantiate 504 * a new job. The object we return here has a `done` method that 505 * should be called when the job completes. When the number of 506 * pending jobs drops to 0, we invoke any of the require-run modules 507 * that have been declared. 508 */ 509 pending: function() { 510 _ready = false; 511 pendingCount++; 512 return { 513 done: onPendingComplete 514 }; 515 } 516 }; 517 518 if (win) { 519 win.$_mod = $_mod; 520 } else { 521 module.exports = $_mod; 522 } 523})(); 524 525$_mod.installed("panel-adsempiredirect$1.0.0", "marko", "4.14.8"); 526$_mod.remap("/marko$4.14.8/components", "/marko$4.14.8/components-browser.marko"); 527$_mod.main("/marko$4.14.8/dist/components", ""); 528$_mod.remap("/marko$4.14.8/dist/components/index", "/marko$4.14.8/dist/components/index-browser"); 529$_mod.remap("/marko$4.14.8/dist/components/util", "/marko$4.14.8/dist/components/util-browser"); 530$_mod.def("/marko$4.14.8/dist/components/dom-data", function(require, exports, module, __filename, __dirname) { var counter = 0; 531var seed = require.resolve('/marko$4.14.8/dist/components/dom-data'/*"./dom-data"*/); 532var WeakMap = global.WeakMap || function WeakMap() { 533 var id = seed + counter++; 534 return { 535 get: function (ref) { 536 return ref[id]; 537 }, 538 set: function (ref, value) { 539 ref[id] = value; 540 } 541 }; 542}; 543 544module.exports = { 545 _J_: new WeakMap(), 546 _K_: new WeakMap(), 547 d_: new WeakMap(), 548 _L_: new WeakMap(), 549 _M_: new WeakMap() 550}; 551}); 552$_mod.def("/marko$4.14.8/dist/components/util-browser", function(require, exports, module, __filename, __dirname) { var domData = require('/marko$4.14.8/dist/components/dom-data'/*"./dom-data"*/); 553var componentsByDOMNode = domData.d_; 554var keysByDOMNode = domData._M_; 555var vElementsByDOMNode = domData._K_; 556var vPropsByDOMNode = domData._J_; 557var markoUID = window.$MUID || (window.$MUID = { i: 0 }); 558var runtimeId = markoUID.i++; 559 560var componentLookup = {}; 561 562var defaultDocument = document; 563var EMPTY_OBJECT = {}; 564 565function getParentComponentForEl(node) { 566 while (node && !componentsByDOMNode.get(node)) { 567 node = node.previousSibling || node.parentNode; 568 node = node && node.fragment || node; 569 } 570 return node && componentsByDOMNode.get(node); 571} 572 573function getComponentForEl(el, doc) { 574 if (el) { 575 var node = typeof el == "string" ? (doc || defaultDocument).getElementById(el) : el; 576 if (node) { 577 return getParentComponentForEl(node); 578 } 579 } 580} 581 582var lifecycleEventMethods = {}; 583 584["create", "render", "update", "mount", "destroy"].forEach(function (eventName) { 585 lifecycleEventMethods[eventName] = "on" + eventName[0].toUpperCase() + eventName.substring(1); 586}); 587 588/** 589 * This method handles invoking a component's event handler method 590 * (if present) while also emitting the event through 591 * the standard EventEmitter.prototype.emit method. 592 * 593 * Special events and their corresponding handler methods 594 * include the following: 595 * 596 * beforeDestroy --> onBeforeDestroy 597 * destroy --> onDestroy 598 * beforeUpdate --> onBeforeUpdate 599 * update --> onUpdate 600 * render --> onRender 601 */ 602function emitLifecycleEvent(component, eventType, eventArg1, eventArg2) { 603 var listenerMethod = component[lifecycleEventMethods[eventType]]; 604 605 if (listenerMethod !== undefined) { 606 listenerMethod.call(component, eventArg1, eventArg2); 607 } 608 609 component.emit(eventType, eventArg1, eventArg2); 610} 611 612function destroyComponentForNode(node) { 613 var componentToDestroy = componentsByDOMNode.get(node.fragment || node); 614 if (componentToDestroy) { 615 componentToDestroy.y_();
616 delete componentLookup[componentToDestroy.id]; 617 } 618} 619function destroyNodeRecursive(node, component) { 620 destroyComponentForNode(node); 621 if (node.nodeType === 1 || node.nodeType === 12) { 622 var key; 623 624 if (component && (key = keysByDOMNode.get(node))) { 625 if (node === component.v_[key]) { 626 if (componentsByDOMNode.get(node) && /\[\]$/.test(key)) { 627 delete component.v_[key][componentsByDOMNode.get(node).id]; 628 } else { 629 delete component.v_[key]; 630 } 631 } 632 } 633 634 var curChild = node.firstChild; 635 while (curChild && curChild !== node.endNode) { 636 destroyNodeRecursive(curChild, component); 637 curChild = curChild.nextSibling; 638 } 639 } 640} 641 642function nextComponentId() { 643 // Each component will get an ID that is unique across all loaded 644 // marko runtimes. This allows multiple instances of marko to be 645 // loaded in the same window and they should all place nice 646 // together 647 return "c" + markoUID.i++; 648} 649 650function nextComponentIdProvider() { 651 return nextComponentId; 652} 653 654function attachBubblingEvent(componentDef, handlerMethodName, isOnce, extraArgs) { 655 if (handlerMethodName) { 656 var componentId = componentDef.id; 657 if (extraArgs) { 658 return [handlerMethodName, componentId, isOnce, extraArgs]; 659 } else { 660 return [handlerMethodName, componentId, isOnce]; 661 } 662 } 663} 664 665function getMarkoPropsFromEl(el) { 666 var vElement = vElementsByDOMNode.get(el); 667 var virtualProps; 668 669 if (vElement) { 670 virtualProps = vElement.ap_; 671 } else { 672 virtualProps = vPropsByDOMNode.get(el); 673 if (!virtualProps) { 674 virtualProps = el.getAttribute("data-marko"); 675 vPropsByDOMNode.set(el, virtualProps = virtualProps ? JSON.parse(virtualProps) : EMPTY_OBJECT); 676 } 677 } 678 679 return virtualProps; 680} 681 682function normalizeComponentKey(key, parentId) { 683 if (key[0] === "#") { 684 key = key.replace("#" + parentId + "-", ""); 685 } 686 return key; 687} 688 689function addComponentRootToKeyedElements(keyedElements, key, rootNode, componentId) { 690 if (/\[\]$/.test(key)) { 691 var repeatedElementsForKey = keyedElements[key] = keyedElements[key] || {}; 692 repeatedElementsForKey[componentId] = rootNode; 693 } else { 694 keyedElements[key] = rootNode; 695 } 696} 697 698exports._N_ = runtimeId; 699exports.a_ = componentLookup; 700exports._R_ = getComponentForEl; 701exports.b_ = emitLifecycleEvent; 702exports.aq_ = destroyComponentForNode; 703exports.c_ = destroyNodeRecursive; 704exports._w_ = nextComponentIdProvider; 705exports.Z_ = attachBubblingEvent; 706exports._O_ = getMarkoPropsFromEl; 707exports._V_ = addComponentRootToKeyedElements; 708exports.ar_ = normalizeComponentKey; 709}); 710$_mod.remap("/marko$4.14.8/dist/components/init-components", "/marko$4.14.8/dist/components/init-components-browser"); 711$_mod.installed("marko$4.14.8", "warp10", "2.1.0"); 712$_mod.def("/warp10$2.1.0/src/constants", function(require, exports, module, __filename, __dirname) { var win = typeof window !== "undefined" ? window : global; 713exports.NOOP = win.$W10NOOP = win.$W10NOOP || function () {}; 714}); 715$_mod.def("/warp10$2.1.0/src/finalize", function(require, exports, module, __filename, __dirname) { var constants = require('/warp10$2.1.0/src/constants'/*"./constants"*/); 716var isArray = Array.isArray; 717 718function resolve(object, path, len) { 719 var current = object; 720 for (var i=0; i<len; i++) { 721 current = current[path[i]]; 722 } 723 724 return current; 725} 726 727function resolveType(info) { 728 if (info.type === 'Date') { 729 return new Date(info.value); 730 } else if (info.type === 'URL') { 731 return new URL(info.value); 732 } else if (info.type === 'URLSearchParams') { 733 return new URLSearchParams(info.value); 734 } else if (info.type === 'NOOP') { 735 return constants.NOOP; 736 } else { 737 throw new Error('Bad type'); 738 } 739} 740 741module.exports = function finalize(outer) { 742 if (!outer) { 743 return outer; 744 } 745 746 var assignments = outer.$$; 747 if (assignments) { 748 var object = outer.o; 749 var len; 750 751 if (assignments && (len=assignments.length)) { 752 for (var i=0; i<len; i++) { 753 var assignment = assignments[i]; 754 755 var rhs = assignment.r; 756 var rhsValue; 757 758 if (isArray(rhs)) { 759 rhsValue = resolve(object, rhs, rhs.length); 760 } else { 761 rhsValue = resolveType(rhs); 762 } 763 764 var lhs = assignment.l; 765 var lhsLast = lhs.length-1; 766 767 if (lhsLast === -1) { 768 object = outer.o = rhsValue; 769 break; 770 } else { 771 var lhsParent = resolve(object, lhs, lhsLast); 772 lhsParent[lhs[lhsLast]] = rhsValue; 773 } 774 } 775 } 776 777 assignments.length = 0; // Assignments have been applied, do not reapply 778 779 return object == null ? null : object; 780 } else { 781 return outer; 782 } 783 784}; 785}); 786$_mod.def("/warp10$2.1.0/finalize", function(require, exports, module, __filename, __dirname) { module.exports = require('/warp10$2.1.0/src/finalize'/*'./src/finalize'*/); 787}); 788$_mod.def("/marko$4.14.8/dist/components/event-delegation", function(require, exports, module, __filename, __dirname) { var componentsUtil = require('/marko$4.14.8/dist/components/util-browser'/*"./util"*/); 789var runtimeId = componentsUtil._N_;
790var componentLookup = componentsUtil.a_; 791var getMarkoPropsFromEl = componentsUtil._O_; 792 793// We make our best effort to allow multiple marko runtimes to be loaded in the 794// same window. Each marko runtime will get its own unique runtime ID. 795var listenersAttachedKey = "$MDE" + runtimeId; 796var delegatedEvents = {}; 797 798function getEventFromEl(el, eventName) { 799 var virtualProps = getMarkoPropsFromEl(el); 800 var eventInfo = virtualProps[eventName]; 801 802 if (typeof eventInfo === "string") { 803 eventInfo = eventInfo.split(" "); 804 if (eventInfo[2]) { 805 eventInfo[2] = eventInfo[2] === "true"; 806 } 807 if (eventInfo.length == 4) { 808 eventInfo[3] = parseInt(eventInfo[3], 10); 809 } 810 } 811 812 return eventInfo; 813} 814 815function delegateEvent(node, eventName, target, event) { 816 var targetMethod = target[0]; 817 var targetComponentId = target[1]; 818 var isOnce = target[2]; 819 var extraArgs = target[3]; 820 821 if (isOnce) { 822 var virtualProps = getMarkoPropsFromEl(node); 823 delete virtualProps[eventName]; 824 } 825 826 var targetComponent = componentLookup[targetComponentId]; 827 828 if (!targetComponent) { 829 return; 830 } 831 832 var targetFunc = typeof targetMethod === "function" ? targetMethod : targetComponent[targetMethod]; 833 if (!targetFunc) { 834 throw Error("Method not found: " + targetMethod); 835 } 836 837 if (extraArgs != null) { 838 if (typeof extraArgs === "number") { 839 extraArgs = targetComponent.k_[extraArgs]; 840 } 841 } 842 843 // Invoke the component method 844 if (extraArgs) { 845 targetFunc.apply(targetComponent, extraArgs.concat(event, node)); 846 } else { 847 targetFunc.call(targetComponent, event, node); 848 } 849} 850 851function addDelegatedEventHandler(eventType) { 852 if (!delegatedEvents[eventType]) { 853 delegatedEvents[eventType] = true; 854 } 855} 856 857function addDelegatedEventHandlerToDoc(eventType, doc) { 858 var body = doc.body || doc; 859 var listeners = doc[listenersAttachedKey] = doc[listenersAttachedKey] || {}; 860 if (!listeners[eventType]) { 861 body.addEventListener(eventType, listeners[eventType] = function (event) { 862 var propagationStopped = false; 863 864 // Monkey-patch to fix #97 865 var oldStopPropagation = event.stopPropagation; 866 867 event.stopPropagation = function () { 868 oldStopPropagation.call(event); 869 propagationStopped = true; 870 }; 871 872 var curNode = event.target; 873 if (!curNode) { 874 return; 875 } 876 877 // event.target of an SVGElementInstance does not have a 878 // `getAttribute` function in IE 11. 879 // See https://github.com/marko-js/marko/issues/796 880 curNode = curNode.correspondingUseElement || curNode; 881 882 // Search up the tree looking DOM events mapped to target 883 // component methods 884 var propName = "on" + eventType; 885 var target; 886 887 // Attributes will have the following form: 888 // on<event_type>("<target_method>|<component_id>") 889 890 do { 891 if (target = getEventFromEl(curNode, propName)) { 892 delegateEvent(curNode, propName, target, event); 893 894 if (propagationStopped) { 895 break; 896 } 897 } 898 } while ((curNode = curNode.parentNode) && curNode.getAttribute); 899 }, true); 900 } 901} 902 903function noop() {} 904 905exports._I_ = noop; 906exports.z_ = noop; 907exports._F_ = delegateEvent; 908exports._G_ = getEventFromEl; 909exports.___ = addDelegatedEventHandler; 910exports._P_ = function (doc) { 911 Object.keys(delegatedEvents).forEach(function (eventType) { 912 addDelegatedEventHandlerToDoc(eventType, doc); 913 }); 914}; 915}); 916$_mod.def("/marko$4.14.8/dist/morphdom/helpers", function(require, exports, module, __filename, __dirname) { function insertBefore(node, referenceNode, parentNode) { 917 if (node.insertInto) { 918 return node.insertInto(parentNode, referenceNode); 919 } 920 return parentNode.insertBefore(node, referenceNode && referenceNode.startNode || referenceNode); 921} 922 923function insertAfter(node, referenceNode, parentNode) { 924 return insertBefore(node, referenceNode && referenceNode.nextSibling, parentNode); 925} 926 927function nextSibling(node) { 928 var next = node.nextSibling; 929 var fragment = next && next.fragment; 930 if (fragment) { 931 return next === fragment.startNode ? fragment : null; 932 } 933 return next; 934} 935 936function firstChild(node) { 937 var next = node.firstChild; 938 return next && next.fragment || next; 939} 940 941function removeChild(node) { 942 if (node.remove) node.remove();else node.parentNode.removeChild(node); 943} 944 945exports.as_ = insertBefore; 946exports.av_ = insertAfter; 947exports.aw_ = nextSibling; 948exports.S_ = firstChild; 949exports.ax_ = removeChild; 950}); 951$_mod.def("/marko$4.14.8/dist/morphdom/fragment", function(require, exports, module, __filename, __dirname) { var helpers = require('/marko$4.14.8/dist/morphdom/helpers'/*"./helpers"*/); 952var insertBefore = helpers.as_; 953 954var fragmentPrototype = { 955 nodeType: 12, 956 get firstChild() { 957 var firstChild = this.startNode.nextSibling; 958 return firstChild === this.endNode ? undefined : firstChild; 959 }, 960 get lastChild() { 961 var lastChild = this.endNode.previousSibling; 962 return lastChild === this.startNode ? undefined : lastChild; 963 }, 964 get parentNode() { 965 var parentNode = this.startNode.parentNode; 966 return parentNode === this.detachedContainer ? undefined : parentNode; 967 }, 968 get nextSibling() { 969 return this.endNode.nextSibling; 970 }, 971 get nodes() { 972 var nodes = []; 973 var current = this.startNode;
974 while (current !== this.endNode) { 975 nodes.push(current); 976 current = current.nextSibling; 977 } 978 nodes.push(current); 979 return nodes; 980 }, 981 insertBefore: function (newChildNode, referenceNode) { 982 var actualReference = referenceNode == null ? this.endNode : referenceNode; 983 return insertBefore(newChildNode, actualReference, this.startNode.parentNode); 984 }, 985 insertInto: function (newParentNode, referenceNode) { 986 this.nodes.forEach(function (node) { 987 insertBefore(node, referenceNode, newParentNode); 988 }, this); 989 return this; 990 }, 991 remove: function () { 992 this.nodes.forEach(function (node) { 993 this.detachedContainer.appendChild(node); 994 }, this); 995 } 996}; 997 998function createFragmentNode(startNode, nextNode, parentNode) { 999 var fragment = Object.create(fragmentPrototype); 1000 fragment.startNode = document.createTextNode(""); 1001 fragment.endNode = document.createTextNode(""); 1002 fragment.startNode.fragment = fragment; 1003 fragment.endNode.fragment = fragment; 1004 var detachedContainer = fragment.detachedContainer = document.createDocumentFragment(); 1005 parentNode = parentNode || startNode && startNode.parentNode || detachedContainer; 1006 insertBefore(fragment.startNode, startNode, parentNode); 1007 insertBefore(fragment.endNode, nextNode, parentNode); 1008 return fragment; 1009} 1010 1011function beginFragmentNode(startNode, parentNode) { 1012 var fragment = createFragmentNode(startNode, null, parentNode); 1013 fragment.at_ = function (nextNode) { 1014 fragment.at_ = null; 1015 insertBefore(fragment.endNode, nextNode, parentNode || startNode.parentNode); 1016 }; 1017 return fragment; 1018} 1019 1020exports._U_ = createFragmentNode; 1021exports.au_ = beginFragmentNode; 1022}); 1023$_mod.installed("marko$4.14.8", "raptor-util", "3.2.0"); 1024$_mod.def("/raptor-util$3.2.0/extend", function(require, exports, module, __filename, __dirname) { module.exports = function extend(target, source) { //A simple function to copy properties from one object to another 1025 if (!target) { //Check if a target was provided, otherwise create a new empty object to return 1026 target = {}; 1027 } 1028 1029 if (source) { 1030 for (var propName in source) { 1031 if (source.hasOwnProperty(propName)) { //Only look at source properties that are not inherited 1032 target[propName] = source[propName]; //Copy the property 1033 } 1034 } 1035 } 1036 1037 return target; 1038}; 1039}); 1040$_mod.def("/marko$4.14.8/dist/components/KeySequence", function(require, exports, module, __filename, __dirname) { function KeySequence() { 1041 this._B_ = {}; 1042} 1043 1044KeySequence.prototype = { 1045 _i_: function (key) { 1046 // var len = key.length; 1047 // var lastChar = key[len-1]; 1048 // if (lastChar === ']') { 1049 // key = key.substring(0, len-2); 1050 // } 1051 var lookup = this._B_; 1052 1053 var currentIndex = lookup[key]++; 1054 if (!currentIndex) { 1055 lookup[key] = 1; 1056 currentIndex = 0; 1057 return key; 1058 } else { 1059 return key + "_" + currentIndex; 1060 } 1061 } 1062}; 1063 1064module.exports = KeySequence; 1065}); 1066$_mod.def("/marko$4.14.8/dist/components/ComponentDef", function(require, exports, module, __filename, __dirname) { "use strict"; 1067 1068var componentUtil = require('/marko$4.14.8/dist/components/util-browser'/*"./util"*/); 1069var attachBubblingEvent = componentUtil.Z_; 1070var addDelegatedEventHandler = require('/marko$4.14.8/dist/components/event-delegation'/*"./event-delegation"*/).___; 1071var extend = require('/raptor-util$3.2.0/extend'/*"raptor-util/extend"*/); 1072var KeySequence = require('/marko$4.14.8/dist/components/KeySequence'/*"./KeySequence"*/); 1073 1074var FLAG_WILL_RERENDER_IN_BROWSER = 1; 1075/* 1076var FLAG_HAS_BODY_EL = 2; 1077var FLAG_HAS_HEAD_EL = 4; 1078*/ 1079 1080/** 1081 * A ComponentDef is used to hold the metadata collected at runtime for 1082 * a single component and this information is used to instantiate the component 1083 * later (after the rendered HTML has been added to the DOM) 1084 */ 1085function ComponentDef(component, componentId, globalComponentsContext) { 1086 this._a_ = globalComponentsContext; // The AsyncWriter that this component is associated with 1087 this._b_ = component; 1088 this.id = componentId; 1089 1090 this._c_ = undefined; // An array of DOM events that need to be added (in sets of three) 1091 1092 this._d_ = false;
1093 1094 this._e_ = false; 1095 this._f_ = 0; 1096 1097 this._g_ = 0; // The unique integer to use for the next scoped ID 1098 1099 this.w_ = null; 1100 1101 this._h_ = null; 1102} 1103 1104ComponentDef.prototype = { 1105 _i_: function (key) { 1106 var keySequence = this.w_ || (this.w_ = new KeySequence()); 1107 return keySequence._i_(key); 1108 }, 1109 1110 _j_: function (key, bodyOnly) { 1111 var lookup = this._h_ || (this._h_ = {}); 1112 lookup[key] = bodyOnly ? 2 : 1; 1113 }, 1114 1115 /** 1116 * This helper method generates a unique and fully qualified DOM element ID 1117 * that is unique within the scope of the current component. This method prefixes 1118 * the the nestedId with the ID of the current component. If nestedId ends 1119 * with `[]` then it is treated as a repeated ID and we will generate 1120 * an ID with the current index for the current nestedId. 1121 * (e.g. "myParentId-foo[0]", "myParentId-foo[1]", etc.) 1122 */ 1123 elId: function (nestedId) { 1124 var id = this.id; 1125 if (nestedId == null) { 1126 return id; 1127 } else { 1128 if (nestedId.startsWith("#")) { 1129 id = "#" + id; 1130 nestedId = nestedId.substring(1); 1131 } 1132 1133 return id + "-" + nestedId; 1134 } 1135 }, 1136 /** 1137 * Returns the next auto generated unique ID for a nested DOM element or nested DOM component 1138 */ 1139 _k_: function () { 1140 return this.id + "-c" + this._g_++; 1141 }, 1142 1143 d: function (eventName, handlerMethodName, isOnce, extraArgs) { 1144 addDelegatedEventHandler(eventName); 1145 return attachBubblingEvent(this, handlerMethodName, isOnce, extraArgs); 1146 }, 1147 1148 get _l_() { 1149 return this._b_._l_; 1150 } 1151}; 1152 1153ComponentDef._m_ = function (o, types, global, registry) { 1154 var id = o[0]; 1155 var typeName = types[o[1]]; 1156 var input = o[2]; 1157 var extra = o[3]; 1158 1159 var isLegacy = extra.l; 1160 var state = extra.s; 1161 var componentProps = extra.w; 1162 var flags = extra.f; 1163 1164 var component = typeName /* legacy */ && registry._n_(typeName, id, isLegacy); 1165 1166 // Prevent newly created component from being queued for update since we area 1167 // just building it from the server info 1168 component.r_ = true; 1169 1170 if (!isLegacy && flags & FLAG_WILL_RERENDER_IN_BROWSER) { 1171 if (component.onCreate) { 1172 component.onCreate(input, { global: global }); 1173 } 1174 if (component.onInput) { 1175 input = component.onInput(input, { global: global }) || input; 1176 } 1177 } else { 1178 if (state) { 1179 var undefinedPropNames = extra.u; 1180 if (undefinedPropNames) { 1181 undefinedPropNames.forEach(function (undefinedPropName) { 1182 state[undefinedPropName] = undefined; 1183 }); 1184 } 1185 // We go through the setter here so that we convert the state object 1186 // to an instance of `State` 1187 component.state = state; 1188 } 1189 1190 if (componentProps) { 1191 extend(component, componentProps); 1192 } 1193 } 1194 1195 component.n_ = input; 1196 1197 if (extra.b) { 1198 component.k_ = extra.b; 1199 } 1200 1201 var scope = extra.p; 1202 var customEvents = extra.e; 1203 if (customEvents) { 1204 component.W_(customEvents, scope); 1205 } 1206 1207 component.p_ = global; 1208 1209 return { 1210 id: id, 1211 _b_: component, 1212 _o_: extra.r, 1213 _c_: extra.d, 1214 _f_: extra.f || 0 1215 }; 1216}; 1217 1218module.exports = ComponentDef; 1219}); 1220$_mod.remap("/marko$4.14.8/dist/components/registry", "/marko$4.14.8/dist/components/registry-browser"); 1221$_mod.def("/marko$4.14.8/dist/components/State", function(require, exports, module, __filename, __dirname) { var extend = require('/raptor-util$3.2.0/extend'/*"raptor-util/extend"*/); 1222 1223function ensure(state, propertyName) { 1224 var proto = state.constructor.prototype; 1225 if (!(propertyName in proto)) { 1226 Object.defineProperty(proto, propertyName, { 1227 get: function () { 1228 return this.V_[propertyName]; 1229 }, 1230 set: function (value) { 1231 this.E_(propertyName, value, false /* ensure:false */); 1232 } 1233 }); 1234 } 1235} 1236 1237function State(component) { 1238 this._b_ = component; 1239 this.V_ = {}; 1240 1241 this.s_ = false;
1242 this.K_ = null; 1243 this.J_ = null; 1244 this._E_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty 1245 1246 Object.seal(this); 1247} 1248 1249State.prototype = { 1250 f_: function () { 1251 var self = this; 1252 1253 self.s_ = false; 1254 self.K_ = null; 1255 self.J_ = null; 1256 self._E_ = null; 1257 }, 1258 1259 C_: function (newState) { 1260 var state = this; 1261 var key; 1262 1263 var rawState = this.V_; 1264 1265 for (key in rawState) { 1266 if (!(key in newState)) { 1267 state.E_(key, undefined, false /* ensure:false */ 1268 , false /* forceDirty:false */ 1269 ); 1270 } 1271 } 1272 1273 for (key in newState) { 1274 state.E_(key, newState[key], true /* ensure:true */ 1275 , false /* forceDirty:false */ 1276 ); 1277 } 1278 }, 1279 E_: function (name, value, shouldEnsure, forceDirty) { 1280 var rawState = this.V_; 1281 1282 if (shouldEnsure) { 1283 ensure(this, name); 1284 } 1285 1286 if (forceDirty) { 1287 var forcedDirtyState = this._E_ || (this._E_ = {}); 1288 forcedDirtyState[name] = true; 1289 } else if (rawState[name] === value) { 1290 return; 1291 } 1292 1293 if (!this.s_) { 1294 // This is the first time we are modifying the component state 1295 // so introduce some properties to do some tracking of 1296 // changes to the state 1297 this.s_ = true; // Mark the component state as dirty (i.e. modified) 1298 this.K_ = rawState; 1299 this.V_ = rawState = extend({}, rawState); 1300 this.J_ = {}; 1301 this._b_.D_(); 1302 } 1303 1304 this.J_[name] = value; 1305 1306 if (value === undefined) { 1307 // Don't store state properties with an undefined or null value 1308 delete rawState[name]; 1309 } else { 1310 // Otherwise, store the new value in the component state 1311 rawState[name] = value; 1312 } 1313 }, 1314 toJSON: function () { 1315 return this.V_; 1316 } 1317}; 1318 1319module.exports = State; 1320}); 1321$_mod.def("/marko$4.14.8/dist/runtime/dom-insert", function(require, exports, module, __filename, __dirname) { var extend = require('/raptor-util$3.2.0/extend'/*"raptor-util/extend"*/); 1322var componentsUtil = require('/marko$4.14.8/dist/components/util-browser'/*"../components/util"*/); 1323var destroyComponentForNode = componentsUtil.aq_; 1324var destroyNodeRecursive = componentsUtil.c_; 1325var helpers = require('/marko$4.14.8/dist/morphdom/helpers'/*"../morphdom/helpers"*/); 1326 1327var insertBefore = helpers.as_; 1328var insertAfter = helpers.av_; 1329var removeChild = helpers.ax_; 1330 1331function resolveEl(el) { 1332 if (typeof el == "string") { 1333 var elId = el; 1334 el = document.getElementById(elId); 1335 if (!el) { 1336 throw Error("Not found: " + elId); 1337 } 1338 } 1339 return el; 1340} 1341 1342function beforeRemove(referenceEl) { 1343 destroyNodeRecursive(referenceEl); 1344 destroyComponentForNode(referenceEl); 1345} 1346 1347module.exports = function (target, getEl, afterInsert) { 1348 extend(target, { 1349 appendTo: function (referenceEl) { 1350 referenceEl = resolveEl(referenceEl); 1351 var el = getEl(this, referenceEl); 1352 insertBefore(el, null, referenceEl); 1353 return afterInsert(this, referenceEl); 1354 }, 1355 prependTo: function (referenceEl) { 1356 referenceEl = resolveEl(referenceEl); 1357 var el = getEl(this, referenceEl); 1358 insertBefore(el, referenceEl.firstChild || null, referenceEl); 1359 return afterInsert(this, referenceEl); 1360 }, 1361 replace: function (referenceEl) { 1362 referenceEl = resolveEl(referenceEl); 1363 var el = getEl(this, referenceEl); 1364 beforeRemove(referenceEl); 1365 insertBefore(el, referenceEl, referenceEl.parentNode); 1366 removeChild(referenceEl); 1367 return afterInsert(this, referenceEl); 1368 }, 1369 replaceChildrenOf: function (referenceEl) { 1370 referenceEl = resolveEl(referenceEl); 1371 var el = getEl(this, referenceEl); 1372 1373 var curChild = referenceEl.firstChild; 1374 while (curChild) { 1375 var nextSibling = curChild.nextSibling; // Just in case the DOM changes while removing 1376 beforeRemove(curChild); 1377 curChild = nextSibling; 1378 } 1379 1380 referenceEl.innerHTML = ""; 1381 insertBefore(el, null, referenceEl); 1382 return afterInsert(this, referenceEl); 1383 }, 1384 insertBefore: function (referenceEl) { 1385 referenceEl = resolveEl(referenceEl); 1386 var el = getEl(this, referenceEl); 1387 insertBefore(el, referenceEl, referenceEl.parentNode); 1388 return afterInsert(this, referenceEl); 1389 }, 1390 insertAfter: function (referenceEl) { 1391 referenceEl = resolveEl(referenceEl); 1392 var el = getEl(this, referenceEl); 1393 insertAfter(el, referenceEl, referenceEl.parentNode); 1394 return afterInsert(this, referenceEl); 1395 } 1396 }); 1397}; 1398}); 1399$_mod.def("/marko$4.14.8/dist/runtime/createOut", function(require, exports, module, __filename, __dirname) { var actualCreateOut; 1400 1401function setCreateOut(createOutFunc) { 1402 actualCreateOut = createOutFunc; 1403} 1404 1405function createOut(globalData) { 1406 return actualCreateOut(globalData); 1407} 1408 1409createOut.aM_ = setCreateOut; 1410 1411module.exports = createOut; 1412}); 1413$_mod.def("/marko$4.14.8/dist/components/GlobalComponentsContext", function(require, exports, module, __filename, __dirname) { var nextComponentIdProvider = require('/marko$4.14.8/dist/components/util-browser'/*"./util"*/)._w_; 1414var KeySequence = require('/marko$4.14.8/dist/components/KeySequence'/*"./KeySequence"*/); 1415 1416function GlobalComponentsContext(out) { 1417 this._x_ = {}; 1418 this._y_ = {}; 1419 this._z_ = {}; 1420 this.P_ = undefined; 1421 this._k_ = nextComponentIdProvider(out); 1422} 1423 1424GlobalComponentsContext.prototype = { 1425 _A_: function () { 1426 return new KeySequence(); 1427 } 1428}; 1429 1430module.exports = GlobalComponentsContext; 1431}); 1432$_mod.def("/marko$4.14.8/dist/components/ComponentsContext", function(require, exports, module, __filename, __dirname) { "use strict"; 1433 1434var GlobalComponentsContext = require('/marko$4.14.8/dist/components/GlobalComponentsContext'/*"./GlobalComponentsContext"*/); 1435 1436function ComponentsContext(out, parentComponentsContext) { 1437 var globalComponentsContext; 1438 var componentDef; 1439 1440 if (parentComponentsContext) { 1441 globalComponentsContext = parentComponentsContext.O_; 1442 componentDef = parentComponentsContext._p_; 1443 1444 var nestedContextsForParent; 1445 if (!(nestedContextsForParent = parentComponentsContext._q_)) { 1446 nestedContextsForParent = parentComponentsContext._q_ = []; 1447 } 1448 1449 nestedContextsForParent.push(this); 1450 } else { 1451 globalComponentsContext = out.global._r_; 1452 if (globalComponentsContext === undefined) { 1453 out.global._r_ = globalComponentsContext = new GlobalComponentsContext(out); 1454 } 1455 } 1456 1457 this.O_ = globalComponentsContext; 1458 this._r_ = []; 1459 this._s_ = out; 1460 this._p_ = componentDef; 1461 this._q_ = undefined; 1462} 1463 1464ComponentsContext.prototype = { 1465 _t_: function (doc) { 1466 var componentDefs = this._r_; 1467 1468 ComponentsContext._u_(componentDefs, doc); 1469 1470 this._s_.emit("_v_"); 1471 1472 // Reset things stored in global since global is retained for 1473 // future renders 1474 this._s_.global._r_ = undefined; 1475 1476 return componentDefs; 1477 } 1478}; 1479 1480function getComponentsContext(out) { 1481 return out._r_ || (out._r_ = new ComponentsContext(out)); 1482} 1483 1484module.exports = exports = ComponentsContext; 1485 1486exports.__ = getComponentsContext; 1487}); 1488$_mod.installed("marko$4.14.8", "events-light", "1.0.5"); 1489$_mod.main("/events-light$1.0.5", "src/index"); 1490$_mod.def("/events-light$1.0.5/src/index", function(require, exports, module, __filename, __dirname) { /* jshint newcap:false */ 1491var slice = Array.prototype.slice; 1492 1493function isFunction(arg) { 1494 return typeof arg === 'function'; 1495} 1496 1497function checkListener(listener) { 1498 if (!isFunction(listener)) { 1499 throw TypeError('Invalid listener'); 1500 } 1501} 1502 1503function invokeListener(ee, listener, args) { 1504 switch (args.length) { 1505 // fast cases 1506 case 1: 1507 listener.call(ee); 1508 break; 1509 case 2:
1510 listener.call(ee, args[1]); 1511 break; 1512 case 3: 1513 listener.call(ee, args[1], args[2]); 1514 break; 1515 // slower 1516 default: 1517 listener.apply(ee, slice.call(args, 1)); 1518 } 1519} 1520 1521function addListener(eventEmitter, type, listener, prepend) { 1522 checkListener(listener); 1523 1524 var events = eventEmitter.$e || (eventEmitter.$e = {}); 1525 1526 var listeners = events[type]; 1527 if (listeners) { 1528 if (isFunction(listeners)) { 1529 events[type] = prepend ? [listener, listeners] : [listeners, listener]; 1530 } else { 1531 if (prepend) { 1532 listeners.unshift(listener); 1533 } else { 1534 listeners.push(listener); 1535 } 1536 } 1537 1538 } else { 1539 events[type] = listener; 1540 } 1541 return eventEmitter; 1542} 1543 1544function EventEmitter() { 1545 this.$e = this.$e || {}; 1546} 1547 1548EventEmitter.EventEmitter = EventEmitter; 1549 1550EventEmitter.prototype = { 1551 $e: null, 1552 1553 emit: function(type) { 1554 var args = arguments; 1555 1556 var events = this.$e; 1557 if (!events) { 1558 return; 1559 } 1560 1561 var listeners = events && events[type]; 1562 if (!listeners) { 1563 // If there is no 'error' event listener then throw. 1564 if (type === 'error') { 1565 var error = args[1]; 1566 if (!(error instanceof Error)) { 1567 var context = error; 1568 error = new Error('Error: ' + context); 1569 error.context = context; 1570 } 1571 1572 throw error; // Unhandled 'error' event 1573 } 1574 1575 return false; 1576 } 1577 1578 if (isFunction(listeners)) { 1579 invokeListener(this, listeners, args); 1580 } else { 1581 listeners = slice.call(listeners); 1582 1583 for (var i=0, len=listeners.length; i<len; i++) { 1584 var listener = listeners[i]; 1585 invokeListener(this, listener, args); 1586 } 1587 } 1588 1589 return true; 1590 }, 1591 1592 on: function(type, listener) { 1593 return addListener(this, type, listener, false); 1594 }, 1595 1596 prependListener: function(type, listener) { 1597 return addListener(this, type, listener, true); 1598 }, 1599 1600 once: function(type, listener) { 1601 checkListener(listener); 1602 1603 function g() { 1604 this.removeListener(type, g); 1605 1606 if (listener) { 1607 listener.apply(this, arguments); 1608 listener = null; 1609 } 1610 } 1611 1612 this.on(type, g); 1613 1614 return this; 1615 }, 1616 1617 // emits a 'removeListener' event iff the listener was removed 1618 removeListener: function(type, listener) { 1619 checkListener(listener); 1620 1621 var events = this.$e; 1622 var listeners; 1623 1624 if (events && (listeners = events[type])) { 1625 if (isFunction(listeners)) { 1626 if (listeners === listener) { 1627 delete events[type]; 1628 } 1629 } else { 1630 for (var i=listeners.length-1; i>=0; i--) { 1631 if (listeners[i] === listener) { 1632 listeners.splice(i, 1); 1633 } 1634 } 1635 } 1636 } 1637 1638 return this; 1639 }, 1640 1641 removeAllListeners: function(type) { 1642 var events = this.$e; 1643 if (events) { 1644 delete events[type]; 1645 } 1646 }, 1647 1648 listenerCount: function(type) { 1649 var events = this.$e; 1650 var listeners = events && events[type]; 1651 return listeners ? (isFunction(listeners) ? 1 : listeners.length) : 0; 1652 } 1653}; 1654 1655module.exports = EventEmitter; 1656}); 1657$_mod.def("/marko$4.14.8/dist/runtime/RenderResult", function(require, exports, module, __filename, __dirname) { var domInsert = require('/marko$4.14.8/dist/runtime/dom-insert'/*"./dom-insert"*/); 1658 1659function getComponentDefs(result) { 1660 var componentDefs = result._r_; 1661 1662 if (!componentDefs) { 1663 throw Error("No component"); 1664 } 1665 return componentDefs; 1666} 1667 1668function RenderResult(out) { 1669 this.out = this._s_ = out; 1670 this._r_ = undefined; 1671} 1672 1673module.exports = RenderResult; 1674 1675var proto = RenderResult.prototype = { 1676 getComponent: function () { 1677 return this.getComponents()[0]; 1678 }, 1679 getComponents: function (selector) { 1680 if (this._r_ === undefined) { 1681 throw Error("Not added to DOM"); 1682 } 1683 1684 var componentDefs = getComponentDefs(this); 1685 1686 var components = []; 1687
1688 componentDefs.forEach(function (componentDef) { 1689 var component = componentDef._b_; 1690 if (!selector || selector(component)) { 1691 components.push(component); 1692 } 1693 }); 1694 1695 return components; 1696 }, 1697 1698 afterInsert: function (doc) { 1699 var out = this._s_; 1700 var componentsContext = out._r_; 1701 if (componentsContext) { 1702 this._r_ = componentsContext._t_(doc); 1703 } else { 1704 this._r_ = null; 1705 } 1706 1707 return this; 1708 }, 1709 getNode: function (doc) { 1710 return this._s_.aL_(doc); 1711 }, 1712 getOutput: function () { 1713 return this._s_.R_(); 1714 }, 1715 toString: function () { 1716 return this._s_.toString(); 1717 }, 1718 document: typeof document != "undefined" && document 1719}; 1720 1721// Add all of the following DOM methods to Component.prototype: 1722// - appendTo(referenceEl) 1723// - replace(referenceEl) 1724// - replaceChildrenOf(referenceEl) 1725// - insertBefore(referenceEl) 1726// - insertAfter(referenceEl) 1727// - prependTo(referenceEl) 1728domInsert(proto, function getEl(renderResult, referenceEl) { 1729 return renderResult.getNode(referenceEl.ownerDocument); 1730}, function afterInsert(renderResult, referenceEl) { 1731 var isShadow = typeof ShadowRoot === "function" && referenceEl instanceof ShadowRoot; 1732 return renderResult.afterInsert(isShadow ? referenceEl : referenceEl.ownerDocument); 1733}); 1734}); 1735$_mod.installed("marko$4.14.8", "listener-tracker", "2.0.0"); 1736$_mod.main("/listener-tracker$2.0.0", "lib/listener-tracker"); 1737$_mod.def("/listener-tracker$2.0.0/lib/listener-tracker", function(require, exports, module, __filename, __dirname) { var INDEX_EVENT = 0; 1738var INDEX_USER_LISTENER = 1; 1739var INDEX_WRAPPED_LISTENER = 2; 1740var DESTROY = "destroy"; 1741 1742function isNonEventEmitter(target) { 1743 return !target.once; 1744} 1745 1746function EventEmitterWrapper(target) { 1747 this.$__target = target; 1748 this.$__listeners = []; 1749 this.$__subscribeTo = null; 1750} 1751 1752EventEmitterWrapper.prototype = { 1753 $__remove: function(test, testWrapped) { 1754 var target = this.$__target; 1755 var listeners = this.$__listeners; 1756 1757 this.$__listeners = listeners.filter(function(curListener) { 1758 var curEvent = curListener[INDEX_EVENT]; 1759 var curListenerFunc = curListener[INDEX_USER_LISTENER]; 1760 var curWrappedListenerFunc = curListener[INDEX_WRAPPED_LISTENER]; 1761 1762 if (testWrapped) { 1763 // If the user used `once` to attach an event listener then we had to 1764 // wrap their listener function with a new function that does some extra 1765 // cleanup to avoid a memory leak. If the `testWrapped` flag is set to true 1766 // then we are attempting to remove based on a function that we had to 1767 // wrap (not the user listener function) 1768 if (curWrappedListenerFunc && test(curEvent, curWrappedListenerFunc)) { 1769 target.removeListener(curEvent, curWrappedListenerFunc); 1770 1771 return false; 1772 } 1773 } else if (test(curEvent, curListenerFunc)) { 1774 // If the listener function was wrapped due to it being a `once` listener 1775 // then we should remove from the target EventEmitter using wrapped 1776 // listener function. Otherwise, we remove the listener using the user-provided 1777 // listener function. 1778 target.removeListener(curEvent, curWrappedListenerFunc || curListenerFunc); 1779 1780 return false; 1781 } 1782 1783 return true; 1784 }); 1785 1786 // Fixes https://github.com/raptorjs/listener-tracker/issues/2 1787 // If all of the listeners stored with a wrapped EventEmitter 1788 // have been removed then we should unregister the wrapped 1789 // EventEmitter in the parent SubscriptionTracker 1790 var subscribeTo = this.$__subscribeTo; 1791 1792 if (!this.$__listeners.length && subscribeTo) { 1793 var self = this; 1794 var subscribeToList = subscribeTo.$__subscribeToList; 1795 subscribeTo.$__subscribeToList = subscribeToList.filter(function(cur) { 1796 return cur !== self; 1797 }); 1798 } 1799 }, 1800 1801 on: function(event, listener) { 1802 this.$__target.on(event, listener); 1803 this.$__listeners.push([event, listener]); 1804 return this; 1805 }, 1806 1807 once: function(event, listener) { 1808 var self = this; 1809 1810 // Handling a `once` event listener is a little tricky since we need to al
1810so 1811 // do our own cleanup if the `once` event is emitted. Therefore, we need 1812 // to wrap the user's listener function with our own listener function. 1813 var wrappedListener = function() { 1814 self.$__remove(function(event, listenerFunc) { 1815 return wrappedListener === listenerFunc; 1816 }, true /* We are removing the wrapped listener */); 1817 1818 listener.apply(this, arguments); 1819 }; 1820 1821 this.$__target.once(event, wrappedListener); 1822 this.$__listeners.push([event, listener, wrappedListener]); 1823 return this; 1824 }, 1825 1826 removeListener: function(event, listener) { 1827 if (typeof event === 'function') { 1828 listener = event; 1829 event = null; 1830 } 1831 1832 if (listener && event) { 1833 this.$__remove(function(curEvent, curListener) { 1834 return event === curEvent && listener === curListener; 1835 }); 1836 } else if (listener) { 1837 this.$__remove(function(curEvent, curListener) { 1838 return listener === curListener; 1839 }); 1840 } else if (event) { 1841 this.removeAllListeners(event); 1842 } 1843 1844 return this; 1845 }, 1846 1847 removeAllListeners: function(event) { 1848 1849 var listeners = this.$__listeners; 1850 var target = this.$__target; 1851 1852 if (event) { 1853 this.$__remove(function(curEvent, curListener) { 1854 return event === curEvent; 1855 }); 1856 } else { 1857 for (var i = listeners.length - 1; i >= 0; i--) { 1858 var cur = listeners[i]; 1859 target.removeListener(cur[INDEX_EVENT], cur[INDEX_USER_LISTENER]); 1860 } 1861 this.$__listeners.length = 0; 1862 } 1863 1864 return this; 1865 } 1866}; 1867 1868function EventEmitterAdapter(target) { 1869 this.$__target = target; 1870} 1871 1872EventEmitterAdapter.prototype = { 1873 on: function(event, listener) { 1874 this.$__target.addEventListener(event, listener); 1875 return this; 1876 }, 1877 1878 once: function(event, listener) { 1879 var self = this; 1880 1881 // need to save this so we can remove it below 1882 var onceListener = function() { 1883 self.$__target.removeEventListener(event, onceListener); 1884 listener(); 1885 }; 1886 this.$__target.addEventListener(event, onceListener); 1887 return this; 1888 }, 1889 1890 removeListener: function(event, listener) { 1891 this.$__target.removeEventListener(event, listener); 1892 return this; 1893 } 1894}; 1895 1896function SubscriptionTracker() { 1897 this.$__subscribeToList = []; 1898} 1899 1900SubscriptionTracker.prototype = { 1901 1902 subscribeTo: function(target, options) { 1903 var addDestroyListener = !options || options.addDestroyListener !== false; 1904 var wrapper; 1905 var nonEE; 1906 var subscribeToList = this.$__subscribeToList; 1907 1908 for (var i=0, len=subscribeToList.length; i<len; i++) { 1909 var cur = subscribeToList[i]; 1910 if (cur.$__target === target) { 1911 wrapper = cur; 1912 break; 1913 } 1914 } 1915 1916 if (!wrapper) { 1917 if (isNonEventEmitter(target)) { 1918 nonEE = new EventEmitterAdapter(target); 1919 } 1920 1921 wrapper = new EventEmitterWrapper(nonEE || target); 1922 if (addDestroyListener && !nonEE) { 1923 wrapper.once(DESTROY, function() { 1924 wrapper.removeAllListeners(); 1925 1926 for (var i = subscribeToList.length - 1; i >= 0; i--) { 1927 if (subscribeToList[i].$__target === target) { 1928 subscribeToList.splice(i, 1); 1929 break; 1930 } 1931 } 1932 }); 1933 } 1934 1935 // Store a reference to the parent SubscriptionTracker so that we can do cleanup 1936 // if the EventEmitterWrapper instance becomes empty (i.e., no active listeners) 1937 wrapper.$__subscribeTo = this; 1938 subscribeToList.push(wrapper); 1939 } 1940 1941 return wrapper; 1942 }, 1943 1944 removeAllListeners: function(target, event) { 1945 var subscribeToList = this.$__subscribeToList; 1946 var i; 1947 1948 if (target) { 1949 for (i = subscribeToList.length - 1; i >= 0; i--) { 1950 var cur = subscribeToList[i]; 1951 if (cur.$__target === target) { 1952 cur.removeAllListeners(event); 1953 1954 if (!cur.$__listeners.length) { 1955 // Do some cleanup if we removed all 1956 // listeners for the target event emitter 1957 subscribeToList.splice(i, 1); 1958 } 1959 1960 break; 1961 } 1962 } 1963 } else { 1964 for (i = subscribeToList.length - 1; i >= 0; i--) { 1965 subscribeToList[i].removeAllListeners(); 1966 } 1967 subscribeToList.length = 0; 1968 } 1969 } 1970}; 1971 1972exports = module.exports = SubscriptionTracker; 1973 1974exports.wrap = function(targetEventEmitter) { 1975 var nonEE; 1976 var wrapper; 1977 1978 if (isNonEventEmitter(targetEventEmitter)) { 1979 nonEE = new EventEmitterAdapter(targetEventEmitter); 1980 } 1981 1982 wrapper = new EventEmitterWrapper(nonEE || targetEventEmitter); 1983 if (!nonEE) { 1984 // we don't set this for non EE types 1985 targetEventEmitter.once(DESTROY, function() { 1986 wrapper.$__listeners.length = 0; 1987 }); 1988 } 1989 1990 return wrapper; 1991}; 1992 1993exports.createTracker = function() { 1994 return new SubscriptionTracker(); 1995}; 1996 1997}); 1998$_mod.def("/raptor-util$3.2.0/copyProps", function(require, exports, module, __filename, __dirname) { module.exports = function copyProps(from, to) { 1999 Object.getOwnPropertyNames(from).forEach(function(name) { 2000 var descriptor = Object.getOwnPropertyDescriptor(from, name); 2001 Object.defineProperty(to, name, descriptor); 2002 }); 2003}; 2004}); 2005$_mod.def("/raptor-util$3.2.0/inherit", function(require, exports, module, __filename, __dirname) { var copyProps = require('/raptor-util$3.2.0/copyProps'/*'./copyProps'*/); 2006 2007function inherit(ctor, superCtor, shouldCopyProps) { 2008 var oldProto = ctor.prototype; 2009 var newProto = ctor.prototype = Object.create(superCtor.prototype, { 2010 constructor: { 2011 value: ctor, 2012 writable: true, 2013 configurable: true 2014 } 2015 }); 2016 if (oldProto && shouldCopyProps !== false) { 2017 copyProps(oldProto, newProto); 2018 } 2019 ctor.$super = superCtor; 2020 ctor.prototype = newProto; 2021 return ctor; 2022} 2023 2024 2025module.exports = inherit; 2026inherit._inherit = inherit; 2027 2028}); 2029$_mod.remap("/marko$4.14.8/dist/runtime/nextTick", "/marko$4.14.8/dist/runtime/nextTick-browser"); 2030$_mod.def("/marko$4.14.8/dist/runtime/nextTick-browser", function(require, exports, module, __filename, __dirname) { /* globals window */ 2031 2032var win = window; 2033var setImmediate = win.setImmediate; 2034 2035if (!setImmediate) { 2036 if (win.postMessage) { 2037 var queue = []; 2038 var messageName = "si"; 2039 win.addEventListener("message", function (event) { 2040 var source = event.source; 2041 if (source == win || !source && event.data === messageName) { 2042 event.stopPropagation(); 2043 if (queue.length > 0) { 2044 var fn = queue.shift(); 2045 fn(); 2046 } 2047 } 2048 }, true); 2049 2050 setImmediate = function (fn) { 2051 queue.push(fn); 2052 win.postMessage(messageName, "*"); 2053 }; 2054 } else { 2055 setImmediate = setTimeout; 2056 } 2057} 2058 2059module.exports = setImmediate; 2060}); 2061$_mod.def("/marko$4.14.8/dist/components/update-manager", function(require, exports, module, __filename, __dirname) { "use strict"; 2062 2063var updatesScheduled = false;
2064var batchStack = []; // A stack of batched updates 2065var unbatchedQueue = []; // Used for scheduled batched updates 2066 2067var nextTick = require('/marko$4.14.8/dist/runtime/nextTick-browser'/*"../runtime/nextTick"*/); 2068 2069/** 2070 * This function is called when we schedule the update of "unbatched" 2071 * updates to components. 2072 */ 2073function updateUnbatchedComponents() { 2074 if (unbatchedQueue.length) { 2075 try { 2076 updateComponents(unbatchedQueue); 2077 } finally { 2078 // Reset the flag now that this scheduled batch update 2079 // is complete so that we can later schedule another 2080 // batched update if needed 2081 updatesScheduled = false; 2082 } 2083 } 2084} 2085 2086function scheduleUpdates() { 2087 if (updatesScheduled) { 2088 // We have already scheduled a batched update for the 2089 // process.nextTick so nothing to do 2090 return; 2091 } 2092 2093 updatesScheduled = true; 2094 2095 nextTick(updateUnbatchedComponents); 2096} 2097 2098function updateComponents(queue) { 2099 // Loop over the components in the queue and update them. 2100 // NOTE: It is okay if the queue grows during the iteration 2101 // since we will still get to them at the end 2102 for (var i = 0; i < queue.length; i++) { 2103 var component = queue[i]; 2104 component.X_(); // Do the actual component update 2105 } 2106 2107 // Clear out the queue by setting the length to zero 2108 queue.length = 0; 2109} 2110 2111function batchUpdate(func) { 2112 // If the batched update stack is empty then this 2113 // is the outer batched update. After the outer 2114 // batched update completes we invoke the "afterUpdate" 2115 // event listeners. 2116 var batch = { 2117 ao_: null 2118 }; 2119 2120 batchStack.push(batch); 2121 2122 try { 2123 func(); 2124 } finally { 2125 try { 2126 // Update all of the components that where queued up 2127 // in this batch (if any) 2128 if (batch.ao_) { 2129 updateComponents(batch.ao_); 2130 } 2131 } finally { 2132 // Now that we have completed the update of all the components 2133 // in this batch we need to remove it off the top of the stack 2134 batchStack.length--; 2135 } 2136 } 2137} 2138 2139function queueComponentUpdate(component) { 2140 var batchStackLen = batchStack.length; 2141 2142 if (batchStackLen) { 2143 // When a batch update is started we push a new batch on to a stack. 2144 // If the stack has a non-zero length then we know that a batch has 2145 // been started so we can just queue the component on the top batch. When 2146 // the batch is ended this component will be updated. 2147 var batch = batchStack[batchStackLen - 1]; 2148 2149 // We default the batch queue to null to avoid creating an Array instance 2150 // unnecessarily. If it is null then we create a new Array, otherwise 2151 // we push it onto the existing Array queue 2152 if (batch.ao_) { 2153 batch.ao_.push(component); 2154 } else { 2155 batch.ao_ = [component]; 2156 } 2157 } else { 2158 // We are not within a batched update. We need to schedule a batch update 2159 // for the process.nextTick (if that hasn't been done already) and we will 2160 // add the component to the unbatched queued 2161 scheduleUpdates(); 2162 unbatchedQueue.push(component); 2163 } 2164} 2165 2166exports.H_ = queueComponentUpdate; 2167exports.N_ = batchUpdate; 2168}); 2169$_mod.main("/marko$4.14.8/dist/morphdom", ""); 2170$_mod.def("/marko$4.14.8/dist/morphdom/specialElHandlers", function(require, exports, module, __filename, __dirname) { function syncBooleanAttrProp(fromEl, toEl, name) { 2171 if (fromEl[name] !== toEl[name]) { 2172 fromEl[name] = toEl[name]; 2173 if (fromEl[name]) { 2174 fromEl.setAttribute(name, ""); 2175 } else { 2176 fromEl.removeAttribute(name, ""); 2177 } 2178 } 2179} 2180 2181// We use a JavaScript class to benefit from fast property lookup 2182function SpecialElHandlers() {} 2183SpecialElHandlers.prototype = { 2184 /** 2185 * Needed for IE. Apparently IE doesn't think that "selected" is an 2186 * attribute when reading over the attributes using selectEl.attributes 2187 */ 2188 OPTION: function (fromEl, toEl) { 2189 syncBooleanAttrProp(fromEl, toEl, "selected"); 2190 }, 2191 /** 2192 * The "value" attribute is special for the <input> element since it sets 2193 * the initial value. Changing the "value" attribute without changing the 2194 * "value" property will have no effect since it is only used to the set the 2195 * initial value. Similar for the "checked" attribute, and "disabled". 2196 */ 2197 INPUT: function (fromEl, toEl) { 2198 syncBooleanAttrProp(fromEl, toEl, "checked"); 2199 syncBooleanAttrProp(fromEl, toEl, "disabled"); 2200 2201 if (fromEl.value != toEl.aJ_) { 2202 fromEl.value = toEl.aJ_; 2203 } 2204 2205 if (fromEl.hasAttribute("value") && !toEl.aK_("value")) { 2206 fromEl.removeAttribute("value"); 2207 } 2208 }, 2209 2210 TEXTAREA: function (fromEl, toEl) { 2211 var newValue = toEl.aJ_; 2212 if (fromEl.value != newValue) { 2213 fromEl.value = newValue; 2214 } 2215 2216 var firstChild = fromEl.firstChild; 2217 if (firstChild) { 2218 // Needed for IE. Apparently IE sets the placeholder as the 2219 // node value and vise versa. This ignores an empty update. 2220 var oldValue = firstChild.nodeValue; 2221 2222 if (oldValue == newValue || !newValue && oldValue == fromEl.placeholder) { 2223 return; 2224 } 2225 2226 firstChild.nodeValue = newValue; 2227 } 2228 }, 2229 SELECT: function (fromEl, toEl) { 2230 if (!toEl.aK_("multiple")) { 2231 var i = -1; 2232 var selected = 0; 2233 var curChild = toEl.S_; 2234 while (curChild) { 2235 if (curChild.aB_ == "OPTION") { 2236 i++; 2237 if (curChild.aK_("selected")) { 2238 selected = i; 2239 } 2240 } 2241 curChild = curChild.aw_; 2242 } 2243 2244 if (fromEl.selectedIndex !== selected) { 2245 fromEl.selectedIndex = selected; 2246 } 2247 } 2248 } 2249}; 2250 2251module.exports = new SpecialElHandlers(); 2252}); 2253$_mod.def("/marko$4.14.8/dist/runtime/vdom/VNode", function(require, exports, module, __filename, __dirname) { /* jshint newcap:false */ 2254function VNode() {} 2255 2256VNode.prototype = { 2257 bv_: function (finalChildCount) { 2258 this.bG_ = finalChildCount; 2259 this.bH_ = 0; 2260 this.bz_ = null; 2261 this.bI_ = null; 2262 this.bw_ = null; 2263 this.bx_ = null; 2264 }, 2265 2266 aF_: null, 2267 2268 get S_() { 2269 var firstChild = this.bz_; 2270 2271 if (firstChild && firstChild.by_) { 2272 var nestedFirstChild = firstChild.S_; 2273 // The first child is a DocumentFragment node. 2274 // If the DocumentFragment node has a first child then we will return that. 2275 // Otherwise, the DocumentFragment node is not *really* the first child and 2276 // we need to skip to its next sibling 2277 return nestedFirstChild || firstChild.aw_; 2278 } 2279 2280 return firstChild; 2281 }, 2282 2283 get aw_() { 2284 var nextSibling = this.bx_; 2285 2286 if (nextSibling) { 2287 if (nextSibling.by_) { 2288 var firstChild = nextSibling.S_; 2289 return firstChild || nextSibling.aw_; 2290 } 2291 } else { 2292 var parentNode = this.bw_; 2293 if (parentNode && parentNode.by_) { 2294 return parentNode.aw_; 2295 } 2296 } 2297 2298 return nextSibling; 2299 }, 2300 2301 bn_: function (child) { 2302 this.bH_++; 2303 2304 if (this.bD_ === true) { 2305 if (child.bJ_) { 2306 var childValue = child.aH_; 2307 this.bC_ = (this.bC_ || "") + childValue; 2308 } else { 2309 throw TypeError(); 2310 } 2311 } else { 2312 var lastChild = this.bI_; 2313 2314 child.bw_ = this; 2315 2316 if (lastChild) { 2317 lastChild.bx_ = child; 2318 } else { 2319 this.bz_ = child; 2320 } 2321 2322 this.bI_ = child; 2323 } 2324 2325 return child; 2326 }, 2327 2328 bE_: function finishChild() { 2329 if (this.bH_ === this.bG_ && this.bw_) { 2330 return this.bw_.bE_(); 2331 } else { 2332 return this; 2333 } 2334 } 2335 2336 // ,toJSON: function() { 2337 // var clone = Object.assign({ 2338 // nodeType: this.nodeType 2339 // }, this); 2340 // 2341 // for (var k in clone) { 2342 // if (k.startsWith('_')) { 2343 // delete clone[k]; 2344 // } 2345 // } 2346 // delete clone._nextSibling; 2347 // delete clone._lastChild; 2348 // delete clone.parentNode; 2349 // return clone; 2350 // } 2351}; 2352 2353module.exports = VNode; 2354}); 2355$_mod.def("/marko$4.14.8/dist/runtime/vdom/VComment", function(require, exports, module, __filename, __dirname) { var VNode = require('/marko$4.14.8/dist/runtime/vdom/VNode'/*"./VNode"*/); 2356var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 2357 2358function VComment(value) { 2359 this.bv_(-1 /* no children */); 2360 this.aH_ = value; 2361} 2362 2363VComment.prototype = { 2364 aD_: 8, 2365 2366 aC_: function (doc) { 2367 var nodeValue = this.aH_; 2368 return doc.createComment(nodeValue); 2369 }, 2370 2371 bp_: function () { 2372 return new VComment(this.aH_); 2373 } 2374}; 2375 2376inherit(VComment, VNode); 2377 2378module.exports = VComment; 2379}); 2380$_mod.def("/marko$4.14.8/dist/runtime/vdom/VDocumentFragment", function(require, exports, module, __filename, __dirname) { var VNode = require('/marko$4.14.8/dist/runtime/vdom/VNode'/*"./VNode"*/); 2381var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 2382var extend = require('/raptor-util$3.2.0/extend'/*"raptor-util/extend"*/); 2383 2384function VDocumentFragmentClone(other) { 2385 extend(this, other); 2386 this.bw_ = null; 2387 this.bx_ = null; 2388} 2389 2390function VDocumentFragment(out) { 2391 this.bv_(null /* childCount */); 2392 this._s_ = out; 2393} 2394 2395VDocumentFragment.prototype = { 2396 aD_: 11, 2397 2398 by_: true, 2399 2400 bp_: function () { 2401 return new VDocumentFragmentClone(this); 2402 }, 2403 2404 aC_: function (doc) { 2405 return doc.createDocumentFragment(); 2406 } 2407}; 2408 2409inherit(VDocumentFragment, VNode); 2410 2411VDocumentFragmentClone.prototype = VDocumentFragment.prototype; 2412 2413module.exports = VDocumentFragment; 2414}); 2415$_mod.def("/marko$4.14.8/dist/runtime/vdom/VElement", function(require, exports, module, __filename, __dirname) { /* jshint newcap:false */
2416var domData = require('/marko$4.14.8/dist/components/dom-data'/*"../../components/dom-data"*/); 2417var vElementByDOMNode = domData._K_; 2418var VNode = require('/marko$4.14.8/dist/runtime/vdom/VNode'/*"./VNode"*/); 2419var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 2420var NS_XLINK = "http://www.w3.org/1999/xlink"; 2421var ATTR_XLINK_HREF = "xlink:href"; 2422var xmlnsRegExp = /^xmlns(:|$)/; 2423 2424var toString = String; 2425 2426var FLAG_IS_SVG = 1; 2427var FLAG_IS_TEXTAREA = 2; 2428var FLAG_SIMPLE_ATTRS = 4; 2429// var FLAG_PRESERVE = 8; 2430var FLAG_CUSTOM_ELEMENT = 16; 2431 2432var defineProperty = Object.defineProperty; 2433 2434var ATTR_HREF = "href"; 2435var EMPTY_OBJECT = Object.freeze({}); 2436 2437function convertAttrValue(type, value) { 2438 if (value === true) { 2439 return ""; 2440 } else if (type == "object") { 2441 return JSON.stringify(value); 2442 } else { 2443 return toString(value); 2444 } 2445} 2446 2447function assign(a, b) { 2448 for (var key in b) { 2449 if (b.hasOwnProperty(key)) { 2450 a[key] = b[key]; 2451 } 2452 } 2453} 2454 2455function setAttribute(el, namespaceURI, name, value) { 2456 if (namespaceURI === null) { 2457 el.setAttribute(name, value); 2458 } else { 2459 el.setAttributeNS(namespaceURI, name, value); 2460 } 2461} 2462 2463function removeAttribute(el, namespaceURI, name) { 2464 if (namespaceURI === null) { 2465 el.removeAttribute(name); 2466 } else { 2467 el.removeAttributeNS(namespaceURI, name); 2468 } 2469} 2470 2471function VElementClone(other) { 2472 this.bz_ = other.bz_; 2473 this.bw_ = null; 2474 this.bx_ = null; 2475 2476 this.aE_ = other.aE_; 2477 this.bA_ = other.bA_; 2478 this.ap_ = other.ap_; 2479 this.bB_ = other.bB_; 2480 this.aB_ = other.aB_; 2481 this._f_ = other._f_; 2482 this.bC_ = other.bC_; 2483 this.aI_ = other.aI_; 2484 this.bD_ = other.bD_; 2485} 2486 2487function VElement(tagName, attrs, key, ownerComponent, childCount, flags, props) { 2488 this.bv_(childCount); 2489 2490 var constId; 2491 var namespaceURI; 2492 var isTextArea; 2493 2494 if (props) { 2495 constId = props.i; 2496 } 2497 2498 if (this._f_ = flags || 0) { 2499 if (flags & FLAG_IS_SVG) { 2500 namespaceURI = "http://www.w3.org/2000/svg"; 2501 } 2502 if (flags & FLAG_IS_TEXTAREA) { 2503 isTextArea = true; 2504 } 2505 } 2506 2507 this.aE_ = key; 2508 this.aF_ = ownerComponent; 2509 this.bA_ = attrs || EMPTY_OBJECT; 2510 this.ap_ = props || EMPTY_OBJECT; 2511 this.bB_ = namespaceURI; 2512 this.aB_ = tagName; 2513 this.bC_ = null; 2514 this.aI_ = constId; 2515 this.bD_ = isTextArea; 2516} 2517 2518VElement.prototype = { 2519 aD_: 1, 2520 2521 bp_: function () { 2522 return new VElementClone(this); 2523 }, 2524 2525 /** 2526 * Shorthand method for creating and appending an HTML element 2527 * 2528 * @param {String} tagName The tag name (e.g. "div") 2529 * @param {int|null} attrCount The number of attributes (or `null` if not known) 2530 * @param {int|null} childCount The number of child nodes (or `null` if not known) 2531 */ 2532 e: function (tagName, attrs, key, ownerComponent, childCount, flags, props) { 2533 var child = this.bn_(new VElement(tagName, attrs, key, ownerComponent, childCount, flags, props)); 2534 2535 if (childCount === 0) { 2536 return this.bE_(); 2537 } else { 2538 return child; 2539 } 2540 }, 2541 2542 /** 2543 * Shorthand method for creating and appending an HTML element with a dynamic namespace 2544 * 2545 * @param {String} tagName The tag name (e.g. "div") 2546 * @param {int|null} attrCount The number of attributes (or `null` if not known) 2547 * @param {int|null} childCount The number of child nodes (or `null` if not known) 2548 */ 2549 ed: function (tagName, attrs, key, ownerComponent, childCount, flags, props) { 2550 var child = this.bn_(VElement.bo_(tagName, attrs, key, ownerComponent, childCount, flags, props)); 2551 2552 if (childCount === 0) { 2553 return this.bE_(); 2554 } else { 2555 return child; 2556 } 2557 }, 2558 2559 /** 2560 * Shorthand method for creating and appending a static node. The provided node is automatically cloned 2561 * using a shallow clone since it will be mutated as a result of setting `nextSibling` and `parentNode`. 2562 * 2563 * @param {String} value The value for the new Comment node 2564 */ 2565 n: function (node, ownerComponent) { 2566 node = node.bp_(); 2567 node.aF_ = ownerComponent; 2568 this.bn_(node); 2569 return this.bE_(); 2570 }, 2571 2572 aC_: function (doc) { 2573 var namespaceURI = this.bB_; 2574 var tagName = this.aB_; 2575 2576 var attributes = this.bA_; 2577 var flags = this._f_; 2578 2579 var el = namespaceURI !== undefined ? doc.createElementNS(namespaceURI, tagName) : doc.createElement(tagName); 2580 2581 if (flags & FLAG_CUSTOM_ELEMENT) { 2582 assign(el, attributes); 2583 } else { 2584 for (var attrName in attributes) { 2585 var attrValue = attributes[attrName]; 2586 2587 if (attrValue !== false && attrValue != null) { 2588 var type = typeof attrValue; 2589 2590 if (type !== "string") { 2591 // Special attributes aren't copied to the real DOM. They are only 2592 // kept in the virtual attributes map 2593 attrValue = convertAttrValue(type, attrValue); 2594 } 2595 2596 if (attrName == ATTR_XLINK_HREF) { 2597 setAttribute(el, NS_XLINK, ATTR_HREF, attrValue); 2598 } else { 2599 el.setAttribute(attrName, attrValue); 2600 } 2601 } 2602 } 2603 2604 if (flags & FLAG_IS_TEXTAREA) { 2605 el.value = this.aJ_; 2606 } 2607 } 2608 2609 vElementByDOMNode.set(el, this); 2610 2611 return el; 2612 }, 2613 2614 aK_: function (name) { 2615 // We don't care about the namespaces since the there 2616 // is no chance that attributes with the same name will have 2617 // different namespaces 2618 var value = this.bA_[name]; 2619 return value != null && value !== false; 2620 } 2621}; 2622 2623inherit(VElement, VNode); 2624 2625var proto = VElementClone.prototype = VElement.prototype; 2626 2627["checked", "selected", "disabled"].forEach(function (name) { 2628 defineProperty(proto, name, { 2629 get: function () { 2630 var value = this.bA_[name]; 2631 return value !== false && value != null; 2632 } 2633 }); 2634}); 2635 2636defineProperty(proto, "aJ_", { 2637 get: function () { 2638 var value = this.bC_; 2639 if (value == null) { 2640 value = this.bA_.value; 2641 } 2642 return value != null ? toString(value) : this.bA_.type === "checkbox" || this.bA_.type === "radio" ? "on" : ""; 2643 } 2644}); 2645 2646VElement.bo_ = function (tagName, attrs, key, ownerComponent, childCount, flags, props) { 2647 var namespace = attrs && attrs.xmlns; 2648 tagName = namespace ? tagName : tagName.toUpperCase(); 2649 var element = new VElement(tagName, attrs, key, ownerComponent, childCount, flags, props); 2650 element.bB_ = namespace; 2651 return element; 2652}; 2653 2654VElement.bF_ = function (attrs) { 2655 // By default this static method is a no-op, but if there are any 2656 // compiled components that have "no-update" attributes then 2657 // `preserve-attrs.js` will be imported and this method will be replaced 2658 // with a method that actually does something 2659 return attrs; 2660}; 2661 2662function virtualizeElement(node, virtualizeChildNodes) { 2663 var attributes = node.attributes; 2664 var attrCount = attributes.length; 2665 2666 var attrs; 2667 2668 if (attrCount) { 2669 attrs = {}; 2670 for (var i = 0; i < attrCount; i++) { 2671 var attr = attributes[i]; 2672 var attrName = attr.name; 2673 if (!xmlnsRegExp.test(attrName) && attrName !== "data-marko") { 2674 var attrNamespaceURI = attr.namespaceURI; 2675 if (attrNamespaceURI === NS_XLINK) { 2676 attrs[ATTR_XLINK_HREF] = attr.value; 2677 } else { 2678 attrs[attrName] = attr.value; 2679 } 2680 } 2681 } 2682 } 2683 2684 var flags = 0; 2685 2686 var tagName = node.nodeName; 2687 if (tagName === "TEXTAREA") { 2688 flags |= FLAG_IS_TEXTAREA; 2689 } 2690 2691 var vdomEl = new VElement(tagName, attrs, null /*key*/ 2692 , null /*ownerComponent*/ 2693 , 0 /*child count*/ 2694 , flags, null /*props*/ 2695 ); 2696 if (node.namespaceURI !== "http://www.w3.org/1999/xhtml") { 2697 vdomEl.bB_ = node.namespaceURI; 2698 } 2699 2700 if (vdomEl.bD_) { 2701 vdomEl.bC_ = node.value; 2702 } else { 2703 if (virtualizeChildNodes) { 2704 virtualizeChildNodes(node, vdomEl); 2705 } 2706 } 2707 2708 return vdomEl; 2709} 2710 2711VElement.az_ = virtualizeElement; 2712 2713VElement.aA_ = function (fromEl, vFromEl, toEl) { 2714 var removePreservedAttributes = VElement.bF_; 2715 2716 var fromFlags = vFromEl._f_; 2717 var toFlags = toEl._f_; 2718 2719 vElementByDOMNode.set(fromEl, toEl); 2720 2721 var attrs = toEl.bA_; 2722 var props = toEl.ap_; 2723 2724 if (toFlags & FLAG_CUSTOM_ELEMENT) { 2725 return assign(fromEl, attrs); 2726 } 2727 2728 var attrName; 2729 2730 // We use expando properties to associate the previous HTML 2731 // attributes provided as part of the VDOM node with the 2732 // real VElement DOM node. When diffing attributes, 2733 // we only use our internal representation of the attributes. 2734 // When diffing for the first time it's possible that the 2735 // real VElement node will not have the expando property 2736 // so we build the attribute map from the expando property 2737 2738 var oldAttrs = vFromEl.bA_; 2739 2740 if (oldAttrs) { 2741 if (oldAttrs === attrs) { 2742 // For constant attributes the same object will be provided 2743 // every render and we can use that to our advantage to 2744 // not waste time diffing a constant, immutable attribute 2745 // map. 2746 return; 2747 } else { 2748 oldAttrs = removePreservedAttributes(oldAttrs, props); 2749 } 2750 } 2751 2752 var attrValue; 2753 2754 if (toFlags & FLAG_SIMPLE_ATTRS && fromFlags & FLAG_SIMPLE_ATTRS) { 2755 if (oldAttrs["class"] !== (attrValue = attrs["class"])) { 2756 fromEl.className = attrValue; 2757 } 2758 if (oldAttrs.id !== (attrValue = attrs.id)) { 2759 fromEl.id = attrValue; 2760 } 2761 if (oldAttrs.style !== (attrValue = attrs.style)) { 2762 fromEl.style.cssText = attrValue; 2763 } 2764 return; 2765 } 2766 2767 // In some cases we only want to set an attribute value for the first 2768 // render or we don't want certain attributes to be touched. To support 2769 // that use case we delete out all of the preserved attributes 2770 // so it's as if they never existed. 2771 attrs = removePreservedAttributes(attrs, props, true); 2772 2773 var namespaceURI; 2774 2775 // Loop over all of the attributes in the attribute map and compare 2776 // them to the value in the old map. However, if the value is 2777 // null/undefined/false then we want to remove the attribute 2778 for (attrName in attrs) { 2779 attrValue = attrs[attrName]; 2780 namespaceURI = null; 2781 2782 if (attrName === ATTR_XLINK_HREF) { 2783 namespaceURI = NS_XLINK; 2784 attrName = ATTR_HREF; 2785 } 2786 2787 if (attrValue == null || attrValue === false) { 2788 removeAttribute(fromEl, namespaceURI, attrName); 2789 } else if (oldAttrs[attrName] !== attrValue) { 2790 var type = typeof attrValue; 2791 2792 if (type !== "string") { 2793 attrValue = convertAttrValue(type, attrValue); 2794 } 2795 2796 setAttribute(fromEl, namespaceURI, attrName, attrValue); 2797 } 2798 } 2799 2800 // If there are any old attributes that are not in the new set of attributes 2801 // then we need to remove those attributes from the target node 2802 // 2803 // NOTE: We can skip this if the the element is keyed because if the element
2804 // is keyed then we know we already processed all of the attributes for 2805 // both the target and original element since target VElement nodes will 2806 // have all attributes declared. However, we can only skip if the node 2807 // was not a virtualized node (i.e., a node that was not rendered by a 2808 // Marko template, but rather a node that was created from an HTML 2809 // string or a real DOM node). 2810 if (toEl.aE_ === null) { 2811 for (attrName in oldAttrs) { 2812 if (!(attrName in attrs)) { 2813 if (attrName === ATTR_XLINK_HREF) { 2814 fromEl.removeAttributeNS(ATTR_XLINK_HREF, ATTR_HREF); 2815 } else { 2816 fromEl.removeAttribute(attrName); 2817 } 2818 } 2819 } 2820 } 2821}; 2822 2823module.exports = VElement; 2824}); 2825$_mod.def("/marko$4.14.8/dist/runtime/vdom/VText", function(require, exports, module, __filename, __dirname) { var VNode = require('/marko$4.14.8/dist/runtime/vdom/VNode'/*"./VNode"*/); 2826var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 2827 2828function VText(value) { 2829 this.bv_(-1 /* no children */); 2830 this.aH_ = value; 2831} 2832 2833VText.prototype = { 2834 bJ_: true, 2835 2836 aD_: 3, 2837 2838 aC_: function (doc) { 2839 return doc.createTextNode(this.aH_); 2840 }, 2841 2842 bp_: function () { 2843 return new VText(this.aH_); 2844 } 2845}; 2846 2847inherit(VText, VNode); 2848 2849module.exports = VText; 2850}); 2851$_mod.def("/marko$4.14.8/dist/runtime/vdom/VComponent", function(require, exports, module, __filename, __dirname) { var VNode = require('/marko$4.14.8/dist/runtime/vdom/VNode'/*"./VNode"*/); 2852var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 2853 2854function VComponent(component, key, ownerComponent, preserve) { 2855 this.bv_(null /* childCount */); 2856 this.aE_ = key; 2857 this._b_ = component; 2858 this.aF_ = ownerComponent; 2859 this.aG_ = preserve; 2860} 2861 2862VComponent.prototype = { 2863 aD_: 2 2864}; 2865 2866inherit(VComponent, VNode); 2867 2868module.exports = VComponent; 2869}); 2870$_mod.def("/marko$4.14.8/dist/runtime/vdom/VFragment", function(require, exports, module, __filename, __dirname) { var domData = require('/marko$4.14.8/dist/components/dom-data'/*"../../components/dom-data"*/); 2871var keysByDOMNode = domData._M_; 2872var vElementByDOMNode = domData._K_; 2873var VNode = require('/marko$4.14.8/dist/runtime/vdom/VNode'/*"./VNode"*/); 2874var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 2875var createFragmentNode = require('/marko$4.14.8/dist/morphdom/fragment'/*"../../morphdom/fragment"*/)._U_; 2876 2877function VFragment(key, ownerComponent, preserve) { 2878 this.bv_(null /* childCount */); 2879 this.aE_ = key; 2880 this.aF_ = ownerComponent; 2881 this.aG_ = preserve; 2882} 2883 2884VFragment.prototype = { 2885 aD_: 12, 2886 aC_: function () { 2887 var fragment = createFragmentNode(); 2888 keysByDOMNode.set(fragment, this.aE_); 2889 vElementByDOMNode.set(fragment, this); 2890 return fragment; 2891 } 2892}; 2893 2894inherit(VFragment, VNode); 2895 2896module.exports = VFragment; 2897}); 2898$_mod.def("/marko$4.14.8/dist/runtime/vdom/vdom", function(require, exports, module, __filename, __dirname) { var VNode = require('/marko$4.14.8/dist/runtime/vdom/VNode'/*"./VNode"*/); 2899var VComment = require('/marko$4.14.8/dist/runtime/vdom/VComment'/*"./VComment"*/); 2900var VDocumentFragment = require('/marko$4.14.8/dist/runtime/vdom/VDocumentFragment'/*"./VDocumentFragment"*/); 2901var VElement = require('/marko$4.14.8/dist/runtime/vdom/VElement'/*"./VElement"*/); 2902var VText = require('/marko$4.14.8/dist/runtime/vdom/VText'/*"./VText"*/); 2903var VComponent = require('/marko$4.14.8/dist/runtime/vdom/VComponent'/*"./VComponent"*/); 2904var VFragment = require('/marko$4.14.8/dist/runtime/vdom/VFragment'/*"./VFragment"*/); 2905 2906var defaultDocument = typeof document != "undefined" && document; 2907var specialHtmlRegexp = /[&<]/; 2908 2909function virtualizeChildNodes(node, vdomParent) { 2910 var curChild = node.firstChild; 2911 while (curChild) { 2912 vdomParent.bn_(virtualize(curChild)); 2913 curChild = curChild.nextSibling; 2914 } 2915} 2916 2917function virtualize(node) { 2918 switch (node.nodeType) { 2919 case 1: 2920 return VElement.az_(node, virtualizeChildNodes); 2921 case 3: 2922 return new VText(node.nodeValue); 2923 case 8: 2924 return new VComment(node.nodeValue); 2925 case 11: 2926 var vdomDocFragment = new VDocumentFragment(); 2927 virtualizeChildNodes(node, vdomDocFragment); 2928 return vdomDocFragment; 2929 } 2930} 2931 2932function virtualizeHTML(html, doc) { 2933 if (!specialHtmlRegexp.test(html)) { 2934 return new VText(html); 2935 } 2936 2937 var container = doc.createElement("body"); 2938 container.innerHTML = html; 2939 var vdomFragment = new VDocumentFragment(); 2940 2941 var curChild = container.firstChild; 2942 while (curChild) { 2943 vdomFragment.bn_(virtualize(curChild)); 2944 curChild = curChild.nextSibling; 2945 } 2946 2947 return vdomFragment; 2948} 2949 2950var Node_prototype = VNode.prototype; 2951 2952/** 2953 * Shorthand method for creating and appending a Text node with a given value 2954 * @param {String} value The text value for the new Text node 2955 */ 2956Node_prototype.t = function (value) { 2957 var type = typeof value; 2958 var vdomNode; 2959 2960 if (type !== "string") { 2961 if (value == null) { 2962 value = ""; 2963 } else if (type === "object") { 2964 if (value.toHTML) { 2965 vdomNode = virtualizeHTML(value.toHTML(), document); 2966 } 2967 } 2968 } 2969 2970 this.bn_(vdomNode || new VText(value.toString())); 2971 return this.bE_(); 2972}; 2973 2974/** 2975 * Shorthand method for creating and appending a Comment node with a given value 2976 * @param {String} value The value for the new Comment node 2977 */ 2978Node_prototype.c = function (value) { 2979 this.bn_(new VComment(value)); 2980 return this.bE_(); 2981}; 2982 2983Node_prototype.bt_ = function () { 2984 return this.bn_(new VDocumentFragment()); 2985}; 2986 2987exports.aX_ = VComment; 2988exports.aW_ = VDocumentFragment; 2989exports.ay_ = VElement; 2990exports.aY_ = VText; 2991exports.aZ_ = VComponent; 2992exports.b__ = VFragment; 2993exports.az_ = virtualize; 2994exports.ba_ = virtualizeHTML; 2995exports.bb_ = defaultDocument; 2996}); 2997$_mod.def("/marko$4.14.8/dist/morphdom/index", function(require, exports, module, __filename, __dirname) { "use strict"; 2998 2999var specialElHandlers = require('/marko$4.14.8/dist/morphdom/specialElHandlers'/*"./specialElHandlers"*/); 3000var componentsUtil = require('/marko$4.14.8/dist/components/util-browser'/*"../components/util"*/);
3001var existingComponentLookup = componentsUtil.a_; 3002var destroyNodeRecursive = componentsUtil.c_; 3003var addComponentRootToKeyedElements = componentsUtil._V_; 3004var normalizeComponentKey = componentsUtil.ar_; 3005var VElement = require('/marko$4.14.8/dist/runtime/vdom/vdom'/*"../runtime/vdom/vdom"*/).ay_; 3006var virtualizeElement = VElement.az_; 3007var morphAttrs = VElement.aA_; 3008var eventDelegation = require('/marko$4.14.8/dist/components/event-delegation'/*"../components/event-delegation"*/); 3009var fragment = require('/marko$4.14.8/dist/morphdom/fragment'/*"./fragment"*/); 3010var helpers = require('/marko$4.14.8/dist/morphdom/helpers'/*"./helpers"*/); 3011var domData = require('/marko$4.14.8/dist/components/dom-data'/*"../components/dom-data"*/); 3012var keysByDOMNode = domData._M_; 3013var componentByDOMNode = domData.d_; 3014var vElementByDOMNode = domData._K_; 3015var detachedByDOMNode = domData._L_; 3016 3017var insertBefore = helpers.as_; 3018var insertAfter = helpers.av_; 3019var nextSibling = helpers.aw_; 3020var firstChild = helpers.S_; 3021var removeChild = helpers.ax_; 3022var createFragmentNode = fragment._U_; 3023var beginFragmentNode = fragment.au_; 3024 3025var ELEMENT_NODE = 1; 3026var TEXT_NODE = 3; 3027var COMMENT_NODE = 8; 3028var COMPONENT_NODE = 2; 3029var FRAGMENT_NODE = 12; 3030 3031// var FLAG_IS_SVG = 1; 3032// var FLAG_IS_TEXTAREA = 2; 3033// var FLAG_SIMPLE_ATTRS = 4; 3034var FLAG_PRESERVE = 8; 3035// var FLAG_CUSTOM_ELEMENT = 16; 3036 3037function isAutoKey(key) { 3038 return !/^@/.test(key); 3039} 3040 3041function compareNodeNames(fromEl, toEl) { 3042 return fromEl.aB_ === toEl.aB_; 3043} 3044 3045function onNodeAdded(node, componentsContext) { 3046 if (node.nodeType === 1) { 3047 eventDelegation._I_(node, componentsContext); 3048 } 3049} 3050 3051function morphdom(fromNode, toNode, doc, componentsContext) { 3052 var globalComponentsContext; 3053 var isRerenderInBrowser = false; 3054 var keySequences = {}; 3055 3056 if (componentsContext) { 3057 globalComponentsContext = componentsContext.O_; 3058 isRerenderInBrowser = globalComponentsContext.Q_; 3059 } 3060 3061 function insertVirtualNodeBefore(vNode, key, referenceEl, parentEl, ownerComponent, parentComponent) { 3062 var realNode = vNode.aC_(doc); 3063 insertBefore(realNode, referenceEl, parentEl); 3064 3065 if (vNode.aD_ === ELEMENT_NODE || vNode.aD_ === FRAGMENT_NODE) { 3066 if (key) { 3067 keysByDOMNode.set(realNode, key); 3068 (isAutoKey(key) ? parentComponent : ownerComponent).v_[key] = realNode; 3069 } 3070 3071 morphChildren(realNode, vNode, parentComponent); 3072 } 3073 3074 onNodeAdded(realNode, componentsContext); 3075 } 3076 3077 function insertVirtualComponentBefore(vComponent, referenceNode, referenceNodeParentEl, component, key, ownerComponent, parentComponent) { 3078 var rootNode = component.h_ = insertBefore(createFragmentNode(), referenceNode, referenceNodeParentEl); 3079 componentByDOMNode.set(rootNode, component); 3080 3081 if (key && ownerComponent) { 3082 key = normalizeComponentKey(key, parentComponent.id); 3083 addComponentRootToKeyedElements(ownerComponent.v_, key, rootNode, component.id); 3084 keysByDOMNode.set(rootNode, key); 3085 } 3086 3087 morphComponent(component, vComponent); 3088 } 3089 3090 function morphComponent(component, vComponent) { 3091 morphChildren(component.h_, vComponent, component); 3092 } 3093 3094 var detachedNodes = []; 3095 3096 function detachNode(node, parentNode, ownerComponent) { 3097 if (node.nodeType === ELEMENT_NODE || node.nodeType === FRAGMENT_NODE) { 3098 detachedNodes.push(node); 3099 detachedByDOMNode.set(node, ownerComponent || true); 3100 } else { 3101 destroyNodeRecursive(node); 3102 removeChild(node); 3103 } 3104 } 3105 3106 function destroyComponent(component) { 3107 component.destroy(); 3108 } 3109 3110 function morphChildren(fromNode, toNode, parentComponent) { 3111 var curFromNodeChild = firstChild(fromNode); 3112 var curToNodeChild = toNode.S_; 3113 3114 var curToNodeKey; 3115 var curFromNodeKey; 3116 var curToNodeType; 3117 3118 var fromNextSibling; 3119 var toNextSibling; 3120 var matchingFromEl; 3121 var matchingFromComponent;
3122 var curVFromNodeChild; 3123 var fromComponent; 3124 3125 outer: while (curToNodeChild) { 3126 toNextSibling = curToNodeChild.aw_; 3127 curToNodeType = curToNodeChild.aD_; 3128 curToNodeKey = curToNodeChild.aE_; 3129 3130 var ownerComponent = curToNodeChild.aF_ || parentComponent; 3131 var referenceComponent; 3132 3133 if (curToNodeType === COMPONENT_NODE) { 3134 var component = curToNodeChild._b_; 3135 if ((matchingFromComponent = existingComponentLookup[component.id]) === undefined) { 3136 if (isRerenderInBrowser === true) { 3137 var rootNode = beginFragmentNode(curFromNodeChild, fromNode); 3138 component.h_ = rootNode; 3139 componentByDOMNode.set(rootNode, component); 3140 3141 if (ownerComponent && curToNodeKey) { 3142 curToNodeKey = normalizeComponentKey(curToNodeKey, parentComponent.id); 3143 addComponentRootToKeyedElements(ownerComponent.v_, curToNodeKey, rootNode, component.id); 3144 3145 keysByDOMNode.set(rootNode, curToNodeKey); 3146 } 3147 3148 morphComponent(component, curToNodeChild); 3149 3150 curFromNodeChild = nextSibling(rootNode); 3151 } else { 3152 insertVirtualComponentBefore(curToNodeChild, curFromNodeChild, fromNode, component, curToNodeKey, ownerComponent, parentComponent); 3153 } 3154 } else { 3155 if (matchingFromComponent.h_ !== curFromNodeChild) { 3156 if (curFromNodeChild && (fromComponent = componentByDOMNode.get(curFromNodeChild)) && globalComponentsContext._z_[fromComponent.id] === undefined) { 3157 // The component associated with the current real DOM node was not rendered 3158 // so we should just remove it out of the real DOM by destroying it 3159 curFromNodeChild = nextSibling(fromComponent.h_); 3160 destroyComponent(fromComponent); 3161 continue; 3162 } 3163 3164 // We need to move the existing component into 3165 // the correct location 3166 insertBefore(matchingFromComponent.h_, curFromNodeChild, fromNode); 3167 } else { 3168 curFromNodeChild = curFromNodeChild && nextSibling(curFromNodeChild); 3169 } 3170 3171 if (!curToNodeChild.aG_) { 3172 morphComponent(component, curToNodeChild); 3173 } 3174 } 3175 3176 curToNodeChild = toNextSibling; 3177 continue; 3178 } else if (curToNodeKey) { 3179 curVFromNodeChild = undefined; 3180 curFromNodeKey = undefined; 3181 var curToNodeKeyOriginal = curToNodeKey; 3182 3183 if (isAutoKey(curToNodeKey)) { 3184 if (ownerComponent !== parentComponent) { 3185 curToNodeKey += ":" + ownerComponent.id; 3186 } 3187 referenceComponent = parentComponent; 3188 } else { 3189 referenceComponent = ownerComponent; 3190 } 3191 3192 var keySequence = keySequences[referenceComponent.id] || (keySequences[referenceComponent.id] = globalComponentsContext._A_()); 3193 3194 // We have a keyed element. This is the fast path for matching 3195 // up elements 3196 curToNodeKey = keySequence._i_(curToNodeKey); 3197 3198 if (curFromNodeChild) { 3199 curFromNodeKey = keysByDOMNode.get(curFromNodeChild); 3200 curVFromNodeChild = vElementByDOMNode.get(curFromNodeChild); 3201 fromNextSibling = nextSibling(curFromNodeChild); 3202 } 3203 3204 if (curFromNodeKey === curToNodeKey) { 3205 // Elements line up. Now we just have to make sure they are compatible 3206 if ((curToNodeChild._f_ & FLAG_PRESERVE) === 0 && !curToNodeChild.aG_) { 3207 // We just skip over the fromNode if it is preserved 3208 3209 if (compareNodeNames(curToNodeChild, curVFromN
3209odeChild)) { 3210 morphEl(curFromNodeChild, curVFromNodeChild, curToNodeChild, curToNodeKey, ownerComponent, parentComponent); 3211 } else { 3212 // Remove the old node 3213 detachNode(curFromNodeChild, fromNode, ownerComponent); 3214 3215 // Incompatible nodes. Just move the target VNode into the DOM at this position 3216 insertVirtualNodeBefore(curToNodeChild, curToNodeKey, curFromNodeChild, fromNode, ownerComponent, parentComponent); 3217 } 3218 } else { 3219 // this should be preserved. 3220 } 3221 } else { 3222 if ((matchingFromEl = referenceComponent.v_[curToNodeKey]) === undefined) { 3223 if (isRerenderInBrowser === true && curFromNodeChild) { 3224 if (curFromNodeChild.nodeType === ELEMENT_NODE && curFromNodeChild.nodeName === curToNodeChild.aB_) { 3225 curVFromNodeChild = virtualizeElement(curFromNodeChild); 3226 keysByDOMNode.set(curFromNodeChild, curToNodeKey); 3227 morphEl(curFromNodeChild, curVFromNodeChild, curToNodeChild, curToNodeKey, ownerComponent, parentComponent); 3228 curToNodeChild = toNextSibling; 3229 curFromNodeChild = fromNextSibling; 3230 continue; 3231 } else if (curToNodeChild.aD_ === FRAGMENT_NODE && curFromNodeChild.nodeType === COMMENT_NODE) { 3232 var content = curFromNodeChild.nodeValue; 3233 if (content == "F#" + curToNodeKeyOriginal) { 3234 var endNode = curFromNodeChild; 3235 while (endNode.nodeType !== COMMENT_NODE || endNode.nodeValue !== "F/") endNode = endNode.nextSibling; 3236 3237 var fragment = createFragmentNode(curFromNodeChild, endNode.nextSibling, fromNode); 3238 keysByDOMNode.set(fragment, curToNodeKey); 3239 vElementByDOMNode.set(fragment, curToNodeChild); 3240 referenceComponent.v_[curToNodeKey] = fragment; 3241 removeChild(curFromNodeChild); 3242 removeChild(endNode); 3243 3244 if (!curToNodeChild.aG_) { 3245 morphChildren(fragment, curToNodeChild, parentComponent); 3246 } 3247 3248 curToNodeChild = toNextSibling; 3249 curFromNodeChild = fragment.nextSibling; 3250 continue; 3251 } 3252 } 3253 } 3254 3255 insertVirtualNodeBefore(curToNodeChild, curToNodeKey, curFromNodeChild, fromNode, ownerComponent, parentComponent); 3256 fromNextSibling = curFromNodeChild; 3257 } else { 3258 if (detachedByDOMNode.get(matchingFromEl) !== undefined) { 3259 detachedByDOMNode.set(matchingFromEl, undefined); 3260 } 3261 3262 curVFromNodeChild = vElementByDOMNode.get(matchingFromEl); 3263 3264 if (compareNodeNames(curVFromNodeChild, curToNodeChild)) { 3265 if (fromNextSibling === matchingFromEl) { 3266 // Single element removal: 3267 // A <-> A 3268 // B <-> C <-- We are here 3269 // C D 3270 // D 3271 // 3272 // Single element swap: 3273 // A <-> A 3274 // B <-> C <-- We are here 3275 // C B 3276 3277 if (toNextSibling && toNextSibling.aE_ === curFromNodeKey) { 3278 // Single element swap 3279 3280 // We want to stay on the current real DOM node 3281 fromNextSibling = curFromNodeChild; 3282 3283 // But move the matching element into place 3284 insertBefore(matchingFromEl, curFromNodeChild, fromNode); 3285 } else { 3286 // Single element removal 3287 3288 // We need to remove the current real DOM node 3289 // and the matching real DOM node will fall into 3290 // place. We will continue diffing with next sibling 3291 // after the real DOM node that just fell into place 3292 fromNextSibling = nextSibling(fromNextSibling); 3293 3294 if (curFromNodeChild) { 3295 detachNode(curFromNodeChild, fromNode, ownerComponent); 3296 } 3297 } 3298 } else { 3299 // A <-> A 3300 // B <-> D <-- We are here 3301 // C 3302 // D 3303 3304 // We need to move the matching node into place 3305 insertAfter(matchingFromEl, curFromNodeChild, fromNode); 3306 3307 if (curFromNodeChild) { 3308 detachNode(curFromNodeChild, fromNode, ownerComponent); 3309 } 3310 } 3311 3312 if ((curToNodeChild._f_ & FLAG_PRESERVE) === 0) { 3313 morphEl(matchingFromEl, curVFromN
3313odeChild, curToNodeChild, curToNodeKey, ownerComponent, parentComponent); 3314 } 3315 } else { 3316 insertVirtualNodeBefore(curToNodeChild, curToNodeKey, curFromNodeChild, fromNode, ownerComponent, parentComponent); 3317 detachNode(matchingFromEl, fromNode, ownerComponent); 3318 } 3319 } 3320 } 3321 3322 curToNodeChild = toNextSibling; 3323 curFromNodeChild = fromNextSibling; 3324 continue; 3325 } 3326 3327 // The know the target node is not a VComponent node and we know 3328 // it is also not a preserve node. Let's now match up the HTML 3329 // element, text node, comment, etc. 3330 while (curFromNodeChild) { 3331 fromNextSibling = nextSibling(curFromNodeChild); 3332 3333 if (fromComponent = componentByDOMNode.get(curFromNodeChild)) { 3334 // The current "to" element is not associated with a component, 3335 // but the current "from" element is associated with a component 3336 3337 // Even if we destroy the current component in the original 3338 // DOM or not, we still need to skip over it since it is 3339 // not compatible with the current "to" node 3340 curFromNodeChild = fromNextSibling; 3341 3342 if (!globalComponentsContext._z_[fromComponent.id]) { 3343 destroyComponent(fromComponent); 3344 } 3345 3346 continue; // Move to the next "from" node 3347 } 3348 3349 var curFromNodeType = curFromNodeChild.nodeType; 3350 3351 var isCompatible = undefined; 3352 3353 if (curFromNodeType === curToNodeType) { 3354 if (curFromNodeType === ELEMENT_NODE) { 3355 // Both nodes being compared are Element nodes 3356 curVFromNodeChild = vElementByDOMNode.get(curFromNodeChild); 3357 if (curVFromNodeChild === undefined) { 3358 if (isRerenderInBrowser === true) { 3359 curVFromNodeChild = virtualizeElement(curFromNodeChild); 3360 } else { 3361 // Skip over nodes that don't look like ours... 3362 curFromNodeChild = fromNextSibling; 3363 continue; 3364 } 3365 } else if (curFromNodeKey = curVFromNodeChild.aE_) { 3366 // We have a keyed element here but our target VDOM node 3367 // is not keyed so this not doesn't belong 3368 isCompatible = false; 3369 } 3370 3371 isCompatible = isCompatible !== false && compareNodeNames(curVFromNodeChild, curToNodeChild) === true; 3372 3373 if (isCompatible === true) { 3374 // We found compatible DOM elements so transform 3375 // the current "from" node to match the current 3376 // target DOM node. 3377 morphEl(curFromNodeChild, curVFromNodeChild, curToNodeChild, curToNodeKey, ownerComponent, parentComponent); 3378 } 3379 } else if (curFromNodeType === TEXT_NODE || curFromNodeType === COMMENT_NODE) { 3380 // Both nodes being compared are Text or Comment nodes 3381 isCompatible = true; 3382 // Simply update nodeValue on the original node to 3383 // change the text value 3384 if (curFromNodeChild.nodeValue !== curToNodeChild.aH_) { 3385 curFromNodeChild.nodeValue = curToNodeChild.aH_; 3386 } 3387 } 3388 } 3389 3390 if (isCompatible === true) { 3391 // Advance both the "to" child and the "from" child since we found a match 3392 curToNodeChild = toNextSibling; 3393 curFromNodeChild = fromNextSibling; 3394 continue outer; 3395 } 3396 3397 if (curFromNodeKey) { 3398 if (globalComponentsContext._x_[curFromNodeKey] === undefined) { 3399 detachNode(curFromNodeChild, fromNode, ownerComponent); 3400 } 3401 } else { 3402 detachNode(curFromNodeChild, fromNode, ownerComponent); 3403 } 3404 3405 curFromNodeChild = fromNextSibling; 3406 } // END: while (curFromNodeChild) 3407 3408 // If we got this far then we did not find a candidate match for 3409 // our "to node" and we exhausted all of the children "from" 3410 // nodes. Therefore, we will just append the current "to" node 3411 // to the end 3412 insertVirtualNodeBefore(curToNodeChild, curToNodeKey, curFromNodeChild, fromNode, ownerComponent, parentComponent); 3413 3414 curToNodeChild = toNextSibling; 3415 curFromNodeChild = fromNextSibling; 3416 } 3417 3418 // We have processed all of the "to nodes". 3419 if (fromNode.at_) { 3420 // If we are in an unfinished fragment, we have reached the end of the nodes 3421 // we were matching up and need to end the fragment 3422 fromNode.at_(curFromNodeChild); 3423 } else { 3424 // If curFromNodeChild is non-null then we still have some from nodes 3425 // left over that need to be removed 3426 while (curFromNodeChild) { 3427 fromNextSibling = nextSibling(curFromNodeChild); 3428 3429 if (fromComponent = componentByDOMNode.get(curFromNodeChild)) { 3430 curFromNodeChild = fromNextSibling; 3431 if (!globalComponentsContext._z_[fromComponent.id]) { 3432 destroyComponent(fromComponent); 3433 } 3434 continue; 3435 } 3436
3437 curVFromNodeChild = vElementByDOMNode.get(curFromNodeChild); 3438 3439 // For transcluded content, we need to check if the element belongs to a different component 3440 // context than the current component and ensure it gets removed from its key index. 3441 if (isAutoKey(keysByDOMNode.get(fromNode))) { 3442 referenceComponent = parentComponent; 3443 } else { 3444 referenceComponent = curVFromNodeChild && curVFromNodeChild.aF_; 3445 } 3446 3447 detachNode(curFromNodeChild, fromNode, referenceComponent); 3448 3449 curFromNodeChild = fromNextSibling; 3450 } 3451 } 3452 } 3453 3454 function morphEl(fromEl, vFromEl, toEl, toElKey, ownerComponent, parentComponent) { 3455 var nodeName = toEl.aB_; 3456 3457 if (isRerenderInBrowser === true && toElKey) { 3458 ownerComponent.v_[toElKey] = fromEl; 3459 } 3460 3461 var constId = toEl.aI_; 3462 if (constId !== undefined && vFromEl.aI_ === constId) { 3463 return; 3464 } 3465 3466 morphAttrs(fromEl, vFromEl, toEl); 3467 3468 if (toElKey && globalComponentsContext._y_[toElKey] === true) { 3469 // Don't morph the children since they are preserved 3470 return; 3471 } 3472 3473 if (nodeName !== "TEXTAREA") { 3474 morphChildren(fromEl, toEl, parentComponent); 3475 } 3476 3477 var specialElHandler = specialElHandlers[nodeName]; 3478 if (specialElHandler !== undefined) { 3479 specialElHandler(fromEl, toEl); 3480 } 3481 } // END: morphEl(...) 3482 3483 morphChildren(fromNode, toNode, toNode._b_); 3484 3485 detachedNodes.forEach(function (node) { 3486 var detachedFromComponent = detachedByDOMNode.get(node); 3487 3488 if (detachedFromComponent !== undefined) { 3489 detachedByDOMNode.set(node, undefined); 3490 3491 var componentToDestroy = componentByDOMNode.get(node); 3492 if (componentToDestroy) { 3493 componentToDestroy.destroy(); 3494 } else if (node.parentNode) { 3495 destroyNodeRecursive(node, detachedFromComponent !== true && detachedFromComponent); 3496 3497 if (eventDelegation.z_(node) != false) { 3498 removeChild(node); 3499 } 3500 } 3501 } 3502 }); 3503} 3504 3505module.exports = morphdom; 3506}); 3507$_mod.def("/marko$4.14.8/dist/components/Component", function(require, exports, module, __filename, __dirname) { "use strict"; 3508/* jshint newcap:false */ 3509 3510var complain; 3511 3512var domInsert = require('/marko$4.14.8/dist/runtime/dom-insert'/*"../runtime/dom-insert"*/); 3513var defaultCreateOut = require('/marko$4.14.8/dist/runtime/createOut'/*"../runtime/createOut"*/); 3514var getComponentsContext = require('/marko$4.14.8/dist/components/ComponentsContext'/*"./ComponentsContext"*/).__; 3515var componentsUtil = require('/marko$4.14.8/dist/components/util-browser'/*"./util"*/); 3516var componentLookup = componentsUtil.a_; 3517var emitLifecycleEvent = componentsUtil.b_; 3518var destroyNodeRecursive = componentsUtil.c_; 3519var EventEmitter = require('/events-light$1.0.5/src/index'/*"events-light"*/); 3520var RenderResult = require('/marko$4.14.8/dist/runtime/RenderResult'/*"../runtime/RenderResult"*/); 3521var SubscriptionTracker = require('/listener-tracker$2.0.0/lib/listener-tracker'/*"listener-tracker"*/); 3522var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 3523var updateManager = require('/marko$4.14.8/dist/components/update-manager'/*"./update-manager"*/); 3524var morphdom = require('/marko$4.14.8/dist/morphdom/index'/*"../morphdom"*/); 3525var eventDelegation = require('/marko$4.14.8/dist/components/event-delegation'/*"./event-delegation"*/); 3526var domData = require('/marko$4.14.8/dist/components/dom-data'/*"./dom-data"*/); 3527var componentsByDOMNode = domData.d_; 3528var CONTEXT_KEY = "__subtree_context__"; 3529 3530var slice = Array.prototype.slice; 3531 3532var COMPONENT_SUBSCRIBE_TO_OPTIONS; 3533var NON_COMPONENT_SUBSCRIBE_TO_OPTIONS = { 3534 addDestroyListener: false 3535}; 3536 3537var emit = EventEmitter.prototype.emit; 3538var ELEMENT_NODE = 1; 3539 3540function removeListener(removeEventListenerHandle) { 3541 removeEventListenerHandle(); 3542} 3543 3544function handleCustomEventWithMethodListener(component, targetMethodName, args, extraArgs) { 3545 // Remove the "eventType" argument 3546 args.push(component); 3547 3548 if (extraArgs) { 3549 args = extraArgs.concat(args); 3550 } 3551
3552 var targetComponent = componentLookup[component.e_]; 3553 var targetMethod = typeof targetMethodName === "function" ? targetMethodName : targetComponent[targetMethodName]; 3554 if (!targetMethod) { 3555 throw Error("Method not found: " + targetMethodName); 3556 } 3557 3558 targetMethod.apply(targetComponent, args); 3559} 3560 3561function resolveKeyHelper(key, index) { 3562 return index ? key + "_" + index : key; 3563} 3564 3565function resolveComponentIdHelper(component, key, index) { 3566 return component.id + "-" + resolveKeyHelper(key, index); 3567} 3568 3569/** 3570 * This method is used to process "update_<stateName>" handler functions. 3571 * If all of the modified state properties have a user provided update handler 3572 * then a rerender will be bypassed and, instead, the DOM will be updated 3573 * looping over and invoking the custom update handlers. 3574 * @return {boolean} Returns true if if the DOM was updated. False, otherwise. 3575 */ 3576function processUpdateHandlers(component, stateChanges, oldState) { 3577 var handlerMethod; 3578 var handlers; 3579 3580 for (var propName in stateChanges) { 3581 if (stateChanges.hasOwnProperty(propName)) { 3582 var handlerMethodName = "update_" + propName; 3583 3584 handlerMethod = component[handlerMethodName]; 3585 if (handlerMethod) { 3586 (handlers || (handlers = [])).push([propName, handlerMethod]); 3587 } else { 3588 // This state change does not have a state handler so return false 3589 // to force a rerender 3590 return; 3591 } 3592 } 3593 } 3594 3595 // If we got here then all of the changed state properties have 3596 // an update handler or there are no state properties that actually 3597 // changed. 3598 if (handlers) { 3599 // Otherwise, there are handlers for all of the changed properties 3600 // so apply the updates using those handlers 3601 3602 handlers.forEach(function (handler) { 3603 var propertyName = handler[0]; 3604 handlerMethod = handler[1]; 3605 3606 var newValue = stateChanges[propertyName]; 3607 var oldValue = oldState[propertyName]; 3608 handlerMethod.call(component, newValue, oldValue); 3609 }); 3610 3611 emitLifecycleEvent(component, "update"); 3612 3613 component.f_(); 3614 } 3615 3616 return true; 3617} 3618 3619function checkInputChanged(existingComponent, oldInput, newInput) { 3620 if (oldInput != newInput) { 3621 if (oldInput == null || newInput == null) { 3622 return true; 3623 } 3624 3625 var oldKeys = Object.keys(oldInput); 3626 var newKeys = Object.keys(newInput); 3627 var len = oldKeys.length; 3628 if (len !== newKeys.length) { 3629 return true; 3630 } 3631 3632 for (var i = 0; i < len; i++) { 3633 var key = oldKeys[i]; 3634 if (oldInput[key] !== newInput[key]) { 3635 return true; 3636 } 3637 } 3638 } 3639 3640 return false; 3641} 3642 3643var componentProto; 3644 3645/** 3646 * Base component type. 3647 * 3648 * NOTE: Any methods that are prefixed with an underscore should be considered private! 3649 */ 3650function Component(id) { 3651 EventEmitter.call(this); 3652 this.id = id; 3653 this.g_ = null; 3654 this.h_ = null; 3655 this.i_ = null; 3656 this.j_ = null; 3657 this.k_ = null; // Used to keep track of bubbling DOM events for components rendered on the server 3658 this.l_ = null; 3659 this.e_ = null; 3660 this.m_ = null; 3661 this.n_ = undefined; 3662 this.o_ = false; 3663 this.p_ = undefined; 3664 3665 this.q_ = false; 3666 this.r_ = false; 3667 this.s_ = false;
3668 this.t_ = false; 3669 3670 this.u_ = undefined; 3671 3672 this.v_ = {}; 3673 this.w_ = undefined; 3674} 3675 3676Component.prototype = componentProto = { 3677 x_: true, 3678 3679 subscribeTo: function (target) { 3680 if (!target) { 3681 throw TypeError(); 3682 } 3683 3684 var subscriptions = this.i_ || (this.i_ = new SubscriptionTracker()); 3685 3686 var subscribeToOptions = target.x_ ? COMPONENT_SUBSCRIBE_TO_OPTIONS : NON_COMPONENT_SUBSCRIBE_TO_OPTIONS; 3687 3688 return subscriptions.subscribeTo(target, subscribeToOptions); 3689 }, 3690 3691 emit: function (eventType) { 3692 var customEvents = this.l_; 3693 var target; 3694 3695 if (customEvents && (target = customEvents[eventType])) { 3696 var targetMethodName = target[0]; 3697 var isOnce = target[1]; 3698 var extraArgs = target[2]; 3699 var args = slice.call(arguments, 1); 3700 3701 handleCustomEventWithMethodListener(this, targetMethodName, args, extraArgs); 3702 3703 if (isOnce) { 3704 delete customEvents[eventType]; 3705 } 3706 } 3707 3708 if (this.listenerCount(eventType)) { 3709 return emit.apply(this, arguments); 3710 } 3711 }, 3712 getElId: function (key, index) { 3713 return resolveComponentIdHelper(this, key, index); 3714 }, 3715 getEl: function (key, index) { 3716 if (key) { 3717 var resolvedKey = resolveKeyHelper(key, index); 3718 var keyedElement = this.v_["@" + resolvedKey]; 3719 3720 if (!keyedElement) { 3721 var keyedComponent = this.getComponent(resolvedKey); 3722 3723 if (keyedComponent) { 3724 return keyedComponent.h_.firstChild; 3725 // eslint-disable-next-line no-constant-condition 3726 } 3727 } 3728 3729 return keyedElement; 3730 } else { 3731 return this.el; 3732 } 3733 }, 3734 getEls: function (key) { 3735 key = key + "[]"; 3736 3737 var els = []; 3738 var i = 0; 3739 var el; 3740 while (el = this.getEl(key, i)) { 3741 els.push(el); 3742 i++; 3743 } 3744 return els; 3745 }, 3746 getComponent: function (key, index) { 3747 var rootNode = this.v_[resolveKeyHelper(key, index)]; 3748 if (/\[\]$/.test(key)) { 3749 rootNode = rootNode && rootNode[Object.keys(rootNode)[0]]; 3750 // eslint-disable-next-line no-constant-condition 3751 } 3752 return rootNode && componentsByDOMNode.get(rootNode); 3753 }, 3754 getComponents: function (key) { 3755 var lookup = this.v_[key + "[]"]; 3756 return lookup ? Object.keys(lookup).map(function (key) { 3757 return componentsByDOMNode.get(lookup[key]); 3758 }) : []; 3759 }, 3760 destroy: function () { 3761 if (this.q_) { 3762 return; 3763 } 3764 3765 var root = this.h_; 3766 var nodes = this.h_.nodes; 3767 3768 this.y_(); 3769 3770 nodes.forEach(function (node) { 3771 destroyNodeRecursive(node); 3772 3773 if (eventDelegation.z_(node) !== false) { 3774 node.parentNode.removeChild(node); 3775 } 3776 }); 3777 3778 root.detached = true; 3779 3780 delete componentLookup[this.id]; 3781 delete this.h_; 3782 this.v_ = {}; 3783 }, 3784 3785 y_: function () { 3786 if (this.q_) { 3787 return; 3788 } 3789 3790 emitLifecycleEvent(this, "destroy"); 3791 this.q_ = true; 3792 3793 componentsByDOMNode.set(this.h_, undefined); 3794 3795 this.h_ = null; 3796 3797 // Unsubscribe from all DOM events 3798 this.A_(); 3799 3800 var subscriptions = this.i_; 3801 if (subscriptions) { 3802 subscriptions.removeAllListeners(); 3803 this.i_ = null; 3804 } 3805 }, 3806 3807 isDestroyed: function () { 3808 return this.q_; 3809 }, 3810 get state() { 3811 return this.g_; 3812 }, 3813 set state(newState) { 3814 var state = this.g_; 3815 if (!state && !newState) { 3816 return; 3817 } 3818 3819 if (!state) { 3820 state = this.g_ = new this.B_(this); 3821 } 3822 3823 state.C_(newState || {}); 3824 3825 if (state.s_) { 3826 this.D_(); 3827 } 3828 3829 if (!newState) { 3830 this.g_ = null; 3831 } 3832 }, 3833 setState: function (name, value) { 3834 var state = this.g_; 3835 3836 if (typeof name == "object") { 3837 // Merge in the new state with the old state 3838 var newState = name; 3839 for (var k in newState) { 3840 if (newState.hasOwnProperty(k)) { 3841 state.E_(k, newState[k], true /* ensure:true */); 3842 } 3843 } 3844 } else { 3845 state.E_(name, value, true /* ensure:true */); 3846 } 3847 }, 3848 3849 setStateDirty: function (name, value) { 3850 var state = this.g_; 3851 3852 if (arguments.length == 1) {
3853 value = state[name]; 3854 } 3855 3856 state.E_(name, value, true /* ensure:true */ 3857 , true /* forceDirty:true */ 3858 ); 3859 }, 3860 3861 replaceState: function (newState) { 3862 this.g_.C_(newState); 3863 }, 3864 3865 get input() { 3866 return this.n_; 3867 }, 3868 set input(newInput) { 3869 if (this.t_) { 3870 this.n_ = newInput; 3871 } else { 3872 this.F_(newInput); 3873 } 3874 }, 3875 3876 F_: function (newInput, onInput, out) { 3877 onInput = onInput || this.onInput; 3878 var updatedInput; 3879 3880 var oldInput = this.n_; 3881 this.n_ = undefined; 3882 this.G_ = out && out[CONTEXT_KEY] || this.G_; 3883 3884 if (onInput) { 3885 // We need to set a flag to preview `this.input = foo` inside 3886 // onInput causing infinite recursion 3887 this.t_ = true; 3888 updatedInput = onInput.call(this, newInput || {}, out); 3889 this.t_ = false; 3890 } 3891 3892 newInput = this.m_ = updatedInput || newInput; 3893 3894 if (this.s_ = checkInputChanged(this, oldInput, newInput)) { 3895 this.D_(); 3896 } 3897 3898 if (this.n_ === undefined) { 3899 this.n_ = newInput; 3900 if (newInput && newInput.$global) { 3901 this.p_ = newInput.$global; 3902 } 3903 } 3904 3905 return newInput; 3906 }, 3907 3908 forceUpdate: function () { 3909 this.s_ = true; 3910 this.D_(); 3911 }, 3912 3913 D_: function () { 3914 if (!this.r_) { 3915 this.r_ = true; 3916 updateManager.H_(this); 3917 } 3918 }, 3919 3920 update: function () { 3921 if (this.q_ === true || this.I_ === false) { 3922 return; 3923 } 3924 3925 var input = this.n_; 3926 var state = this.g_; 3927 3928 if (this.s_ === false && state !== null && state.s_ === true) { 3929 if (processUpdateHandlers(this, state.J_, state.K_, state)) { 3930 state.s_ = false; 3931 } 3932 } 3933 3934 if (this.I_ === true) { 3935 // The UI component is still dirty after process state handlers 3936 // then we should rerender 3937 3938 if (this.shouldUpdate(input, state) !== false) { 3939 this.L_(false); 3940 } 3941 } 3942 3943 this.f_(); 3944 }, 3945 3946 get I_() { 3947 return this.s_ === true || this.g_ !== null && this.g_.s_ === true; 3948 }, 3949 3950 f_: function () { 3951 this.s_ = false;
3952 this.r_ = false; 3953 this.m_ = null; 3954 var state = this.g_; 3955 if (state) { 3956 state.f_(); 3957 } 3958 }, 3959 3960 shouldUpdate: function () { 3961 return true; 3962 }, 3963 3964 b_: function (eventType, eventArg1, eventArg2) { 3965 emitLifecycleEvent(this, eventType, eventArg1, eventArg2); 3966 }, 3967 3968 L_: function (isRerenderInBrowser) { 3969 var self = this; 3970 var renderer = self.M_; 3971 3972 if (!renderer) { 3973 throw TypeError(); 3974 } 3975 3976 var rootNode = this.h_; 3977 3978 var doc = self.u_; 3979 var input = this.m_ || this.n_; 3980 var globalData = this.p_; 3981 3982 updateManager.N_(function () { 3983 var createOut = renderer.createOut || defaultCreateOut; 3984 var out = createOut(globalData); 3985 out.sync(); 3986 out.u_ = self.u_; 3987 out[CONTEXT_KEY] = self.G_; 3988 3989 var componentsContext = getComponentsContext(out); 3990 var globalComponentsContext = componentsContext.O_; 3991 globalComponentsContext.P_ = self; 3992 globalComponentsContext.Q_ = isRerenderInBrowser; 3993 3994 renderer(input, out); 3995 3996 var result = new RenderResult(out); 3997 3998 var targetNode = out.R_().S_; 3999 4000 morphdom(rootNode, targetNode, doc, componentsContext); 4001 4002 result.afterInsert(doc); 4003 }); 4004 4005 this.f_(); 4006 }, 4007 4008 T_: function () { 4009 var root = this.h_; 4010 root.remove(); 4011 return root; 4012 }, 4013 4014 A_: function () { 4015 var eventListenerHandles = this.j_; 4016 if (eventListenerHandles) { 4017 eventListenerHandles.forEach(removeListener); 4018 this.j_ = null; 4019 } 4020 }, 4021 4022 get U_() { 4023 var state = this.g_; 4024 return state && state.V_; 4025 }, 4026 4027 W_: function (customEvents, scope) { 4028 var finalCustomEvents = this.l_ = {}; 4029 this.e_ = scope; 4030 4031 customEvents.forEach(function (customEvent) { 4032 var eventType = customEvent[0]; 4033 var targetMethodName = customEvent[1]; 4034 var isOnce = customEvent[2]; 4035 var extraArgs = customEvent[3]; 4036 4037 finalCustomEvents[eventType] = [targetMethodName, isOnce, extraArgs]; 4038 }); 4039 }, 4040 4041 get el() { 4042 return this.h_ && this.h_.firstChild; 4043 // eslint-disable-next-line no-constant-condition 4044 }, 4045 4046 get els() { 4047 return (this.h_ ? this.h_.nodes : []).filter(function (el) { 4048 return el.nodeType === ELEMENT_NODE; 4049 }); 4050 // eslint-disable-next-line no-constant-condition 4051 } 4052}; 4053 4054componentProto.elId = componentProto.getElId; 4055componentProto.X_ = componentProto.update; 4056componentProto.Y_ = componentProto.destroy; 4057 4058// Add all of the following DOM methods to Component.prototype: 4059// - appendTo(referenceEl) 4060// - replace(referenceEl) 4061// - replaceChildrenOf(referenceEl) 4062// - insertBefore(referenceEl) 4063// - insertAfter(referenceEl) 4064// - prependTo(referenceEl) 4065domInsert(componentProto, function getEl(component) { 4066 return component.T_(); 4067}, function afterInsert(component) { 4068 return component; 4069}); 4070 4071inherit(Component, EventEmitter); 4072 4073module.exports = Component; 4074}); 4075$_mod.def("/marko$4.14.8/dist/components/defineComponent", function(require, exports, module, __filename, __dirname) { "use strict"; 4076/* jshint newcap:false */ 4077 4078var BaseState = require('/marko$4.14.8/dist/components/State'/*"./State"*/); 4079var BaseComponent = require('/marko$4.14.8/dist/components/Component'/*"./Component"*/); 4080var inherit = require('/raptor-util$3.2.0/inherit'/*"raptor-util/inherit"*/); 4081 4082module.exports = function defineComponent(def, renderer) { 4083 if (def.x_) { 4084 return def; 4085 } 4086 4087 var ComponentClass = function () {}; 4088 var proto; 4089 4090 var type = typeof def; 4091 4092 if (type == "function") { 4093 proto = def.prototype; 4094 } else if (type == "object") { 4095 proto = def; 4096 } else { 4097 throw TypeError(); 4098 } 4099 4100 ComponentClass.prototype = proto; 4101 4102 // We don't use the constructor provided by the user 4103 // since we don't invoke their constructor until 4104 // we have had a chance to do our own initialization. 4105 // Instead, we store their constructor in the "initComponent" 4106 // property and that method gets called later inside 4107 // init-components-browser.js 4108 function Component(id) { 4109 BaseComponent.call(this, id); 4110 } 4111 4112 if (!proto.x_) { 4113 // Inherit from Component if they didn't already 4114 inherit(ComponentClass, BaseComponent); 4115 } 4116 4117 // The same prototype will be used by our constructor after 4118 // we he have set up the prototype chain using the inherit function 4119 proto = Component.prototype = ComponentClass.prototype; 4120 4121 // proto.constructor = def.constructor = Component; 4122 4123 // Set a flag on the constructor function to make it clear this is 4124 // a component so that we can short-circuit this work later 4125 Component.x_ = true; 4126 4127 function State(component) { 4128 BaseState.call(this, component); 4129 } 4130 inherit(State, BaseState); 4131 proto.B_ = State; 4132 proto.M_ = renderer; 4133 4134 return Component; 4135}; 4136}); 4137$_mod.main("/marko$4.14.8/dist/loader", ""); 4138$_mod.remap("/marko$4.14.8/dist/loader/index", "/marko$4.14.8/dist/loader/index-browser"); 4139$_mod.remap("/marko$4.14.8/dist/loader/index-browser", "/marko$4.14.8/dist/loader/index-browser-dynamic"); 4140$_mod.def("/marko$4.14.8/dist/loader/index-browser-dynamic", function(require, exports, module, __filename, __dirname) { "use strict"; 4141 4142module.exports = function load(templatePath) { 4143 // We make the assumption that the template path is a 4144 // fully resolved module path and that the module exists 4145 // as a CommonJS module 4146 return require(templatePath); 4147}; 4148}); 4149$_mod.def("/marko$4.14.8/dist/components/registry-browser", function(require, exports, module, __filename, __dirname) { var complain; 4150var defineComponent = require('/marko$4.14.8/dist/components/defineComponent'/*"./defineComponent"*/); 4151var loader = require('/marko$4.14.8/dist/loader/index-browser-dynamic'/*"../loader"*/); 4152 4153var registered = {}; 4154var loaded = {}; 4155var componentTypes = {}; 4156 4157function register(componentId, def) { 4158 registered[componentId] = def; 4159 delete loaded[componentId]; 4160 delete componentTypes[componentId]; 4161 return componentId; 4162} 4163 4164function load(typeName, isLegacy) { 4165 var target = loaded[typeName]; 4166 if (!target) { 4167 target = registered[typeName]; 4168 4169 if (target) { 4170 target = target(); 4171 } else if (isLegacy) { 4172 target = window.$markoLegacy.load(typeName); 4173 } else { 4174 target = loader(typeName); 4175 // eslint-disable-next-line no-constant-condition 4176 } 4177 4178 if (!target) { 4179 throw Error("Component not found: " + typeName); 4180 } 4181 4182 loaded[typeName] = target; 4183 } 4184 4185 return target; 4186} 4187 4188function getComponentClass(typeName, isLegacy) { 4189 var ComponentClass = componentTypes[typeName]; 4190 4191 if (ComponentClass) { 4192 return ComponentClass; 4193 } 4194 4195 ComponentClass = load(typeName, isLegacy); 4196 4197 ComponentClass = ComponentClass.Component || ComponentClass; 4198 4199 if (!ComponentClass.x_) { 4200 ComponentClass = defineComponent(ComponentClass, ComponentClass.renderer); 4201 } 4202 4203 // Make the component "type" accessible on each component instance 4204 ComponentClass.prototype._l_ = typeName; 4205 4206 // eslint-disable-next-line no-constant-condition 4207 4208 4209 componentTypes[typeName] = ComponentClass; 4210 4211 return ComponentClass; 4212} 4213 4214function createComponent(typeName, id, isLegacy) { 4215 var ComponentClass = getComponentClass(typeName, isLegacy); 4216 return new ComponentClass(id); 4217} 4218 4219exports._Q_ = register; 4220exports._n_ = createComponent; 4221}); 4222$_mod.def("/marko$4.14.8/dist/components/init-components-browser", function(require, exports, module, __filename, __dirname) { "use strict"; 4223 4224var warp10Finalize = require('/warp10$2.1.0/finalize'/*"warp10/finalize"*/); 4225var eventDelegation = require('/marko$4.14.8/dist/components/event-delegation'/*"./event-delegation"*/); 4226var win = window; 4227var defaultDocument = document; 4228var createFragmentNode = require('/marko$4.14.8/dist/morphdom/fragment'/*"../morphdom/fragment"*/)._U_; 4229var componentsUtil = require('/marko$4.14.8/dist/components/util-browser'/*"./util"*/);
4230var componentLookup = componentsUtil.a_; 4231var addComponentRootToKeyedElements = componentsUtil._V_; 4232var ComponentDef = require('/marko$4.14.8/dist/components/ComponentDef'/*"./ComponentDef"*/); 4233var registry = require('/marko$4.14.8/dist/components/registry-browser'/*"./registry"*/); 4234var domData = require('/marko$4.14.8/dist/components/dom-data'/*"./dom-data"*/); 4235var componentsByDOMNode = domData.d_; 4236var serverRenderedGlobals = {}; 4237var serverComponentRootNodes = {}; 4238var keyedElementsByComponentId = {}; 4239 4240var FLAG_WILL_RERENDER_IN_BROWSER = 1; 4241 4242function indexServerComponentBoundaries(node, runtimeId, stack) { 4243 var componentId; 4244 var ownerId; 4245 var ownerComponent; 4246 var keyedElements; 4247 var nextSibling; 4248 var runtimeLength = runtimeId.length; 4249 stack = stack || []; 4250 4251 node = node.firstChild; 4252 while (node) { 4253 nextSibling = node.nextSibling; 4254 if (node.nodeType === 8) { 4255 // Comment node 4256 var commentValue = node.nodeValue; 4257 if (commentValue.slice(0, runtimeLength) === runtimeId) { 4258 var firstChar = commentValue[runtimeLength]; 4259 4260 if (firstChar === "^" || firstChar === "#") { 4261 stack.push(node); 4262 } else if (firstChar === "/") { 4263 var endNode = node; 4264 var startNode = stack.pop(); 4265 var rootNode; 4266 4267 if (startNode.parentNode === endNode.parentNode) { 4268 rootNode = createFragmentNode(startNode.nextSibling, endNode); 4269 } else { 4270 rootNode = createFragmentNode(endNode.parentNode.firstChild, endNode); 4271 } 4272 4273 componentId = startNode.nodeValue.substring(runtimeLength + 1); 4274 firstChar = startNode.nodeValue[runtimeLength]; 4275 4276 if (firstChar === "^") { 4277 var parts = componentId.split(/ /g); 4278 var key = parts[2]; 4279 ownerId = parts[1]; 4280 componentId = parts[0]; 4281 if (ownerComponent = componentLookup[ownerId]) { 4282 keyedElements = ownerComponent.v_; 4283 } else { 4284 keyedElements = keyedElementsByComponentId[ownerId] || (keyedElementsByComponentId[ownerId] = {}); 4285 } 4286 addComponentRootToKeyedElements(keyedElements, key, rootNode, componentId); 4287 } 4288 4289 serverComponentRootNodes[componentId] = rootNode; 4290 4291 startNode.parentNode.removeChild(startNode); 4292 endNode.parentNode.removeChild(endNode); 4293 } 4294 } 4295 } else if (node.nodeType === 1) { 4296 // HTML element node 4297 var markoKey = node.getAttribute("data-marko-key"); 4298 var markoProps = node.getAttribute("data-marko"); 4299 if (markoKey) { 4300 var separatorIndex = markoKey.indexOf(" "); 4301 ownerId = markoKey.substring(separatorIndex + 1);
4302 markoKey = markoKey.substring(0, separatorIndex); 4303 if (ownerComponent = componentLookup[ownerId]) { 4304 keyedElements = ownerComponent.v_; 4305 } else { 4306 keyedElements = keyedElementsByComponentId[ownerId] || (keyedElementsByComponentId[ownerId] = {}); 4307 } 4308 keyedElements[markoKey] = node; 4309 } 4310 if (markoProps) { 4311 markoProps = JSON.parse(markoProps); 4312 Object.keys(markoProps).forEach(function (key) { 4313 if (key.slice(0, 2) === "on") { 4314 eventDelegation.___(key.slice(2)); 4315 } 4316 }); 4317 } 4318 indexServerComponentBoundaries(node, runtimeId, stack); 4319 } 4320 4321 node = nextSibling; 4322 } 4323} 4324 4325function invokeComponentEventHandler(component, targetMethodName, args) { 4326 var method = component[targetMethodName]; 4327 if (!method) { 4328 throw Error("Method not found: " + targetMethodName); 4329 } 4330 4331 method.apply(component, args); 4332} 4333 4334function addEventListenerHelper(el, eventType, isOnce, listener) { 4335 var eventListener = listener; 4336 if (isOnce) { 4337 eventListener = function (event) { 4338 listener(event); 4339 el.removeEventListener(eventType, eventListener); 4340 }; 4341 } 4342 4343 el.addEventListener(eventType, eventListener, false); 4344 4345 return function remove() { 4346 el.removeEventListener(eventType, eventListener); 4347 }; 4348} 4349 4350function addDOMEventListeners(component, el, eventType, targetMethodName, isOnce, extraArgs, handles) { 4351 var removeListener = addEventListenerHelper(el, eventType, isOnce, function (event) { 4352 var args = [event, el]; 4353 if (extraArgs) { 4354 args = extraArgs.concat(args); 4355 } 4356 4357 invokeComponentEventHandler(component, targetMethodName, args); 4358 }); 4359 handles.push(removeListener); 4360} 4361 4362function initComponent(componentDef, doc) { 4363 var component = componentDef._b_; 4364 4365 if (!component || !component.x_) { 4366 return; // legacy 4367 } 4368 4369 component.f_(); 4370 component.u_ = doc; 4371 4372 var isExisting = componentDef._d_; 4373 var id = component.id; 4374 4375 componentLookup[id] = component; 4376 4377 if (componentDef._f_ & FLAG_WILL_RERENDER_IN_BROWSER) { 4378 component.L_(true); 4379 return; 4380 } 4381 4382 if (isExisting) { 4383 component.A_(); 4384 } 4385 4386 var domEvents = componentDef._c_; 4387 if (domEvents) { 4388 var eventListenerHandles = []; 4389 4390 domEvents.forEach(function (domEventArgs) { 4391 // The event mapping is for a direct DOM event (not a custom event and not for bubblign dom events) 4392 4393 var eventType = domEventArgs[0]; 4394 var targetMethodName = domEventArgs[1]; 4395 var eventEl = component.v_[domEventArgs[2]]; 4396 var isOnce = domEventArgs[3]; 4397 var extraArgs = domEventArgs[4]; 4398 4399 addDOMEventListeners(component, eventEl, eventType, targetMethodName, isOnce, extraArgs, eventListenerHandles); 4400 }); 4401 4402 if (eventListenerHandles.length) { 4403 component.j_ = eventListenerHandles; 4404 } 4405 } 4406 4407 if (component.o_) { 4408 component.b_("update"); 4409 } else { 4410 component.o_ = true; 4411 component.b_("mount"); 4412 } 4413} 4414 4415/** 4416 * This method is used to initialized components associated with UI components 4417 * rendered in the browser. While rendering UI components a "components context" 4418 * is added to the rendering context to keep up with which components are rendered. 4419 * When ready, the components can then be initialized by walking the component tree 4420 * in the components context (nested components are initialized before ancestor components). 4421 * @param {Array<marko-components/lib/ComponentDef>} componentDefs An array of ComponentDef instances 4422 */ 4423function initClientRendered(componentDefs, doc) { 4424 // Ensure that event handlers to handle delegating events are 4425 // always attached before initializing any components 4426 eventDelegation._P_(doc); 4427 4428 doc = doc || defaultDocument; 4429 for (var i = componentDefs.length - 1; i >= 0; i--) { 4430 var componentDef = componentDefs[i]; 4431 initComponent(componentDef, doc); 4432 } 4433} 4434 4435/** 4436 * This method initializes all components that were rendered on the server by iterating over all 4437 * of the component IDs. 4438 */ 4439function initServerRendered(renderedComponents, doc) { 4440 if (!renderedComponents) { 4441 renderedComponents = win.$components; 4442
4443 if (renderedComponents && renderedComponents.forEach) { 4444 renderedComponents.forEach(function (renderedComponent) { 4445 initServerRendered(renderedComponent, doc); 4446 }); 4447 } 4448 4449 win.$components = { 4450 concat: initServerRendered 4451 }; 4452 4453 return; 4454 } 4455 4456 doc = doc || defaultDocument; 4457 4458 renderedComponents = warp10Finalize(renderedComponents); 4459 4460 var componentDefs = renderedComponents.w; 4461 var typesArray = renderedComponents.t; 4462 var runtimeId = renderedComponents.r; 4463 4464 // Ensure that event handlers to handle delegating events are 4465 // always attached before initializing any components 4466 indexServerComponentBoundaries(doc, runtimeId); 4467 eventDelegation._P_(doc); 4468 4469 var globals = window.$MG; 4470 if (globals) { 4471 serverRenderedGlobals = warp10Finalize(globals); 4472 delete window.$MG; 4473 } 4474 4475 componentDefs.forEach(function (componentDef) { 4476 componentDef = ComponentDef._m_(componentDef, typesArray, serverRenderedGlobals, registry); 4477 4478 if (!hydrateComponent(componentDef, doc)) { 4479 // hydrateComponent will return false if there is not rootNode 4480 // for the component. If this is the case, we'll wait until the 4481 // DOM has fully loaded to attempt to init the component again. 4482 doc.addEventListener("DOMContentLoaded", function () { 4483 if (!hydrateComponent(componentDef, doc)) { 4484 indexServerComponentBoundaries(doc, runtimeId); 4485 hydrateComponent(componentDef, doc); 4486 } 4487 }); 4488 } 4489 }); 4490} 4491 4492function hydrateComponent(componentDef, doc) { 4493 var componentId = componentDef.id; 4494 var component = componentDef._b_; 4495 var rootNode = serverComponentRootNodes[componentId]; 4496 4497 if (rootNode) { 4498 delete serverComponentRootNodes[componentId]; 4499 4500 component.h_ = rootNode; 4501 componentsByDOMNode.set(rootNode, component); 4502 component.v_ = keyedElementsByComponentId[componentId] || {}; 4503 4504 delete keyedElementsByComponentId[componentId]; 4505 4506 initComponent(componentDef, doc || defaultDocument); 4507 return true; 4508 } 4509} 4510 4511exports._u_ = initClientRendered; 4512exports._S_ = initServerRendered; 4513}); 4514$_mod.def("/marko$4.14.8/dist/components/index-browser", function(require, exports, module, __filename, __dirname) { var componentsUtil = require('/marko$4.14.8/dist/components/util-browser'/*"./util"*/); 4515var initComponents = require('/marko$4.14.8/dist/components/init-components-browser'/*"./init-components"*/); 4516var registry = require('/marko$4.14.8/dist/components/registry-browser'/*"./registry"*/); 4517 4518require('/marko$4.14.8/dist/components/ComponentsContext'/*"./ComponentsContext"*/)._u_ = initComponents._u_; 4519 4520exports.getComponentForEl = componentsUtil._R_; 4521exports.init = window.$initComponents = initComponents._S_; 4522 4523exports.register = function (id, component) { 4524 registry._Q_(id, function () { 4525 return component; 4526 }); 4527}; 4528}); 4529$_mod.def("/marko$4.14.8/components-browser.marko", function(require, exports, module, __filename, __dirname) { module.exports = require('/marko$4.14.8/dist/components/index-browser'/*"./dist/components"*/); 4530 4531}); 4532$_mod.main("/panel-adsempiredirect$1.0.0/views/pages/login/components/page-state", "index.marko"); 4533$_mod.main("/marko$4.14.8/dist/runtime/vdom", ""); 4534$_mod.main("/marko$4.14.8/dist", ""); 4535$_mod.remap("/marko$4.14.8/dist/index", "/marko$4.14.8/dist/index-browser"); 4536$_mod.def("/marko$4.14.8/dist/index-browser", function(require, exports, module, __filename, __dirname) { "use strict"; 4537 4538exports.createOut = require('/marko$4.14.8/dist/runtime/createOut'/*"./runtime/createOut"*/); 4539exports.load = require('/marko$4.14.8/dist/loader/index-browser-dynamic'/*"./loader"*/); 4540}); 4541$_mod.def("/marko$4.14.8/dist/runtime/vdom/helper-styleAttr", function(require, exports, module, __filename, __dirname) { var dashedNames = {}; 4542 4543/** 4544 * Helper for generating the string for a style attribute 4545 * @param {[type]} style [description] 4546 * @return {[type]} [description] 4547 */ 4548module.exports = function styleHelper(style) { 4549 if (!style) { 4550 return null; 4551 } 4552 4553 var type = typeof style; 4554 4555 if (type !== "string") { 4556 var styles = ""; 4557 4558 if (Array.isArray(style)) { 4559 for (var i = 0, len = style.length; i < len; i++) { 4560 var next = styleHelper(style[i]); 4561 if (next) styles += next + (next[next.length - 1] !== ";" ? ";" : ""); 4562 } 4563 } else if (type === "object") { 4564 for (var name in style) { 4565 var value = style[name]; 4566 if (value != null) { 4567 if (typeof value === "number" && value) { 4568 value += "px"; 4569 } 4570 4571 var nameDashed = dashedNames[name]; 4572 if (!nameDashed) { 4573 nameDashed = dashedNames[name] = name.replace(/([A-Z])/g, "-$1").toLowerCase(); 4574 } 4575 styles += nameDashed + ":" + value + ";"; 4576 } 4577 } 4578 } 4579 4580 return styles || null; 4581 } 4582 4583 return style; 4584}; 4585}); 4586$_mod.def("/marko$4.14.8/dist/compiler/util/removeDashes", function(require, exports, module, __filename, __dirname) { module.exports = function removeDashes(str) { 4587 return str.replace(/-([a-z])/g, function (match, lower) { 4588 return lower.toUpperCase(); 4589 }); 4590}; 4591}); 4592$_mod.def("/warp10$2.1.0/constants", function(require, exports, module, __filename, __dirname) { module.exports = require('/warp10$2.1.0/src/constants'/*"./src/constants"*/); 4593}); 4594$_mod.def("/marko$4.14.8/dist/runtime/helpers", function(require, exports, module, __filename, __dirname) { "use strict"; 4595 4596var removeDashes = require('/marko$4.14.8/dist/compiler/util/removeDashes'/*"../compiler/util/removeDashes"*/); 4597var ComponentsContext = require('/marko$4.14.8/dist/components/ComponentsContext'/*"../components/ComponentsContext"*/); 4598var getComponentsContext = ComponentsContext.__; 4599var ComponentDef = require('/marko$4.14.8/dist/components/ComponentDef'/*"../components/ComponentDef"*/); 4600var w10NOOP = require('/warp10$2.1.0/constants'/*"warp10/constants"*/).NOOP; 4601var isArray = Array.isArray; 4602var RENDER_BODY_TO_JSON = function () { 4603 return w10NOOP; 4604}; 4605var FLAG_WILL_RERENDER_IN_BROWSER = 1; 4606var IS_SERVER = typeof window === "undefined"; 4607 4608function isFunction(arg) { 4609 return typeof arg == "function"; 4610} 4611 4612function classList(arg, classNames) { 4613 var len; 4614 4615 if (arg) { 4616 if (typeof arg == "string") { 4617 if (arg) { 4618 classNames.push(arg); 4619 } 4620 } else if (typeof (len = arg.length) == "number") { 4621 for (var i = 0; i < len; i++) { 4622 classList(arg[i], classNames); 4623 } 4624 } else if (typeof arg == "object") { 4625 for (var name in arg) { 4626 if (arg.hasOwnProperty(name)) { 4627 var value = arg[name]; 4628 if (value) { 4629 classNames.push(name); 4630 } 4631 } 4632 } 4633 } 4634 } 4635} 4636 4637function createDeferredRenderer(handler) { 4638 function deferredRenderer(input, out) { 4639 deferredRenderer.renderer(input, out); 4640 } 4641 4642 // This is the initial function that will do the rendering. We replace 4643 // the renderer with the actual renderer func on the first render 4644 deferredRenderer.renderer = function (input, out) {
4645 var rendererFunc = handler.renderer || handler._ || handler.render; 4646 if (!isFunction(rendererFunc)) { 4647 throw Error("Invalid renderer"); 4648 } 4649 // Use the actual renderer from now on 4650 deferredRenderer.renderer = rendererFunc; 4651 rendererFunc(input, out); 4652 }; 4653 4654 return deferredRenderer; 4655} 4656 4657function resolveRenderer(handler) { 4658 var renderer = handler.renderer || handler._; 4659 4660 if (renderer) { 4661 return renderer; 4662 } 4663 4664 if (isFunction(handler)) { 4665 return handler; 4666 } 4667 4668 // If the user code has a circular function then the renderer function 4669 // may not be available on the module. Since we can't get a reference 4670 // to the actual renderer(input, out) function right now we lazily 4671 // try to get access to it later. 4672 return createDeferredRenderer(handler); 4673} 4674 4675var helpers = { 4676 /** 4677 * Internal helper method to prevent null/undefined from being written out 4678 * when writing text that resolves to null/undefined 4679 * @private 4680 */ 4681 s: function strHelper(str) { 4682 return str == null ? "" : str.toString(); 4683 }, 4684 4685 /** 4686 * Internal helper method to handle loops without a status variable 4687 * @private 4688 */ 4689 f: function forEachHelper(array, callback) { 4690 if (isArray(array)) { 4691 for (var i = 0; i < array.length; i++) { 4692 callback(array[i]); 4693 } 4694 } else if (isFunction(array)) { 4695 // Also allow the first argument to be a custom iterator function 4696 array(callback); 4697 } 4698 }, 4699 4700 /** 4701 * Helper to render a dynamic tag 4702 */ 4703 d: function dynamicTag(tag, attrs, out, componentDef, key, customEvents) { 4704 if (tag) { 4705 var component = componentDef && componentDef._b_; 4706 if (typeof tag === "string") { 4707 var events = customEvents && customEvents.reduce(function (events, eventArray) { 4708 events["on" + eventArray[0]] = componentDef.d(eventArray[0], eventArray[1], eventArray[2], eventArray[3]); 4709 return events; 4710 }, {}); 4711 if (attrs.renderBody) { 4712 var renderBody = attrs.renderBody; 4713 var otherAttrs = {}; 4714 for (var attrKey in attrs) { 4715 if (attrKey !== "renderBody") { 4716 otherAttrs[attrKey] = attrs[attrKey]; 4717 } 4718 } 4719 out.aN_(tag, otherAttrs, key, component, 0, 0, events); 4720 renderBody(out); 4721 out.aO_(); 4722 } else { 4723 out.aP_(tag, attrs, key, component, 0, 0, events); 4724 } 4725 } else { 4726 if (typeof attrs === "object") { 4727 attrs = Object.keys(attrs).reduce(function (r, key) { 4728 r[removeDashes(key)] = attrs[key]; 4729 return r; 4730 }, {}); 4731 } 4732 4733 if (tag._ || tag.renderer || tag.render) { 4734 var renderer = tag._ || tag.renderer || tag.render; 4735 out.c(componentDef, key, customEvents); 4736 renderer(attrs, out); 4737 out.ai_ = null; 4738 } else { 4739 var render = tag && tag.renderBody || tag; 4740 var isFn = typeof render === "function"; 4741 4742 if (isFn) { 4743 var flags = componentDef ? componentDef._f_ : 0; 4744 var willRerender = flags & FLAG_WILL_RERENDER_IN_BROWSER; 4745 var isW10NOOP = render === w10NOOP; 4746 var preserve = IS_SERVER ? willRerender : isW10NOOP; 4747 out.aQ_(key, component, preserve); 4748 if (!isW10NOOP && isFn) { 4749 var componentsContext = getComponentsContext(out); 4750 var parentComponentDef = componentsContext._p_; 4751 var globalContext = componentsContext.O_; 4752 componentsContext._p_ = new ComponentDef(component, parentComponentDef.id + "-" + parentComponentDef._i_(key), globalContext); 4753 render.toJSON = RENDER_BODY_TO_JSON; 4754 render(out, attrs); 4755 componentsContext._p_ = parentComponentDef; 4756 } 4757 out.aR_(); 4758 } else { 4759 out.error("Invalid dynamic tag value"); 4760 } 4761 } 4762 } 4763 } 4764 }, 4765 4766 /** 4767 * Helper to load a custom tag 4768 */ 4769 t: function loadTagHelper(renderer) { 4770 if (renderer) { 4771 renderer = resolveRenderer(renderer); 4772 } 4773 4774 return function wrappedRenderer(input, out, componentDef, key, customEvents) { 4775 out.c(componentDef, key, customEvents); 4776 renderer(input, out); 4777 out.ai_ = null; 4778 }; 4779 }, 4780 4781 /** 4782 * classList(a, b, c, ...)
4783 * Joines a list of class names with spaces. Empty class names are omitted. 4784 * 4785 * classList('a', undefined, 'b') --> 'a b' 4786 * 4787 */ 4788 cl: function classListHelper() { 4789 var classNames = []; 4790 classList(arguments, classNames); 4791 return classNames.join(" "); 4792 } 4793}; 4794 4795module.exports = helpers; 4796}); 4797$_mod.def("/marko$4.14.8/dist/runtime/vdom/helpers", function(require, exports, module, __filename, __dirname) { "use strict"; 4798 4799var vdom = require('/marko$4.14.8/dist/runtime/vdom/vdom'/*"./vdom"*/); 4800var VElement = vdom.ay_; 4801var VText = vdom.aY_; 4802 4803var commonHelpers = require('/marko$4.14.8/dist/runtime/helpers'/*"../helpers"*/); 4804var extend = require('/raptor-util$3.2.0/extend'/*"raptor-util/extend"*/); 4805 4806var classList = commonHelpers.cl; 4807 4808var helpers = extend({ 4809 e: function (tagName, attrs, key, component, childCount, flags, props) { 4810 return new VElement(tagName, attrs, key, component, childCount, flags, props); 4811 }, 4812 4813 t: function (value) { 4814 return new VText(value); 4815 }, 4816 4817 const: function (id) { 4818 var i = 0; 4819 return function () { 4820 return id + i++; 4821 }; 4822 }, 4823 4824 /** 4825 * Internal helper method to handle the "class" attribute. The value can either 4826 * be a string, an array or an object. For example: 4827 * 4828 * ca('foo bar') ==> ' class="foo bar"' 4829 * ca({foo: true, bar: false, baz: true}) ==> ' class="foo baz"' 4830 * ca(['foo', 'bar']) ==> ' class="foo bar"' 4831 */ 4832 ca: function (classNames) { 4833 if (!classNames) { 4834 return null; 4835 } 4836 4837 if (typeof classNames === "string") { 4838 return classNames; 4839 } else { 4840 return classList(classNames); 4841 } 4842 }, 4843 4844 as: require('/marko$4.14.8/dist/runtime/vdom/helper-attrs'/*"./helper-attrs"*/) 4845}, commonHelpers); 4846 4847module.exports = helpers; 4848}); 4849$_mod.def("/marko$4.14.8/dist/runtime/vdom/helper-attrs", function(require, exports, module, __filename, __dirname) { /** 4850 * Helper for processing dynamic attributes 4851 */ 4852module.exports = function (attributes) { 4853 if (attributes && (attributes.style || attributes.class)) { 4854 var newAttributes = {}; 4855 Object.keys(attributes).forEach(function (name) { 4856 if (name === "class") { 4857 newAttributes[name] = classAttr(attributes[name]); 4858 } else if (name === "style") { 4859 newAttributes[name] = styleAttr(attributes[name]); 4860 } else { 4861 newAttributes[name] = attributes[name]; 4862 } 4863 }); 4864 return newAttributes; 4865 } 4866 return attributes; 4867}; 4868 4869var styleAttr = require('/marko$4.14.8/dist/runtime/vdom/helper-styleAttr'/*"./helper-styleAttr"*/); 4870var classAttr = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"./helpers"*/).ca; 4871}); 4872$_mod.def("/marko$4.14.8/dist/runtime/vdom/AsyncVDOMBuilder", function(require, exports, module, __filename, __dirname) { var EventEmitter = require('/events-light$1.0.5/src/index'/*"events-light"*/); 4873var vdom = require('/marko$4.14.8/dist/runtime/vdom/vdom'/*"./vdom"*/); 4874var VElement = vdom.ay_; 4875var VDocumentFragment = vdom.aW_; 4876var VComment = vdom.aX_; 4877var VText = vdom.aY_; 4878var VComponent = vdom.aZ_; 4879var VFragment = vdom.b__; 4880var virtualizeHTML = vdom.ba_; 4881var RenderResult = require('/marko$4.14.8/dist/runtime/RenderResult'/*"../RenderResult"*/); 4882var defaultDocument = vdom.bb_; 4883var morphdom = require('/marko$4.14.8/dist/morphdom/index'/*"../../morphdom"*/); 4884var attrsHelper = require('/marko$4.14.8/dist/runtime/vdom/helper-attrs'/*"./helper-attrs"*/); 4885 4886var EVENT_UPDATE = "update"; 4887var EVENT_FINISH = "finish"; 4888 4889function State(tree) { 4890 this.bc_ = new EventEmitter(); 4891 this.bd_ = tree; 4892 this.be_ = false; 4893} 4894 4895function AsyncVDOMBuilder(globalData, parentNode, parentOut) { 4896 if (!parentNode) { 4897 parentNode = new VDocumentFragment(); 4898 } 4899 4900 var state; 4901 4902 if (parentOut) { 4903 state = parentOut.g_; 4904 } else { 4905 state = new State(parentNode); 4906 } 4907 4908 this.bf_ = 1; 4909 this.bg_ = 0; 4910 this.bh_ = null; 4911 this.bi_ = parentOut; 4912 4913 this.data = {}; 4914 this.g_ = state; 4915 this.al_ = parentNode; 4916 this.global = globalData || {}; 4917 this.bj_ = [parentNode]; 4918 this.bk_ = false;
4919 this.bl_ = undefined; 4920 this._r_ = null; 4921 4922 this.ai_ = null; 4923 this._Z_ = null; 4924 this.aj_ = null; 4925} 4926 4927var proto = AsyncVDOMBuilder.prototype = { 4928 aS_: true, 4929 u_: defaultDocument, 4930 4931 bc: function (component, key, ownerComponent) { 4932 var vComponent = new VComponent(component, key, ownerComponent); 4933 return this.bm_(vComponent, 0, true); 4934 }, 4935 4936 an_: function (component, key, ownerComponent) { 4937 var vComponent = new VComponent(component, key, ownerComponent, true); 4938 this.bm_(vComponent, 0); 4939 }, 4940 4941 bm_: function (child, childCount, pushToStack) { 4942 this.al_.bn_(child); 4943 if (pushToStack === true) { 4944 this.bj_.push(child); 4945 this.al_ = child; 4946 } 4947 return childCount === 0 ? this : child; 4948 }, 4949 4950 element: function (tagName, attrs, key, component, childCount, flags, props) { 4951 var element = new VElement(tagName, attrs, key, component, childCount, flags, props); 4952 return this.bm_(element, childCount); 4953 }, 4954 4955 aP_: function (tagName, attrs, key, component, childCount, flags, props) { 4956 var element = VElement.bo_(tagName, attrsHelper(attrs), key, component, childCount, flags, props); 4957 return this.bm_(element, childCount); 4958 }, 4959 4960 n: function (node, component) { 4961 // NOTE: We do a shallow clone since we assume the node is being reused 4962 // and a node can only have one parent node. 4963 var clone = node.bp_(); 4964 this.node(clone); 4965 clone.aF_ = component; 4966 4967 return this; 4968 }, 4969 4970 node: function (node) { 4971 this.al_.bn_(node); 4972 return this; 4973 }, 4974 4975 text: function (text) { 4976 var type = typeof text; 4977 4978 if (type != "string") { 4979 if (text == null) { 4980 return; 4981 } else if (type === "object") { 4982 if (text.toHTML) { 4983 return this.h(text.toHTML()); 4984 } 4985 } 4986 4987 text = text.toString(); 4988 } 4989 4990 this.al_.bn_(new VText(text)); 4991 return this; 4992 }, 4993 4994 comment: function (comment) { 4995 return this.node(new VComment(comment)); 4996 }, 4997 4998 html: function (html) { 4999 if (html != null) { 5000 var vdomNode = virtualizeHTML(html, this.u_ || document); 5001 this.node(vdomNode); 5002 } 5003 5004 return this; 5005 }, 5006 5007 beginElement: function (tagName, attrs, key, component, childCount, flags, props) { 5008 var element = new VElement(tagName, attrs, key, component, childCount, flags, props); 5009 this.bm_(element, childCount, true); 5010 return this; 5011 }, 5012 5013 aN_: function (tagName, attrs, key, component, childCount, flags, props) { 5014 var element = VElement.bo_(tagName, attrsHelper(attrs), key, component, childCount, flags, props); 5015 this.bm_(element, childCount, true); 5016 return this; 5017 }, 5018 5019 aQ_: function (key, component, preserve) { 5020 var fragment = new VFragment(key, component, preserve); 5021 this.bm_(fragment, null, true); 5022 return this; 5023 }, 5024 5025 aR_: function () { 5026 this.endElement(); 5027 }, 5028 5029 endElement: function () { 5030 var stack = this.bj_; 5031 stack.pop(); 5032 this.al_ = stack[stack.length - 1]; 5033 }, 5034 5035 end: function () { 5036 this.al_ = undefined; 5037 5038 var remaining = --this.bf_; 5039 var parentOut = this.bi_; 5040 5041 if (remaining === 0) { 5042 if (parentOut) { 5043 parentOut.bq_(); 5044 } else { 5045 this.br_(); 5046 } 5047 } else if (remaining - this.bg_ === 0) { 5048 this.bs_(); 5049 } 5050 5051 return this; 5052 }, 5053 5054 bq_: function () { 5055 var remaining = --this.bf_; 5056 5057 if (remaining === 0) { 5058 var parentOut = this.bi_; 5059 if (parentOut) { 5060 parentOut.bq_(); 5061 } else { 5062 this.br_(); 5063 } 5064 } else if (remaining - this.bg_ === 0) { 5065 this.bs_(); 5066 } 5067 }, 5068 5069 br_: function () { 5070 var state = this.g_; 5071 state.be_ = true; 5072 state.bc_.emit(EVENT_FINISH, this.aT_()); 5073 }, 5074 5075 bs_: function () { 5076 var lastArray = this._last; 5077 5078 var i = 0; 5079 5080 function next() { 5081 if (i === lastArray.length) { 5082 return; 5083 } 5084 var lastCallback = lastArray[i++]; 5085 lastCallback(next); 5086 5087 if (!lastCallback.length) { 5088 next(); 5089 } 5090 } 5091 5092 next(); 5093 }, 5094 5095 error: function (e) { 5096 try {
5097 this.emit("error", e); 5098 } finally { 5099 // If there is no listener for the error event then it will 5100 // throw a new Error here. In order to ensure that the async fragment 5101 // is still properly ended we need to put the end() in a `finally` 5102 // block 5103 this.end(); 5104 } 5105 5106 return this; 5107 }, 5108 5109 beginAsync: function (options) { 5110 if (this.bk_) { 5111 throw Error("Tried to render async while in sync mode. Note: Client side await is not currently supported in re-renders (Issue: #942)."); 5112 } 5113 5114 var state = this.g_; 5115 5116 if (options) { 5117 if (options.last) { 5118 this.bg_++; 5119 } 5120 } 5121 5122 this.bf_++; 5123 5124 var documentFragment = this.al_.bt_(); 5125 var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this); 5126 5127 state.bc_.emit("beginAsync", { 5128 out: asyncOut, 5129 parentOut: this 5130 }); 5131 5132 return asyncOut; 5133 }, 5134 5135 createOut: function () { 5136 return new AsyncVDOMBuilder(this.global); 5137 }, 5138 5139 flush: function () { 5140 var events = this.g_.bc_; 5141 5142 if (events.listenerCount(EVENT_UPDATE)) { 5143 events.emit(EVENT_UPDATE, new RenderResult(this)); 5144 } 5145 }, 5146 5147 R_: function () { 5148 return this.g_.bd_; 5149 }, 5150 5151 aT_: function () { 5152 return this.bu_ || (this.bu_ = new RenderResult(this)); 5153 }, 5154 5155 on: function (event, callback) { 5156 var state = this.g_; 5157 5158 if (event === EVENT_FINISH && state.be_) { 5159 callback(this.aT_()); 5160 } else if (event === "last") { 5161 this.onLast(callback); 5162 } else { 5163 state.bc_.on(event, callback); 5164 } 5165 5166 return this; 5167 }, 5168 5169 once: function (event, callback) { 5170 var state = this.g_; 5171 5172 if (event === EVENT_FINISH && state.be_) { 5173 callback(this.aT_()); 5174 } else if (event === "last") { 5175 this.onLast(callback); 5176 } else { 5177 state.bc_.once(event, callback); 5178 } 5179 5180 return this; 5181 }, 5182 5183 emit: function (type, arg) { 5184 var events = this.g_.bc_; 5185 switch (arguments.length) { 5186 case 1: 5187 events.emit(type); 5188 break; 5189 case 2: 5190 events.emit(type, arg); 5191 break; 5192 default: 5193 events.emit.apply(events, arguments); 5194 break; 5195 } 5196 return this; 5197 }, 5198 5199 removeListener: function () { 5200 var events = this.g_.bc_; 5201 events.removeListener.apply(events, arguments); 5202 return this; 5203 }, 5204 5205 sync: function () { 5206 this.bk_ = true; 5207 }, 5208 5209 isSync: function () { 5210 return this.bk_; 5211 }, 5212 5213 onLast: function (callback) { 5214 var lastArray = this._last; 5215 5216 if (lastArray === undefined) { 5217 this._last = [callback]; 5218 } else { 5219 lastArray.push(callback); 5220 } 5221 5222 return this; 5223 }, 5224 5225 aL_: function (doc) { 5226 var node = this.bl_; 5227 if (!node) { 5228 var vdomTree = this.R_(); 5229 // Create the root document fragment node 5230 doc = doc || this.u_ || document; 5231 this.bl_ = node = vdomTree.aC_(doc); 5232 morphdom(node, vdomTree, doc, this._r_); 5233 } 5234 return node; 5235 }, 5236 5237 toString: function (doc) { 5238 var docFragment = this.aL_(doc); 5239 var html = ""; 5240 5241 var child = docFragment.firstChild; 5242 while (child) { 5243 var nextSibling = child.nextSibling; 5244 if (child.nodeType != 1) { 5245 var container = docFragment.ownerDocument.createElement("div"); 5246 container.appendChild(child.cloneNode()); 5247 html += container.innerHTML; 5248 } else { 5249 html += child.outerHTML; 5250 } 5251 5252 child = nextSibling; 5253 } 5254 5255 return html; 5256 }, 5257 5258 then: function (fn, fnErr) { 5259 var out = this; 5260 var promise = new Promise(function (resolve, reject) { 5261 out.on("error", reject).on(EVENT_FINISH, function (result) { 5262 resolve(result); 5263 }); 5264 }); 5265 5266 return Promise.resolve(promise).then(fn, fnErr); 5267 }, 5268 5269 catch: function (fnErr) { 5270 return this.then(undefined, fnErr); 5271 }, 5272 5273 isVDOM: true, 5274 5275 c: function (componentDef, key, customEvents) { 5276 this.ai_ = componentDef; 5277 this._Z_ = key; 5278 this.aj_ = customEvents; 5279 } 5280}; 5281 5282proto.e = proto.element; 5283proto.be = proto.beginElement; 5284proto.ee = proto.aO_ = proto.endElement; 5285proto.t = proto.text; 5286proto.h = proto.w = proto.write = proto.html; 5287 5288module.exports = AsyncVDOMBuilder; 5289}); 5290$_mod.def("/marko$4.14.8/dist/runtime/renderable", function(require, exports, module, __filename, __dirname) { var defaultCreateOut = require('/marko$4.14.8/dist/runtime/createOut'/*"./createOut"*/); 5291var extend = require('/raptor-util$3.2.0/extend'/*"raptor-util/extend"*/); 5292 5293function safeRender(renderFunc, finalData, finalOut, shouldEnd) { 5294 try { 5295 renderFunc(finalData, finalOut); 5296 5297 if (shouldEnd) { 5298 finalOut.end(); 5299 } 5300 } catch (err) { 5301 var actualEnd = finalOut.end; 5302 finalOut.end = function () {}; 5303 5304 setTimeout(function () { 5305 finalOut.end = actualEnd; 5306 finalOut.error(err); 5307 }, 0); 5308 } 5309 return finalOut; 5310} 5311 5312module.exports = function (target, renderer) { 5313 var renderFunc = renderer && (renderer.renderer || renderer.render || renderer); 5314 var createOut = target.createOut || renderer.createOut || defaultCreateOut; 5315 5316 return extend(target, { 5317 createOut: createOut, 5318 5319 renderToString: function (data, callback) { 5320 var localData = data || {}; 5321 var render = renderFunc || this._; 5322 var globalData = localData.$global; 5323 var out = createOut(globalData); 5324 5325 out.global.template = this; 5326 5327 if (globalData) { 5328 localData.$global = undefined; 5329 } 5330 5331 if (callback) { 5332 out.on("finish", function () { 5333 callback(null, out.toString(), out); 5334 }).once("error", callback); 5335 5336 return safeRender(render, localData, out, true); 5337 } else { 5338 out.sync(); 5339 render(localData, out); 5340 return out.toString(); 5341 } 5342 }, 5343 5344 renderSync: function (data) { 5345 var localData = data || {}; 5346 var render = renderFunc || this._; 5347 var globalData = localData.$global; 5348 var out = createOut(globalData); 5349 out.sync(); 5350 5351 out.global.template = this; 5352 5353 if (globalData) { 5354 localData.$global = undefined; 5355 } 5356 5357 render(localData, out); 5358 return out.aT_(); 5359 }, 5360 5361 /**
5362 * Renders a template to either a stream (if the last 5363 * argument is a Stream instance) or 5364 * provides the output to a callback function (if the last 5365 * argument is a Function). 5366 * 5367 * Supported signatures: 5368 * 5369 * render(data) 5370 * render(data, out) 5371 * render(data, stream) 5372 * render(data, callback) 5373 * 5374 * @param {Object} data The view model data for the template 5375 * @param {AsyncStream/AsyncVDOMBuilder} out A Stream, an AsyncStream/AsyncVDOMBuilder instance, or a callback function 5376 * @return {AsyncStream/AsyncVDOMBuilder} Returns the AsyncStream/AsyncVDOMBuilder instance that the template is rendered to 5377 */ 5378 render: function (data, out) { 5379 var callback; 5380 var finalOut; 5381 var finalData; 5382 var globalData; 5383 var render = renderFunc || this._; 5384 var shouldBuffer = this.aU_; 5385 var shouldEnd = true; 5386 5387 if (data) { 5388 finalData = data; 5389 if (globalData = data.$global) { 5390 finalData.$global = undefined; 5391 } 5392 } else { 5393 finalData = {}; 5394 } 5395 5396 if (out && out.aS_) { 5397 finalOut = out; 5398 shouldEnd = false; 5399 extend(out.global, globalData); 5400 } else if (typeof out == "function") { 5401 finalOut = createOut(globalData); 5402 callback = out; 5403 } else { 5404 finalOut = createOut(globalData, // global 5405 out, // writer(AsyncStream) or parentNode(AsyncVDOMBuilder) 5406 undefined, // parentOut 5407 shouldBuffer // ignored by AsyncVDOMBuilder 5408 ); 5409 } 5410 5411 if (callback) { 5412 finalOut.on("finish", function () { 5413 callback(null, finalOut.aT_()); 5414 }).once("error", callback); 5415 } 5416 5417 globalData = finalOut.global; 5418 5419 globalData.template = globalData.template || this; 5420 5421 return safeRender(render, finalData, finalOut, shouldEnd); 5422 } 5423 }); 5424}; 5425}); 5426$_mod.def("/marko$4.14.8/dist/runtime/vdom/index", function(require, exports, module, __filename, __dirname) { "use strict"; 5427 5428require('/marko$4.14.8/dist/index-browser'/*"../../"*/); 5429 5430// helpers provide a core set of various utility methods 5431// that are available in every template 5432var AsyncVDOMBuilder = require('/marko$4.14.8/dist/runtime/vdom/AsyncVDOMBuilder'/*"./AsyncVDOMBuilder"*/); 5433var makeRenderable = require('/marko$4.14.8/dist/runtime/renderable'/*"../renderable"*/); 5434 5435/** 5436 * Method is for internal usage only. This method 5437 * is invoked by code in a compiled Marko template and 5438 * it is used to create a new Template instance. 5439 * @private 5440 */ 5441exports.t = function createTemplate(path) { 5442 return new Template(path); 5443}; 5444 5445function Template(path, func) { 5446 this.path = path; 5447 this._ = func; 5448 this.meta = undefined; 5449} 5450 5451function createOut(globalData, parent, parentOut) { 5452 return new AsyncVDOMBuilder(globalData, parent, parentOut); 5453} 5454 5455var Template_prototype = Template.prototype = { 5456 createOut: createOut 5457}; 5458 5459makeRenderable(Template_prototype); 5460 5461exports.Template = Template; 5462exports.aV_ = createOut; 5463 5464require('/marko$4.14.8/dist/runtime/createOut'/*"../createOut"*/).aM_(createOut); 5465}); 5466$_mod.def("/marko$4.14.8/dist/vdom", function(require, exports, module, __filename, __dirname) { module.exports = require('/marko$4.14.8/dist/runtime/vdom/index'/*"./runtime/vdom"*/); 5467}); 5468$_mod.remap("/marko$4.14.8/dist/components/helpers", "/marko$4.14.8/dist/components/helpers-browser"); 5469$_mod.remap("/marko$4.14.8/dist/components/beginComponent", "/marko$4.14.8/dist/components/beginComponent-browser"); 5470$_mod.def("/marko$4.14.8/dist/components/beginComponent-browser", function(require, exports, module, __filename, __dirname) { var ComponentDef = require('/marko$4.14.8/dist/components/ComponentDef'/*"./ComponentDef"*/); 5471 5472module.exports = function beginComponent(componentsContext, component, key, ownerComponentDef) { 5473 var componentId = component.id; 5474 5475 var globalContext = componentsContext.O_; 5476 var componentDef = componentsContext._p_ = new ComponentDef(component, componentId, globalContext); 5477 globalContext._z_[componentId] = true; 5478 componentsContext._r_.push(componentDef); 5479 5480 var out = componentsContext._s_; 5481 out.bc(component, key, ownerComponentDef && ownerComponentDef._b_); 5482 return componentDef; 5483}; 5484}); 5485$_mod.remap("/marko$4.14.8/dist/components/endComponent", "/marko$4.14.8/dist/components/endComponent-browser"); 5486$_mod.def("/marko$4.14.8/dist/components/endComponent-browser", function(require, exports, module, __filename, __dirname) { "use strict"; 5487 5488module.exports = function endComponent(out) { 5489 out.ee();
5489 // endElement() (also works for VComponent nodes pushed on to the stack) 5490}; 5491}); 5492$_mod.def("/marko$4.14.8/dist/components/renderer", function(require, exports, module, __filename, __dirname) { var componentsUtil = require('/marko$4.14.8/dist/components/util-browser'/*"./util"*/); 5493var componentLookup = componentsUtil.a_; 5494var emitLifecycleEvent = componentsUtil.b_; 5495 5496var ComponentsContext = require('/marko$4.14.8/dist/components/ComponentsContext'/*"./ComponentsContext"*/); 5497var getComponentsContext = ComponentsContext.__; 5498var registry = require('/marko$4.14.8/dist/components/registry-browser'/*"./registry"*/); 5499var copyProps = require('/raptor-util$3.2.0/copyProps'/*"raptor-util/copyProps"*/); 5500var isServer = componentsUtil.ak_ === true; 5501var beginComponent = require('/marko$4.14.8/dist/components/beginComponent-browser'/*"./beginComponent"*/); 5502var endComponent = require('/marko$4.14.8/dist/components/endComponent-browser'/*"./endComponent"*/); 5503 5504var COMPONENT_BEGIN_ASYNC_ADDED_KEY = "$wa"; 5505 5506function resolveComponentKey(key, parentComponentDef) { 5507 if (key[0] === "#") { 5508 return key.substring(1); 5509 } else { 5510 return parentComponentDef.id + "-" + parentComponentDef._i_(key); 5511 } 5512} 5513 5514function handleBeginAsync(event) { 5515 var parentOut = event.parentOut; 5516 var asyncOut = event.out; 5517 var componentsContext = parentOut._r_; 5518 5519 if (componentsContext !== undefined) { 5520 // We are going to start a nested ComponentsContext 5521 asyncOut._r_ = new ComponentsContext(asyncOut, componentsContext); 5522 } 5523 // Carry along the component arguments 5524 asyncOut.c(parentOut.ai_, parentOut._Z_, parentOut.aj_); 5525} 5526 5527function createRendererFunc(templateRenderFunc, componentProps, renderingLogic) { 5528 renderingLogic = renderingLogic || {}; 5529 var onInput = renderingLogic.onInput; 5530 var typeName = componentProps._l_; 5531 var isSplit = componentProps.ah_ === true; 5532 var isImplicitComponent = componentProps.am_ === true; 5533 5534 var shouldApplySplitMixins = isSplit; 5535 5536 return function renderer(input, out) { 5537 var outGlobal = out.global; 5538 5539 if (out.isSync() === false) { 5540 if (!outGlobal[COMPONENT_BEGIN_ASYNC_ADDED_KEY]) { 5541 outGlobal[COMPONENT_BEGIN_ASYNC_ADDED_KEY] = true; 5542 out.on("beginAsync", handleBeginAsync); 5543 } 5544 } 5545 5546 var componentsContext = getComponentsContext(out); 5547 var globalComponentsContext = componentsContext.O_; 5548 5549 var component = globalComponentsContext.P_; 5550 var isRerender = component !== undefined; 5551 var id; 5552 var isExisting; 5553 var customEvents; 5554 var parentComponentDef = componentsContext._p_; 5555 var ownerComponentDef = out.ai_; 5556 var ownerComponentId = ownerComponentDef && ownerComponentDef.id; 5557 var key = out._Z_; 5558 5559 if (component) { 5560 // If component is provided then we are currently rendering 5561 // the top-level UI component as part of a re-render 5562 id = component.id; // We will use the ID of the component being re-rendered 5563 isExisting = true; // This is a re-render so we know the component is already in the DOM 5564 globalComponentsContext.P_ = null; 5565 } else { 5566 // Otherwise, we are rendering a nested UI component. We will need 5567 // to match up the UI component with the component already in the 5568 // DOM (if any) so we will need to resolve the component ID from 5569 // the assigned key. We also need to handle any custom event bindings 5570 // that were provided. 5571 if (parentComponentDef) { 5572 // console.log('componentArgs:', componentArgs); 5573 customEvents = out.aj_; 5574 5575 if (key != null) { 5576 id = resolveComponentKey(key.toString(), parentComponentDef); 5577 } else { 5578 id = parentComponentDef._k_(); 5579 } 5580 } else { 5581 id = globalComponentsContext._k_(); 5582 } 5583 } 5584 5585 if (isServer) { 5586 // If we are rendering on the server then things are simplier since 5587 // we don't need to match up the UI component with a previously 5588 // rendered component already mounted to the DOM. We also create 5589 // a lightweight ServerComponent 5590 component = registry._n_(renderingLogic, id, input, out, typeName, customEvents, ownerComponentId); 5591 5592 // This is the final input after running the lifecycle methods. 5593 // We will be passing the input to the template for the `input` param 5594 input = component._C_; 5595 5596 component._C_ = undefined; // We don't want ___updatedInput to be serialized to the browser 5597 } else { 5598 if (!component) {
5599 if (isRerender && (component = componentLookup[id]) && component._l_ !== typeName) { 5600 // Destroy the existing component since 5601 component.destroy(); 5602 component = undefined; 5603 } 5604 5605 if (component) { 5606 isExisting = true; 5607 } else { 5608 isExisting = false; 5609 // We need to create a new instance of the component 5610 component = registry._n_(typeName, id); 5611 5612 if (shouldApplySplitMixins === true) { 5613 shouldApplySplitMixins = false; 5614 5615 var renderingLogicProps = typeof renderingLogic == "function" ? renderingLogic.prototype : renderingLogic; 5616 5617 copyProps(renderingLogicProps, component.constructor.prototype); 5618 } 5619 } 5620 5621 // Set this flag to prevent the component from being queued for update 5622 // based on the new input. The component is about to be rerendered 5623 // so we don't want to queue it up as a result of calling `setInput()` 5624 component.r_ = true; 5625 5626 if (customEvents !== undefined) { 5627 component.W_(customEvents, ownerComponentId); 5628 } 5629 5630 if (isExisting === false) { 5631 emitLifecycleEvent(component, "create", input, out); 5632 } 5633 5634 input = component.F_(input, onInput, out); 5635 5636 if (isExisting === true) { 5637 if (component.I_ === false || component.shouldUpdate(input, component.g_) === false) { 5638 // We put a placeholder element in the output stream to ensure that the existing 5639 // DOM node is matched up correctly when using morphdom. We flag the VElement 5640 // node to track that it is a preserve marker 5641 out.an_(component); 5642 globalComponentsContext._z_[id] = true; 5643 component.f_(); // The component is no longer dirty so reset internal flags 5644 return; 5645 } 5646 } 5647 } 5648 5649 component.p_ = outGlobal; 5650 5651 emitLifecycleEvent(component, "render", out); 5652 } 5653 5654 var componentDef = beginComponent(componentsContext, component, key, ownerComponentDef, isSplit, isImplicitComponent); 5655 5656 componentDef._d_ = isExisting; 5657 5658 // Render the template associated with the component using the final template 5659 // data that we constructed 5660 templateRenderFunc(input, out, componentDef, component, component.U_); 5661 5662 endComponent(out, componentDef); 5663 componentsContext._p_ = parentComponentDef; 5664 }; 5665} 5666 5667module.exports = createRendererFunc; 5668 5669// exports used by the legacy renderer 5670createRendererFunc._W_ = resolveComponentKey; 5671createRendererFunc.ag_ = handleBeginAsync; 5672}); 5673$_mod.def("/marko$4.14.8/dist/components/helpers-browser", function(require, exports, module, __filename, __dirname) { require('/marko$4.14.8/dist/components/index-browser'/*"./"*/); 5674 5675exports.c = require('/marko$4.14.8/dist/components/defineComponent'/*"./defineComponent"*/); // Referenced by compiled templates 5676exports.r = require('/marko$4.14.8/dist/components/renderer'/*"./renderer"*/); // Referenced by compiled templates 5677exports.rc = require('/marko$4.14.8/dist/components/registry-browser'/*"./registry"*/)._Q_; // Referenced by compiled templates 5678}); 5679$_mod.def("/panel-adsempiredirect$1.0.0/views/pages/login/components/page-state/component", function(require, exports, module, __filename, __dirname) { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 5680 5681function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 5682 5683module.exports = function () { 5684 function _class() { 5685 _classCallCheck(this, _class); 5686 } 5687 5688 _createClass(_class, [{ 5689 key: "onCreate", 5690 value: function onCreate() { 5691 this.state = { 5692 errorMessage: "", 5693 successMessage: "", 5694 form: { 5695 login: "", 5696 password: "" 5697 }, 5698 restoreForm: { 5699 email: "" 5700 }, 5701 isShowGoogleRecaptcha: true, 5702 googleCaptchaClient: "", 5703 isLoginForm: true, 5704 isRestoreForm: false 5705 }; 5706 } 5707 }, { 5708 key: "onInput", 5709 value: function onInput(input) { 5710 this.state.isShowGoogleRecaptcha = input.showGoogleRecaptcha; 5711 this.state.googleCaptchaClient = input.googleCaptchaClient; 5712 } 5713 }, { 5714 key: "change", 5715 value: function change(val) { 5716 this.state.form[val.el.name] = val.el.value; 5717 this.setStateDirty("form"); 5718 } 5719 }, { 5720 key: "changeRestoreForm", 5721 value: function changeRestoreForm(val) { 5722 this.state.restoreForm[val.el.name] = val.el.value; 5723 this.setStateDirty("form"); 5724 } 5725 }, { 5726 key: "showRestore", 5727 value: function showRestore() { 5728 this.setState({ isLoginForm: false, isRestoreForm: true, errorMessage: "", successMessage: "" }); 5729 } 5730 }, { 5731 key: "showLogin", 5732 value: function showLogin() { 5733 this.setState({ isLoginForm: true, isRestoreForm: false, errorMessage: "", successMessage: "" }); 5734 } 5735 }, { 5736 key: "submitRestore", 5737 value: function submitRestore() { 5738 var _this = this; 5739 5740 this.state.errorMessage = ""; 5741 this.state.successMessage = ""; 5742 var data = this.state.restoreForm; 5743 var googleCaptchaClient = this.state.googleCaptchaClient; 5744 5745 5746 if (this.state.isShowGoogleRecaptcha) { 5747 // eslint-disable-next-line no-undef 5748 grecaptcha.ready(function () { 5749 grecaptcha.execute(googleCaptchaClient).then(function (token) { 5750 data.captchaResponse = token; 5751 return fetch("/restorePassword", { 5752 method: "post", 5753 credentials: "same-origin", 5754 body: JSON.stringify(data), 5755 headers: { 5756 "Accept": "application/json", 5757 "Content-Type": "application/json" 5758 } 5759 }); 5760 }).then(function (response) { 5761 return response.json(); 5762 }).then(function (body) { 5763 if (body.message === "FAIL") { 5764 _this.state.errorMessage = body.uiMessage; 5765 return; 5766 } 5767 _this.state.successMessage = body.uiMessage; 5768 }); 5769 }); 5770 } else { 5771 fetch("/restorePassword", { 5772 method: "post", 5773 credentials: "same-origin", 5774 body: JSON.stringify(this.state.restoreForm), 5775 headers: { 5776 "Accept": "application/json", 5777 "Content-Type": "application/json" 5778 } 5779 }).then(function (response) { 5780 return response.json(); 5781 }).then(function (body) { 5782 if (body.message === "FAIL") { 5783 _this.state.errorMessage = body.uiMessage; 5784 return; 5785 } 5786 _this.state.successMessage = body.uiMessage; 5787 }); 5788 } 5789 } 5790 }, { 5791 key: "submit", 5792 value: function submit() { 5793 var _this2 = this; 5794 5795 this.state.errorMessage = ""; 5796 this.state.successMessage = ""; 5797 var data = this.state.form; 5798 var googleCaptchaClient = this.state.googleCaptchaClient; 5799 5800 5801 if (this.state.isShowGoogleRecaptcha) { 5802 // eslint-disable-next-line no-undef 5803 grecaptcha.ready(function () { 5804 grecaptcha.execute(googleCaptchaClient).then(function (token) { 5805 data.captchaResponse = token; 5806 return fetch("/login", { 5807 method: "post", 5808 credentials: "same-origin", 5809 body: JSON.stringify(data), 5810 headers: { 5811 "Accept": "application/json", 5812 "Content-Type": "application/json" 5813 } 5814 }); 5815 }).then(function (response) { 5816 return response.json(); 5817 }).then(function (body) { 5818 if (body.message === "FAIL") { 5819 _this2.state.errorMessage = body.uiMessage; 5820 return; 5821 } 5822 window.location = "/affiliate/dashboard"; 5823 }); 5824 }); 5825 } else { 5826 fetch("/login", { 5827 method: "post", 5828 credentials: "same-origin", 5829 body: JSON.stringify(data), 5830 headers: { 5831 "Accept": "application/json", 5832 "Content-Type": "application/json" 5833 } 5834 }).then(function (response) { 5835 return response.json(); 5836 }).then(function (body) { 5837 if (body.message === "FAIL") { 5838 _this2.state.errorMessage = body.uiMessage; 5839 return; 5840 } 5841 window.location = "/affiliate/dashboard"; 5842 }); 5843 } 5844 } 5845 }]); 5846 5847 return _class; 5848}(); 5849}); 5850$_mod.installed("panel-adsempiredirect$1.0.0", "moment", "2.30.1"); 5851$_mod.main("/moment$2.30.1", "moment"); 5852$_mod.def("/moment$2.30.1/moment", function(require, exports, module, __filename, __dirname) { //! moment.js 5853//! version : 2.30.1 5854//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 5855//! license : MIT 5856//! momentjs.com 5857 5858;(function (global, factory) { 5859 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 5860 typeof define === 'function' && define.amd ? define(factory) : 5861 global.moment = factory() 5862}(this, (function () { 'use strict'; 5863 5864 var hookCallback; 5865 5866 function hooks() { 5867 return hookCallback.apply(null, arguments); 5868 } 5869 5870 // This is done to register the method called with moment() 5871 // without creating circular dependencies. 5872 function setHookCallback(callback) { 5873 hookCallback = callback; 5874 } 5875 5876 function isArray(input) { 5877 return ( 5878 input instanceof Array || 5879 Object.prototype.toString.call(input) === '[object Array]' 5880 ); 5881 } 5882 5883 function isObject(input) { 5884 // IE8 will treat undefined and null as object if it wasn't for 5885 // input != null 5886 return ( 5887 input != null && 5888 Object.prototype.toString.call(input) === '[object Object]' 5889 ); 5890 } 5891 5892 function hasOwnProp(a, b) { 5893 return Object.prototype.hasOwnProperty.call(a, b); 5894 } 5895 5896 function isObjectEmpty(obj) { 5897 if (Object.getOwnPropertyNames) { 5898 return Object.getOwnPropertyNames(obj).length === 0; 5899 } else { 5900 var k; 5901 for (k in obj) { 5902 if (hasOwnProp(obj, k)) { 5903 return false;
vendor: 5,904 bytes, lines 5904-6122
5904 } 5905 } 5906 return true; 5907 } 5908 } 5909 5910 function isUndefined(input) { 5911 return input === void 0; 5912 } 5913 5914 function isNumber(input) { 5915 return ( 5916 typeof input === 'number' || 5917 Object.prototype.toString.call(input) === '[object Number]' 5918 ); 5919 } 5920 5921 function isDate(input) { 5922 return ( 5923 input instanceof Date || 5924 Object.prototype.toString.call(input) === '[object Date]' 5925 ); 5926 } 5927 5928 function map(arr, fn) { 5929 var res = [], 5930 i, 5931 arrLen = arr.length; 5932 for (i = 0; i < arrLen; ++i) { 5933 res.push(fn(arr[i], i)); 5934 } 5935 return res; 5936 } 5937 5938 function extend(a, b) { 5939 for (var i in b) { 5940 if (hasOwnProp(b, i)) { 5941 a[i] = b[i]; 5942 } 5943 } 5944 5945 if (hasOwnProp(b, 'toString')) { 5946 a.toString = b.toString; 5947 } 5948 5949 if (hasOwnProp(b, 'valueOf')) { 5950 a.valueOf = b.valueOf; 5951 } 5952 5953 return a; 5954 } 5955 5956 function createUTC(input, format, locale, strict) { 5957 return createLocalOrUTC(input, format, locale, strict, true).utc(); 5958 } 5959 5960 function defaultParsingFlags() { 5961 // We need to deep clone this object. 5962 return { 5963 empty: false, 5964 unusedTokens: [], 5965 unusedInput: [], 5966 overflow: -2, 5967 charsLeftOver: 0, 5968 nullInput: false, 5969 invalidEra: null, 5970 invalidMonth: null, 5971 invalidFormat: false, 5972 userInvalidated: false, 5973 iso: false, 5974 parsedDateParts: [], 5975 era: null, 5976 meridiem: null, 5977 rfc2822: false, 5978 weekdayMismatch: false, 5979 }; 5980 } 5981 5982 function getParsingFlags(m) { 5983 if (m._pf == null) { 5984 m._pf = defaultParsingFlags(); 5985 } 5986 return m._pf; 5987 } 5988 5989 var some; 5990 if (Array.prototype.some) { 5991 some = Array.prototype.some; 5992 } else { 5993 some = function (fun) { 5994 var t = Object(this), 5995 len = t.length >>> 0, 5996 i; 5997 5998 for (i = 0; i < len; i++) { 5999 if (i in t && fun.call(this, t[i], i, t)) { 6000 return true; 6001 } 6002 } 6003 6004 return false; 6005 }; 6006 } 6007 6008 function isValid(m) { 6009 var flags = null, 6010 parsedParts = false, 6011 isNowValid = m._d && !isNaN(m._d.getTime()); 6012 if (isNowValid) { 6013 flags = getParsingFlags(m); 6014 parsedParts = some.call(flags.parsedDateParts, function (i) { 6015 return i != null; 6016 }); 6017 isNowValid = 6018 flags.overflow < 0 && 6019 !flags.empty && 6020 !flags.invalidEra && 6021 !flags.invalidMonth && 6022 !flags.invalidWeekday && 6023 !flags.weekdayMismatch && 6024 !flags.nullInput && 6025 !flags.invalidFormat && 6026 !flags.userInvalidated && 6027 (!flags.meridiem || (flags.meridiem && parsedParts)); 6028 if (m._strict) { 6029 isNowValid = 6030 isNowValid && 6031 flags.charsLeftOver === 0 && 6032 flags.unusedTokens.length === 0 && 6033 flags.bigHour === undefined; 6034 } 6035 } 6036 if (Object.isFrozen == null || !Object.isFrozen(m)) { 6037 m._isValid = isNowValid; 6038 } else { 6039 return isNowValid; 6040 } 6041 return m._isValid; 6042 } 6043 6044 function createInvalid(flags) { 6045 var m = createUTC(NaN); 6046 if (flags != null) { 6047 extend(getParsingFlags(m), flags); 6048 } else { 6049 getParsingFlags(m).userInvalidated = true; 6050 } 6051 6052 return m; 6053 } 6054 6055 // Plugins that add properties should also add the key here (null value), 6056 // so we can properly clone ourselves. 6057 var momentProperties = (hooks.momentProperties = []), 6058 updateInProgress = false; 6059 6060 function copyConfig(to, from) { 6061 var i, 6062 prop, 6063 val, 6064 momentPropertiesLen = momentProperties.length; 6065 6066 if (!isUndefined(from._isAMomentObject)) { 6067 to._isAMomentObject = from._isAMomentObject; 6068 } 6069 if (!isUndefined(from._i)) { 6070 to._i = from._i; 6071 } 6072 if (!isUndefined(from._f)) { 6073 to._f = from._f; 6074 } 6075 if (!isUndefined(from._l)) { 6076 to._l = from._l; 6077 } 6078 if (!isUndefined(from._strict)) { 6079 to._strict = from._strict; 6080 } 6081 if (!isUndefined(from._tzm)) { 6082 to._tzm = from._tzm; 6083 } 6084 if (!isUndefined(from._isUTC)) { 6085 to._isUTC = from._isUTC; 6086 } 6087 if (!isUndefined(from._offset)) { 6088 to._offset = from._offset; 6089 } 6090 if (!isUndefined(from._pf)) { 6091 to._pf = getParsingFlags(from); 6092 } 6093 if (!isUndefined(from._locale)) { 6094 to._locale = from._locale; 6095 } 6096 6097 if (momentPropertiesLen > 0) { 6098 for (i = 0; i < momentPropertiesLen; i++) { 6099 prop = momentProperties[i]; 6100 val = from[prop]; 6101 if (!isUndefined(val)) { 6102 to[prop] = val; 6103 } 6104 } 6105 } 6106 6107 return to; 6108 } 6109 6110 // Moment prototype object 6111 function Moment(config) { 6112 copyConfig(this, config); 6113 this._d = new Date(config._d != null ? config._d.getTime() : NaN); 6114 if (!this.isValid()) { 6115 this._d = new Date(NaN); 6116 } 6117 // Prevent infinite loop in case updateOffset creates new moment 6118 // objects. 6119 if (updateInProgress === false) { 6120 updateInProgress = true; 6121 hooks.updateOffset(this); 6122 updateInProgress = false;
vendor: 5,578 bytes, lines 6123-6306
6123 } 6124 } 6125 6126 function isMoment(obj) { 6127 return ( 6128 obj instanceof Moment || (obj != null && obj._isAMomentObject != null) 6129 ); 6130 } 6131 6132 function warn(msg) { 6133 if ( 6134 hooks.suppressDeprecationWarnings === false && 6135 typeof console !== 'undefined' && 6136 console.warn 6137 ) { 6138 console.warn('Deprecation warning: ' + msg); 6139 } 6140 } 6141 6142 function deprecate(msg, fn) { 6143 var firstTime = true; 6144 6145 return extend(function () { 6146 if (hooks.deprecationHandler != null) { 6147 hooks.deprecationHandler(null, msg); 6148 } 6149 if (firstTime) { 6150 var args = [], 6151 arg, 6152 i, 6153 key, 6154 argLen = arguments.length; 6155 for (i = 0; i < argLen; i++) { 6156 arg = ''; 6157 if (typeof arguments[i] === 'object') { 6158 arg += '\n[' + i + '] '; 6159 for (key in arguments[0]) { 6160 if (hasOwnProp(arguments[0], key)) { 6161 arg += key + ': ' + arguments[0][key] + ', '; 6162 } 6163 } 6164 arg = arg.slice(0, -2); // Remove trailing comma and space 6165 } else { 6166 arg = arguments[i]; 6167 } 6168 args.push(arg); 6169 } 6170 warn( 6171 msg + 6172 '\nArguments: ' + 6173 Array.prototype.slice.call(args).join('') + 6174 '\n' + 6175 new Error().stack 6176 ); 6177 firstTime = false; 6178 } 6179 return fn.apply(this, arguments); 6180 }, fn); 6181 } 6182 6183 var deprecations = {}; 6184 6185 function deprecateSimple(name, msg) { 6186 if (hooks.deprecationHandler != null) { 6187 hooks.deprecationHandler(name, msg); 6188 } 6189 if (!deprecations[name]) { 6190 warn(msg); 6191 deprecations[name] = true; 6192 } 6193 } 6194 6195 hooks.suppressDeprecationWarnings = false; 6196 hooks.deprecationHandler = null; 6197 6198 function isFunction(input) { 6199 return ( 6200 (typeof Function !== 'undefined' && input instanceof Function) || 6201 Object.prototype.toString.call(input) === '[object Function]' 6202 ); 6203 } 6204 6205 function set(config) { 6206 var prop, i; 6207 for (i in config) { 6208 if (hasOwnProp(config, i)) { 6209 prop = config[i]; 6210 if (isFunction(prop)) { 6211 this[i] = prop; 6212 } else { 6213 this['_' + i] = prop; 6214 } 6215 } 6216 } 6217 this._config = config; 6218 // Lenient ordinal parsing accepts just a number in addition to 6219 // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. 6220 // TODO: Remove "ordinalParse" fallback in next major release. 6221 this._dayOfMonthOrdinalParseLenient = new RegExp( 6222 (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + 6223 '|' + 6224 /\d{1,2}/.source 6225 ); 6226 } 6227 6228 function mergeConfigs(parentConfig, childConfig) { 6229 var res = extend({}, parentConfig), 6230 prop; 6231 for (prop in childConfig) { 6232 if (hasOwnProp(childConfig, prop)) { 6233 if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { 6234 res[prop] = {}; 6235 extend(res[prop], parentConfig[prop]); 6236 extend(res[prop], childConfig[prop]); 6237 } else if (childConfig[prop] != null) { 6238 res[prop] = childConfig[prop]; 6239 } else { 6240 delete res[prop]; 6241 } 6242 } 6243 } 6244 for (prop in parentConfig) { 6245 if ( 6246 hasOwnProp(parentConfig, prop) && 6247 !hasOwnProp(childConfig, prop) && 6248 isObject(parentConfig[prop]) 6249 ) { 6250 // make sure changes to properties don't modify parent config 6251 res[prop] = extend({}, res[prop]); 6252 } 6253 } 6254 return res; 6255 } 6256 6257 function Locale(config) { 6258 if (config != null) { 6259 this.set(config); 6260 } 6261 } 6262 6263 var keys; 6264 6265 if (Object.keys) { 6266 keys = Object.keys; 6267 } else { 6268 keys = function (obj) { 6269 var i, 6270 res = []; 6271 for (i in obj) { 6272 if (hasOwnProp(obj, i)) { 6273 res.push(i); 6274 } 6275 } 6276 return res; 6277 }; 6278 } 6279 6280 var defaultCalendar = { 6281 sameDay: '[Today at] LT', 6282 nextDay: '[Tomorrow at] LT', 6283 nextWeek: 'dddd [at] LT', 6284 lastDay: '[Yesterday at] LT', 6285 lastWeek: '[Last] dddd [at] LT', 6286 sameElse: 'L', 6287 }; 6288 6289 function calendar(key, mom, now) { 6290 var output = this._calendar[key] || this._calendar['sameElse']; 6291 return isFunction(output) ? output.call(mom, now) : output; 6292 } 6293 6294 function zeroFill(number, targetLength, forceSign) { 6295 var absNumber = '' + Math.abs(number), 6296 zerosToFill = targetLength - absNumber.length, 6297 sign = number >= 0; 6298 return ( 6299 (sign ? (forceSign ? '+' : '') : '-') + 6300 Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + 6301 absNumber 6302 ); 6303 } 6304 6305 var formattingTokens = 6306
vendor: 5,181 bytes, lines 6306-6484
6306 /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, 6307 localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, 6308 formatFunctions = {}, 6309 formatTokenFunctions = {}; 6310 6311 // token: 'M' 6312 // padded: ['MM', 2] 6313 // ordinal: 'Mo' 6314 // callback: function () { this.month() + 1 } 6315 function addFormatToken(token, padded, ordinal, callback) { 6316 var func = callback; 6317 if (typeof callback === 'string') { 6318 func = function () { 6319 return this[callback](); 6320 }; 6321 } 6322 if (token) { 6323 formatTokenFunctions[token] = func; 6324 } 6325 if (padded) { 6326 formatTokenFunctions[padded[0]] = function () { 6327 return zeroFill(func.apply(this, arguments), padded[1], padded[2]); 6328 }; 6329 } 6330 if (ordinal) { 6331 formatTokenFunctions[ordinal] = function () { 6332 return this.localeData().ordinal( 6333 func.apply(this, arguments), 6334 token 6335 ); 6336 }; 6337 } 6338 } 6339 6340 function removeFormattingTokens(input) { 6341 if (input.match(/\[[\s\S]/)) { 6342 return input.replace(/^\[|\]$/g, ''); 6343 } 6344 return input.replace(/\\/g, ''); 6345 } 6346 6347 function makeFormatFunction(format) { 6348 var array = format.match(formattingTokens), 6349 i, 6350 length; 6351 6352 for (i = 0, length = array.length; i < length; i++) { 6353 if (formatTokenFunctions[array[i]]) { 6354 array[i] = formatTokenFunctions[array[i]]; 6355 } else { 6356 array[i] = removeFormattingTokens(array[i]); 6357 } 6358 } 6359 6360 return function (mom) { 6361 var output = '', 6362 i; 6363 for (i = 0; i < length; i++) { 6364 output += isFunction(array[i]) 6365 ? array[i].call(mom, format) 6366 : array[i]; 6367 } 6368 return output; 6369 }; 6370 } 6371 6372 // format date using native date object 6373 function formatMoment(m, format) { 6374 if (!m.isValid()) { 6375 return m.localeData().invalidDate(); 6376 } 6377 6378 format = expandFormat(format, m.localeData()); 6379 formatFunctions[format] = 6380 formatFunctions[format] || makeFormatFunction(format); 6381 6382 return formatFunctions[format](m); 6383 } 6384 6385 function expandFormat(format, locale) { 6386 var i = 5; 6387 6388 function replaceLongDateFormatTokens(input) { 6389 return locale.longDateFormat(input) || input; 6390 } 6391 6392 localFormattingTokens.lastIndex = 0; 6393 while (i >= 0 && localFormattingTokens.test(format)) { 6394 format = format.replace( 6395 localFormattingTokens, 6396 replaceLongDateFormatTokens 6397 ); 6398 localFormattingTokens.lastIndex = 0; 6399 i -= 1; 6400 } 6401 6402 return format; 6403 } 6404 6405 var defaultLongDateFormat = { 6406 LTS: 'h:mm:ss A', 6407 LT: 'h:mm A', 6408 L: 'MM/DD/YYYY', 6409 LL: 'MMMM D, YYYY', 6410 LLL: 'MMMM D, YYYY h:mm A', 6411 LLLL: 'dddd, MMMM D, YYYY h:mm A', 6412 }; 6413 6414 function longDateFormat(key) { 6415 var format = this._longDateFormat[key], 6416 formatUpper = this._longDateFormat[key.toUpperCase()]; 6417 6418 if (format || !formatUpper) { 6419 return format; 6420 } 6421 6422 this._longDateFormat[key] = formatUpper 6423 .match(formattingTokens) 6424 .map(function (tok) { 6425 if ( 6426 tok === 'MMMM' || 6427 tok === 'MM' || 6428 tok === 'DD' || 6429 tok === 'dddd' 6430 ) { 6431 return tok.slice(1); 6432 } 6433 return tok; 6434 }) 6435 .join(''); 6436 6437 return this._longDateFormat[key]; 6438 } 6439 6440 var defaultInvalidDate = 'Invalid date'; 6441 6442 function invalidDate() { 6443 return this._invalidDate; 6444 } 6445 6446 var defaultOrdinal = '%d', 6447 defaultDayOfMonthOrdinalParse = /\d{1,2}/; 6448 6449 function ordinal(number) { 6450 return this._ordinal.replace('%d', number); 6451 } 6452 6453 var defaultRelativeTime = { 6454 future: 'in %s', 6455 past: '%s ago', 6456 s: 'a few seconds', 6457 ss: '%d seconds', 6458 m: 'a minute', 6459 mm: '%d minutes', 6460 h: 'an hour', 6461 hh: '%d hours', 6462 d: 'a day', 6463 dd: '%d days', 6464 w: 'a week', 6465 ww: '%d weeks', 6466 M: 'a month', 6467 MM: '%d months', 6468 y: 'a year', 6469 yy: '%d years', 6470 }; 6471 6472 function relativeTime(number, withoutSuffix, string, isFuture) { 6473 var output = this._relativeTime[string]; 6474 return isFunction(output) 6475 ? output(number, withoutSuffix, string, isFuture) 6476 : output.replace(/%d/i, number); 6477 } 6478 6479 function pastFuture(diff, output) { 6480 var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 6481 return isFunction(format) ? format(output) : format.replace(/%s/i, output); 6482 } 6483 6484 var aliases = {
vendor: 18,098 bytes, lines 6484-7080
6484 6485 D: 'date', 6486 dates: 'date', 6487 date: 'date', 6488 d: 'day', 6489 days: 'day', 6490 day: 'day', 6491 e: 'weekday', 6492 weekdays: 'weekday', 6493 weekday: 'weekday', 6494 E: 'isoWeekday', 6495 isoweekdays: 'isoWeekday', 6496 isoweekday: 'isoWeekday', 6497 DDD: 'dayOfYear', 6498 dayofyears: 'dayOfYear', 6499 dayofyear: 'dayOfYear', 6500 h: 'hour', 6501 hours: 'hour', 6502 hour: 'hour', 6503 ms: 'millisecond', 6504 milliseconds: 'millisecond', 6505 millisecond: 'millisecond', 6506 m: 'minute', 6507 minutes: 'minute', 6508 minute: 'minute', 6509 M: 'month', 6510 months: 'month', 6511 month: 'month', 6512 Q: 'quarter', 6513 quarters: 'quarter', 6514 quarter: 'quarter', 6515 s: 'second', 6516 seconds: 'second', 6517 second: 'second', 6518 gg: 'weekYear', 6519 weekyears: 'weekYear', 6520 weekyear: 'weekYear', 6521 GG: 'isoWeekYear', 6522 isoweekyears: 'isoWeekYear', 6523 isoweekyear: 'isoWeekYear', 6524 w: 'week', 6525 weeks: 'week', 6526 week: 'week', 6527 W: 'isoWeek', 6528 isoweeks: 'isoWeek', 6529 isoweek: 'isoWeek', 6530 y: 'year', 6531 years: 'year', 6532 year: 'year', 6533 }; 6534 6535 function normalizeUnits(units) { 6536 return typeof units === 'string' 6537 ? aliases[units] || aliases[units.toLowerCase()] 6538 : undefined; 6539 } 6540 6541 function normalizeObjectUnits(inputObject) { 6542 var normalizedInput = {}, 6543 normalizedProp, 6544 prop; 6545 6546 for (prop in inputObject) { 6547 if (hasOwnProp(inputObject, prop)) { 6548 normalizedProp = normalizeUnits(prop); 6549 if (normalizedProp) { 6550 normalizedInput[normalizedProp] = inputObject[prop]; 6551 } 6552 } 6553 } 6554 6555 return normalizedInput; 6556 } 6557 6558 var priorities = { 6559 date: 9, 6560 day: 11, 6561 weekday: 11, 6562 isoWeekday: 11, 6563 dayOfYear: 4, 6564 hour: 13, 6565 millisecond: 16, 6566 minute: 14, 6567 month: 8, 6568 quarter: 7, 6569 second: 15, 6570 weekYear: 1, 6571 isoWeekYear: 1, 6572 week: 5, 6573 isoWeek: 5, 6574 year: 1, 6575 }; 6576 6577 function getPrioritizedUnits(unitsObj) { 6578 var units = [], 6579 u; 6580 for (u in unitsObj) { 6581 if (hasOwnProp(unitsObj, u)) { 6582 units.push({ unit: u, priority: priorities[u] }); 6583 } 6584 } 6585 units.sort(function (a, b) { 6586 return a.priority - b.priority; 6587 }); 6588 return units; 6589 } 6590 6591 var match1 = /\d/, // 0 - 9 6592 match2 = /\d\d/, // 00 - 99 6593 match3 = /\d{3}/, // 000 - 999 6594 match4 = /\d{4}/, // 0000 - 9999 6595 match6 = /[+-]?\d{6}/, // -999999 - 999999 6596 match1to2 = /\d\d?/, // 0 - 99 6597 match3to4 = /\d\d\d\d?/, // 999 - 9999 6598 match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 6599 match1to3 = /\d{1,3}/, // 0 - 999 6600 match1to4 = /\d{1,4}/, // 0 - 9999 6601 match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 6602 matchUnsigned = /\d+/, // 0 - inf 6603 matchSigned = /[+-]?\d+/, // -inf - inf 6604 matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z 6605 matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z 6606 matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 6607 // any word (or two) characters or numbers including two/three word month in arabic. 6608 // includes scottish gaelic two word and hyphenated months 6609 matchWord = 6610 /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, 6611 match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99 6612 match1to2HasZero = /^([1-9]\d|\d)/, // 0-99 6613 regexes; 6614 6615 regexes = {}; 6616 6617 function addRegexToken(token, regex, strictRegex) { 6618 regexes[token] = isFunction(regex) 6619 ? regex 6620 : function (isStrict, localeData) { 6621 return isStrict && strictRegex ? strictRegex : regex; 6622 }; 6623 } 6624 6625 function getParseRegexForToken(token, config) { 6626 if (!hasOwnProp(regexes, token)) { 6627 return new RegExp(unescapeFormat(token)); 6628 } 6629 6630 return regexes[token](config._strict, config._locale); 6631 } 6632 6633 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript 6634 function unescapeFormat(s) { 6635 return regexEscape( 6636 s 6637 .replace('\\', '') 6638 .replace( 6639 /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, 6640 function (matched, p1, p2, p3, p4) { 6641 return p1 || p2 || p3 || p4; 6642 } 6643 ) 6644 ); 6645 } 6646 6647 function regexEscape(s) { 6648 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 6649 } 6650 6651 function absFloor(number) { 6652 if (number < 0) { 6653 // -0 -> 0 6654 return Math.ceil(number) || 0; 6655 } else { 6656 return Math.floor(number); 6657 } 6658 } 6659 6660 function toInt(argumentForCoercion) { 6661 var coercedNumber = +argumentForCoercion, 6662 value = 0; 6663 6664 if (coercedNumber !== 0 && isFinite(coercedNumber)) { 6665 value = absFloor(coercedNumber); 6666 } 6667 6668 return value; 6669 } 6670 6671 var tokens = {}; 6672 6673 function addParseToken(token, callback) { 6674 var i, 6675 func = callback, 6676 tokenLen; 6677 if (typeof token === 'string') { 6678 token = [token]; 6679 } 6680 if (isNumber(callback)) { 6681 func = function (input, array) { 6682 array[callback] = toInt(input); 6683 }; 6684 } 6685 tokenLen = token.length; 6686 for (i = 0; i < tokenLen; i++) { 6687 tokens[token[i]] = func; 6688 } 6689 } 6690 6691 function addWeekParseToken(token, callback) { 6692 addParseToken(token, function (input, array, config, token) { 6693 config._w = config._w || {}; 6694 callback(input, config._w, config, token); 6695 }); 6696 } 6697 6698 function addTimeToArrayFromToken(token, input, config) { 6699 if (input != null && hasOwnProp(tokens, token)) { 6700 tokens[token](input, config._a, config, token); 6701 } 6702 } 6703 6704 function isLeapYear(year) { 6705 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; 6706 } 6707 6708 var YEAR = 0, 6709 MONTH = 1, 6710 DATE = 2, 6711 HOUR = 3, 6712 MINUTE = 4, 6713 SECOND = 5, 6714 MILLISECOND = 6, 6715 WEEK = 7, 6716 WEEKDAY = 8; 6717 6718 // FORMATTING 6719 6720 addFormatToken('Y', 0, 0, function () { 6721 var y = this.year(); 6722 return y <= 9999 ? zeroFill(y, 4) : '+' + y; 6723 }); 6724 6725 addFormatToken(0, ['YY', 2], 0, function () { 6726 return this.year() % 100; 6727 }); 6728 6729 addFormatToken(0, ['YYYY', 4], 0, 'year'); 6730 addFormatToken(0, ['YYYYY', 5], 0, 'year'); 6731 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); 6732 6733 // PARSING 6734 6735 addRegexToken('Y', matchSigned); 6736 addRegexToken('YY', match1to2, match2); 6737 addRegexToken('YYYY', match1to4, match4); 6738 addRegexToken('YYYYY', match1to6, match6); 6739 addRegexToken('YYYYYY', match1to6, match6); 6740 6741 addParseToken(['YYYYY', 'YYYYYY'], YEAR); 6742 addParseToken('YYYY', function (input, array) { 6743 array[YEAR] = 6744 input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); 6745 }); 6746 addParseToken('YY', function (input, array) { 6747 array[YEAR] = hooks.parseTwoDigitYear(input); 6748 }); 6749 addParseToken('Y', function (input, array) { 6750 array[YEAR] = parseInt(input, 10); 6751 }); 6752 6753 // HELPERS 6754 6755 function daysInYear(year) { 6756 return isLeapYear(year) ? 366 : 365; 6757 } 6758 6759 // HOOKS 6760 6761 hooks.parseTwoDigitYear = function (input) { 6762 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); 6763 }; 6764 6765 // MOMENTS 6766 6767 var getSetYear = makeGetSet('FullYear', true); 6768 6769 function getIsLeapYear() { 6770 return isLeapYear(this.year()); 6771 } 6772 6773 function makeGetSet(unit, keepTime) { 6774 return function (value) { 6775 if (value != null) { 6776 set$1(this, unit, value); 6777 hooks.updateOffset(this, keepTime); 6778 return this; 6779 } else { 6780 return get(this, unit); 6781 } 6782 }; 6783 } 6784 6785 function get(mom, unit) { 6786 if (!mom.isValid()) { 6787 return NaN; 6788 } 6789 6790 var d = mom._d, 6791 isUTC = mom._isUTC; 6792 6793 switch (unit) { 6794 case 'Milliseconds': 6795 return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds(); 6796 case 'Seconds': 6797 return isUTC ? d.getUTCSeconds() : d.getSeconds(); 6798 case 'Minutes': 6799 return isUTC ? d.getUTCMinutes() : d.getMinutes(); 6800 case 'Hours': 6801 return isUTC ? d.getUTCHours() : d.getHours(); 6802 case 'Date': 6803 return isUTC ? d.getUTCDate() : d.getDate(); 6804 case 'Day': 6805 return isUTC ? d.getUTCDay() : d.getDay(); 6806 case 'Month': 6807 return isUTC ? d.getUTCMonth() : d.getMonth(); 6808 case 'FullYear': 6809 return isUTC ? d.getUTCFullYear() : d.getFullYear(); 6810 default: 6811 return NaN; // Just in case 6812 } 6813 } 6814 6815 function set$1(mom, unit, value) { 6816 var d, isUTC, year, month, date; 6817 6818 if (!mom.isValid() || isNaN(value)) { 6819 return; 6820 } 6821 6822 d = mom._d; 6823 isUTC = mom._isUTC; 6824 6825 switch (unit) { 6826 case 'Milliseconds': 6827 return void (isUTC 6828 ? d.setUTCMilliseconds(value) 6829 : d.setMilliseconds(value)); 6830 case 'Seconds': 6831 return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value)); 6832 case 'Minutes': 6833 return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value)); 6834 case 'Hours': 6835 return void (isUTC ? d.setUTCHours(value) : d.setHours(value)); 6836 case 'Date': 6837 return void (isUTC ? d.setUTCDate(value) : d.setDate(value)); 6838 // case 'Day': // Not real 6839 // return void (isUTC ? d.setUTCDay(value) : d.setDay(value)); 6840 // case 'Month': // Not used because we need to pass two variables 6841 // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value)); 6842 case 'FullYear': 6843 break; // See below ... 6844 default: 6845 return; // Just in case 6846 } 6847 6848 year = value; 6849 month = mom.month(); 6850 date = mom.date(); 6851 date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date; 6852 void (isUTC 6853 ? d.setUTCFullYear(year, month, date) 6854 : d.setFullYear(year, month, date)); 6855 } 6856 6857 // MOMENTS 6858 6859 function stringGet(units) { 6860 units = normalizeUnits(units); 6861 if (isFunction(this[units])) { 6862 return this[units](); 6863 } 6864 return this; 6865 } 6866 6867 function stringSet(units, value) { 6868 if (typeof units === 'object') { 6869 units = normalizeObjectUnits(units); 6870 var prioritized = getPrioritizedUnits(units), 6871 i, 6872 prioritizedLen = prioritized.length; 6873 for (i = 0; i < prioritizedLen; i++) { 6874 this[prioritized[i].unit](units[prioritized[i].unit]); 6875 } 6876 } else { 6877 units = normalizeUnits(units); 6878 if (isFunction(this[units])) { 6879 return this[units](value); 6880 } 6881 } 6882 return this; 6883 } 6884 6885 function mod(n, x) { 6886 return ((n % x) + x) % x; 6887 } 6888 6889 var indexOf; 6890 6891 if (Array.prototype.indexOf) { 6892 indexOf = Array.prototype.indexOf; 6893 } else { 6894 indexOf = function (o) { 6895 // I know 6896 var i; 6897 for (i = 0; i < this.length; ++i) { 6898 if (this[i] === o) { 6899 return i; 6900 } 6901 } 6902 return -1; 6903 }; 6904 } 6905 6906 function daysInMonth(year, month) { 6907 if (isNaN(year) || isNaN(month)) { 6908 return NaN; 6909 } 6910 var modMonth = mod(month, 12); 6911 year += (month - modMonth) / 12; 6912 return modMonth === 1 6913 ? isLeapYear(year) 6914 ? 29 6915 : 28 6916 : 31 - ((modMonth % 7) % 2); 6917 } 6918 6919 // FORMATTING 6920 6921 addFormatToken('M', ['MM', 2], 'Mo', function () { 6922 return this.month() + 1; 6923 }); 6924 6925 addFormatToken('MMM', 0, 0, function (format) { 6926 return this.localeData().monthsShort(this, format); 6927 }); 6928 6929 addFormatToken('MMMM', 0, 0, function (format) { 6930 return this.localeData().months(this, format); 6931 }); 6932 6933 // PARSING 6934 6935 addRegexToken('M', match1to2, match1to2NoLeadingZero); 6936 addRegexToken('MM', match1to2, match2); 6937 addRegexToken('MMM', function (isStrict, locale) { 6938 return locale.monthsShortRegex(isStrict); 6939 }); 6940 addRegexToken('MMMM', function (isStrict, locale) { 6941 return locale.monthsRegex(isStrict); 6942 }); 6943 6944 addParseToken(['M', 'MM'], function (input, array) { 6945 array[MONTH] = toInt(input) - 1; 6946 }); 6947 6948 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { 6949 var month = config._locale.monthsParse(input, token, config._strict); 6950 // if we didn't find a month name, mark the date as invalid. 6951 if (month != null) { 6952 array[MONTH] = month; 6953 } else { 6954 getParsingFlags(config).invalidMonth = input; 6955 } 6956 }); 6957 6958 // LOCALES 6959 6960 var defaultLocaleMonths = 6961 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 6962 '_' 6963 ), 6964 defaultLocaleMonthsShort = 6965 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 6966 MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, 6967 defaultMonthsShortRegex = matchWord, 6968 defaultMonthsRegex = matchWord; 6969 6970 function localeMonths(m, format) { 6971 if (!m) { 6972 return isArray(this._months) 6973 ? this._months 6974 : this._months['standalone']; 6975 } 6976 return isArray(this._months) 6977 ? this._months[m.month()] 6978 : this._months[ 6979 (this._months.isFormat || MONTHS_IN_FORMAT).test(format) 6980 ? 'format' 6981 : 'standalone' 6982 ][m.month()]; 6983 } 6984 6985 function localeMonthsShort(m, format) { 6986 if (!m) { 6987 return isArray(this._monthsShort) 6988 ? this._monthsShort 6989 : this._monthsShort['standalone']; 6990 } 6991 return isArray(this._monthsShort) 6992 ? this._monthsShort[m.month()] 6993 : this._monthsShort[ 6994 MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' 6995 ][m.month()]; 6996 } 6997 6998 function handleStrictParse(monthName, format, strict) { 6999 var i, 7000 ii, 7001 mom, 7002 llc = monthName.toLocaleLowerCase(); 7003 if (!this._monthsParse) { 7004 // this is not used 7005 this._monthsParse = []; 7006 this._longMonthsParse = []; 7007 this._shortMonthsParse = []; 7008 for (i = 0; i < 12; ++i) { 7009 mom = createUTC([2000, i]); 7010 this._shortMonthsParse[i] = this.monthsShort( 7011 mom, 7012 '' 7013 ).toLocaleLowerCase(); 7014 this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); 7015 } 7016 } 7017 7018 if (strict) { 7019 if (format === 'MMM') { 7020 ii = indexOf.call(this._shortMonthsParse, llc); 7021 return ii !== -1 ? ii : null; 7022 } else { 7023 ii = indexOf.call(this._longMonthsParse, llc); 7024 return ii !== -1 ? ii : null; 7025 } 7026 } else { 7027 if (format === 'MMM') { 7028 ii = indexOf.call(this._shortMonthsParse, llc); 7029 if (ii !== -1) { 7030 return ii; 7031 } 7032 ii = indexOf.call(this._longMonthsParse, llc); 7033 return ii !== -1 ? ii : null; 7034 } else { 7035 ii = indexOf.call(this._longMonthsParse, llc); 7036 if (ii !== -1) { 7037 return ii; 7038 } 7039 ii = indexOf.call(this._shortMonthsParse, llc); 7040 return ii !== -1 ? ii : null; 7041 } 7042 } 7043 } 7044 7045 function localeMonthsParse(monthName, format, strict) { 7046 var i, mom, regex; 7047 7048 if (this._monthsParseExact) { 7049 return handleStrictParse.call(this, monthName, format, strict); 7050 } 7051 7052 if (!this._monthsParse) { 7053 this._monthsParse = []; 7054 this._longMonthsParse = []; 7055 this._shortMonthsParse = []; 7056 } 7057 7058 // TODO: add sorting 7059 // Sorting makes sure if one month (or abbr) is a prefix of another 7060 // see sorting in computeMonthsParse 7061 for (i = 0; i < 12; i++) { 7062 // make the regex if we don't have it already 7063 mom = createUTC([2000, i]); 7064 if (strict && !this._longMonthsParse[i]) { 7065 this._longMonthsParse[i] = new RegExp( 7066 '^' + this.months(mom, '').replace('.', '') + '$', 7067 'i' 7068 ); 7069 this._shortMonthsParse[i] = new RegExp( 7070 '^' + this.monthsShort(mom, '').replace('.', '') + '$', 7071 'i' 7072 ); 7073 } 7074 if (!strict && !this._monthsParse[i]) { 7075 regex = 7076 '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); 7077 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); 7078 } 7079 // test the regex 7080 if (
vendor: 5,127 bytes, lines 7081-7246
7081 strict && 7082 format === 'MMMM' && 7083 this._longMonthsParse[i].test(monthName) 7084 ) { 7085 return i; 7086 } else if ( 7087 strict && 7088 format === 'MMM' && 7089 this._shortMonthsParse[i].test(monthName) 7090 ) { 7091 return i; 7092 } else if (!strict && this._monthsParse[i].test(monthName)) { 7093 return i; 7094 } 7095 } 7096 } 7097 7098 // MOMENTS 7099 7100 function setMonth(mom, value) { 7101 if (!mom.isValid()) { 7102 // No op 7103 return mom; 7104 } 7105 7106 if (typeof value === 'string') { 7107 if (/^\d+$/.test(value)) { 7108 value = toInt(value); 7109 } else { 7110 value = mom.localeData().monthsParse(value); 7111 // TODO: Another silent failure? 7112 if (!isNumber(value)) { 7113 return mom; 7114 } 7115 } 7116 } 7117 7118 var month = value, 7119 date = mom.date(); 7120 7121 date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month)); 7122 void (mom._isUTC 7123 ? mom._d.setUTCMonth(month, date) 7124 : mom._d.setMonth(month, date)); 7125 return mom; 7126 } 7127 7128 function getSetMonth(value) { 7129 if (value != null) { 7130 setMonth(this, value); 7131 hooks.updateOffset(this, true); 7132 return this; 7133 } else { 7134 return get(this, 'Month'); 7135 } 7136 } 7137 7138 function getDaysInMonth() { 7139 return daysInMonth(this.year(), this.month()); 7140 } 7141 7142 function monthsShortRegex(isStrict) { 7143 if (this._monthsParseExact) { 7144 if (!hasOwnProp(this, '_monthsRegex')) { 7145 computeMonthsParse.call(this); 7146 } 7147 if (isStrict) { 7148 return this._monthsShortStrictRegex; 7149 } else { 7150 return this._monthsShortRegex; 7151 } 7152 } else { 7153 if (!hasOwnProp(this, '_monthsShortRegex')) { 7154 this._monthsShortRegex = defaultMonthsShortRegex; 7155 } 7156 return this._monthsShortStrictRegex && isStrict 7157 ? this._monthsShortStrictRegex 7158 : this._monthsShortRegex; 7159 } 7160 } 7161 7162 function monthsRegex(isStrict) { 7163 if (this._monthsParseExact) { 7164 if (!hasOwnProp(this, '_monthsRegex')) { 7165 computeMonthsParse.call(this); 7166 } 7167 if (isStrict) { 7168 return this._monthsStrictRegex; 7169 } else { 7170 return this._monthsRegex; 7171 } 7172 } else { 7173 if (!hasOwnProp(this, '_monthsRegex')) { 7174 this._monthsRegex = defaultMonthsRegex; 7175 } 7176 return this._monthsStrictRegex && isStrict 7177 ? this._monthsStrictRegex 7178 : this._monthsRegex; 7179 } 7180 } 7181 7182 function computeMonthsParse() { 7183 function cmpLenRev(a, b) { 7184 return b.length - a.length; 7185 } 7186 7187 var shortPieces = [], 7188 longPieces = [], 7189 mixedPieces = [], 7190 i, 7191 mom, 7192 shortP, 7193 longP; 7194 for (i = 0; i < 12; i++) { 7195 // make the regex if we don't have it already 7196 mom = createUTC([2000, i]); 7197 shortP = regexEscape(this.monthsShort(mom, '')); 7198 longP = regexEscape(this.months(mom, '')); 7199 shortPieces.push(shortP); 7200 longPieces.push(longP); 7201 mixedPieces.push(longP); 7202 mixedPieces.push(shortP); 7203 } 7204 // Sorting makes sure if one month (or abbr) is a prefix of another it 7205 // will match the longer piece. 7206 shortPieces.sort(cmpLenRev); 7207 longPieces.sort(cmpLenRev); 7208 mixedPieces.sort(cmpLenRev); 7209 7210 this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 7211 this._monthsShortRegex = this._monthsRegex; 7212 this._monthsStrictRegex = new RegExp( 7213 '^(' + longPieces.join('|') + ')', 7214 'i' 7215 ); 7216 this._monthsShortStrictRegex = new RegExp( 7217 '^(' + shortPieces.join('|') + ')', 7218 'i' 7219 ); 7220 } 7221 7222 function createDate(y, m, d, h, M, s, ms) { 7223 // can't just apply() to create a date: 7224 // https://stackoverflow.com/q/181348 7225 var date; 7226 // the date constructor remaps years 0-99 to 1900-1999 7227 if (y < 100 && y >= 0) { 7228 // preserve leap years using a full 400 year cycle, then reset 7229 date = new Date(y + 400, m, d, h, M, s, ms); 7230 if (isFinite(date.getFullYear())) { 7231 date.setFullYear(y); 7232 } 7233 } else { 7234 date = new Date(y, m, d, h, M, s, ms); 7235 } 7236 7237 return date; 7238 } 7239 7240 function createUTCDate(y) { 7241 var date, args; 7242 // the Date.UTC function remaps years 0-99 to 1900-1999 7243 if (y < 100 && y >= 0) { 7244 args = Array.prototype.slice.call(arguments); 7245 // preserve leap years using a full 400 year cycle, then reset 7246 args[0] = y + 400;
vendor: 11,578 bytes, lines 7247-7608
7247 date = new Date(Date.UTC.apply(null, args)); 7248 if (isFinite(date.getUTCFullYear())) { 7249 date.setUTCFullYear(y); 7250 } 7251 } else { 7252 date = new Date(Date.UTC.apply(null, arguments)); 7253 } 7254 7255 return date; 7256 } 7257 7258 // start-of-first-week - start-of-year 7259 function firstWeekOffset(year, dow, doy) { 7260 var // first-week day -- which january is always in the first week (4 for iso, 1 for other) 7261 fwd = 7 + dow - doy, 7262 // first-week day local weekday -- which local weekday is fwd 7263 fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; 7264 7265 return -fwdlw + fwd - 1; 7266 } 7267 7268 // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday 7269 function dayOfYearFromWeeks(year, week, weekday, dow, doy) { 7270 var localWeekday = (7 + weekday - dow) % 7, 7271 weekOffset = firstWeekOffset(year, dow, doy), 7272 dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, 7273 resYear, 7274 resDayOfYear; 7275 7276 if (dayOfYear <= 0) { 7277 resYear = year - 1; 7278 resDayOfYear = daysInYear(resYear) + dayOfYear; 7279 } else if (dayOfYear > daysInYear(year)) { 7280 resYear = year + 1; 7281 resDayOfYear = dayOfYear - daysInYear(year); 7282 } else { 7283 resYear = year; 7284 resDayOfYear = dayOfYear; 7285 } 7286 7287 return { 7288 year: resYear, 7289 dayOfYear: resDayOfYear, 7290 }; 7291 } 7292 7293 function weekOfYear(mom, dow, doy) { 7294 var weekOffset = firstWeekOffset(mom.year(), dow, doy), 7295 week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, 7296 resWeek, 7297 resYear; 7298 7299 if (week < 1) { 7300 resYear = mom.year() - 1; 7301 resWeek = week + weeksInYear(resYear, dow, doy); 7302 } else if (week > weeksInYear(mom.year(), dow, doy)) { 7303 resWeek = week - weeksInYear(mom.year(), dow, doy); 7304 resYear = mom.year() + 1; 7305 } else { 7306 resYear = mom.year(); 7307 resWeek = week; 7308 } 7309 7310 return { 7311 week: resWeek, 7312 year: resYear, 7313 }; 7314 } 7315 7316 function weeksInYear(year, dow, doy) { 7317 var weekOffset = firstWeekOffset(year, dow, doy), 7318 weekOffsetNext = firstWeekOffset(year + 1, dow, doy); 7319 return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; 7320 } 7321 7322 // FORMATTING 7323 7324 addFormatToken('w', ['ww', 2], 'wo', 'week'); 7325 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); 7326 7327 // PARSING 7328 7329 addRegexToken('w', match1to2, match1to2NoLeadingZero); 7330 addRegexToken('ww', match1to2, match2); 7331 addRegexToken('W', match1to2, match1to2NoLeadingZero); 7332 addRegexToken('WW', match1to2, match2); 7333 7334 addWeekParseToken( 7335 ['w', 'ww', 'W', 'WW'], 7336 function (input, week, config, token) { 7337 week[token.substr(0, 1)] = toInt(input); 7338 } 7339 ); 7340 7341 // HELPERS 7342 7343 // LOCALES 7344 7345 function localeWeek(mom) { 7346 return weekOfYear(mom, this._week.dow, this._week.doy).week; 7347 } 7348 7349 var defaultLocaleWeek = { 7350 dow: 0, // Sunday is the first day of the week. 7351 doy: 6, // The week that contains Jan 6th is the first week of the year. 7352 }; 7353 7354 function localeFirstDayOfWeek() { 7355 return this._week.dow; 7356 } 7357 7358 function localeFirstDayOfYear() { 7359 return this._week.doy; 7360 } 7361 7362 // MOMENTS 7363 7364 function getSetWeek(input) { 7365 var week = this.localeData().week(this); 7366 return input == null ? week : this.add((input - week) * 7, 'd'); 7367 } 7368 7369 function getSetISOWeek(input) { 7370 var week = weekOfYear(this, 1, 4).week; 7371 return input == null ? week : this.add((input - week) * 7, 'd'); 7372 } 7373 7374 // FORMATTING 7375 7376 addFormatToken('d', 0, 'do', 'day'); 7377 7378 addFormatToken('dd', 0, 0, function (format) { 7379 return this.localeData().weekdaysMin(this, format); 7380 }); 7381 7382 addFormatToken('ddd', 0, 0, function (format) { 7383 return this.localeData().weekdaysShort(this, format); 7384 }); 7385 7386 addFormatToken('dddd', 0, 0, function (format) { 7387 return this.localeData().weekdays(this, format); 7388 }); 7389 7390 addFormatToken('e', 0, 0, 'weekday'); 7391 addFormatToken('E', 0, 0, 'isoWeekday'); 7392 7393 // PARSING 7394 7395 addRegexToken('d', match1to2); 7396 addRegexToken('e', match1to2); 7397 addRegexToken('E', match1to2); 7398 addRegexToken('dd', function (isStrict, locale) { 7399 return locale.weekdaysMinRegex(isStrict); 7400 }); 7401 addRegexToken('ddd', function (isStrict, locale) { 7402 return locale.weekdaysShortRegex(isStrict); 7403 }); 7404 addRegexToken('dddd', function (isStrict, locale) { 7405 return locale.weekdaysRegex(isStrict); 7406 }); 7407 7408 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { 7409 var weekday = config._locale.weekdaysParse(input, token, config._strict); 7410 // if we didn't get a weekday name, mark the date as invalid 7411 if (weekday != null) { 7412 week.d = weekday; 7413 } else { 7414 getParsingFlags(config).invalidWeekday = input; 7415 } 7416 }); 7417 7418 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { 7419 week[token] = toInt(input); 7420 }); 7421 7422 // HELPERS 7423 7424 function parseWeekday(input, locale) { 7425 if (typeof input !== 'string') { 7426 return input; 7427 } 7428 7429 if (!isNaN(input)) { 7430 return parseInt(input, 10); 7431 } 7432 7433 input = locale.weekdaysParse(input); 7434 if (typeof input === 'number') { 7435 return input; 7436 } 7437 7438 return null; 7439 } 7440 7441 function parseIsoWeekday(input, locale) { 7442 if (typeof input === 'string') { 7443 return locale.weekdaysParse(input) % 7 || 7; 7444 } 7445 return isNaN(input) ? null : input; 7446 } 7447 7448 // LOCALES 7449 function shiftWeekdays(ws, n) { 7450 return ws.slice(n, 7).concat(ws.slice(0, n)); 7451 } 7452 7453 var defaultLocaleWeekdays = 7454 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), 7455 defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 7456 defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 7457 defaultWeekdaysRegex = matchWord, 7458 defaultWeekdaysShortRegex = matchWord, 7459 defaultWeekdaysMinRegex = matchWord; 7460 7461 function localeWeekdays(m, format) { 7462 var weekdays = isArray(this._weekdays) 7463 ? this._weekdays 7464 : this._weekdays[ 7465 m && m !== true && this._weekdays.isFormat.test(format) 7466 ? 'format' 7467 : 'standalone' 7468 ]; 7469 return m === true 7470 ? shiftWeekdays(weekdays, this._week.dow) 7471 : m 7472 ? weekdays[m.day()] 7473 : weekdays; 7474 } 7475 7476 function localeWeekdaysShort(m) { 7477 return m === true 7478 ? shiftWeekdays(this._weekdaysShort, this._week.dow) 7479 : m 7480 ? this._weekdaysShort[m.day()] 7481 : this._weekdaysShort; 7482 } 7483 7484 function localeWeekdaysMin(m) { 7485 return m === true 7486 ? shiftWeekdays(this._weekdaysMin, this._week.dow) 7487 : m 7488 ? this._weekdaysMin[m.day()] 7489 : this._weekdaysMin; 7490 } 7491 7492 function handleStrictParse$1(weekdayName, format, strict) { 7493 var i, 7494 ii, 7495 mom, 7496 llc = weekdayName.toLocaleLowerCase(); 7497 if (!this._weekdaysParse) { 7498 this._weekdaysParse = []; 7499 this._shortWeekdaysParse = []; 7500 this._minWeekdaysParse = []; 7501 7502 for (i = 0; i < 7; ++i) { 7503 mom = createUTC([2000, 1]).day(i); 7504 this._minWeekdaysParse[i] = this.weekdaysMin( 7505 mom, 7506 '' 7507 ).toLocaleLowerCase(); 7508 this._shortWeekdaysParse[i] = this.weekdaysShort( 7509 mom, 7510 '' 7511 ).toLocaleLowerCase(); 7512 this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); 7513 } 7514 } 7515 7516 if (strict) { 7517 if (format === 'dddd') { 7518 ii = indexOf.call(this._weekdaysParse, llc); 7519 return ii !== -1 ? ii : null; 7520 } else if (format === 'ddd') { 7521 ii = indexOf.call(this._shortWeekdaysParse, llc); 7522 return ii !== -1 ? ii : null; 7523 } else { 7524 ii = indexOf.call(this._minWeekdaysParse, llc); 7525 return ii !== -1 ? ii : null; 7526 } 7527 } else { 7528 if (format === 'dddd') { 7529 ii = indexOf.call(this._weekdaysParse, llc); 7530 if (ii !== -1) { 7531 return ii; 7532 } 7533 ii = indexOf.call(this._shortWeekdaysParse, llc); 7534 if (ii !== -1) { 7535 return ii; 7536 } 7537 ii = indexOf.call(this._minWeekdaysParse, llc); 7538 return ii !== -1 ? ii : null; 7539 } else if (format === 'ddd') { 7540 ii = indexOf.call(this._shortWeekdaysParse, llc); 7541 if (ii !== -1) { 7542 return ii; 7543 } 7544 ii = indexOf.call(this._weekdaysParse, llc); 7545 if (ii !== -1) { 7546 return ii; 7547 } 7548 ii = indexOf.call(this._minWeekdaysParse, llc); 7549 return ii !== -1 ? ii : null; 7550 } else { 7551 ii = indexOf.call(this._minWeekdaysParse, llc); 7552 if (ii !== -1) { 7553 return ii; 7554 } 7555 ii = indexOf.call(this._weekdaysParse, llc); 7556 if (ii !== -1) { 7557 return ii; 7558 } 7559 ii = indexOf.call(this._shortWeekdaysParse, llc); 7560 return ii !== -1 ? ii : null; 7561 } 7562 } 7563 } 7564 7565 function localeWeekdaysParse(weekdayName, format, strict) { 7566 var i, mom, regex; 7567 7568 if (this._weekdaysParseExact) { 7569 return handleStrictParse$1.call(this, weekdayName, format, strict); 7570 } 7571 7572 if (!this._weekdaysParse) { 7573 this._weekdaysParse = []; 7574 this._minWeekdaysParse = []; 7575 this._shortWeekdaysParse = []; 7576 this._fullWeekdaysParse = []; 7577 } 7578 7579 for (i = 0; i < 7; i++) { 7580 // make the regex if we don't have it already 7581 7582 mom = createUTC([2000, 1]).day(i); 7583 if (strict && !this._fullWeekdaysParse[i]) { 7584 this._fullWeekdaysParse[i] = new RegExp( 7585 '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 7586 'i' 7587 ); 7588 this._shortWeekdaysParse[i] = new RegExp( 7589 '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 7590 'i' 7591 ); 7592 this._minWeekdaysParse[i] = new RegExp( 7593 '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 7594 'i' 7595 ); 7596 } 7597 if (!this._weekdaysParse[i]) { 7598 regex = 7599 '^' + 7600 this.weekdays(mom, '') + 7601 '|^' + 7602 this.weekdaysShort(mom, '') + 7603 '|^' + 7604 this.weekdaysMin(mom, ''); 7605 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); 7606 } 7607 // test the regex 7608 if (
vendor: 9,327 bytes, lines 7609-7901
7609 strict && 7610 format === 'dddd' && 7611 this._fullWeekdaysParse[i].test(weekdayName) 7612 ) { 7613 return i; 7614 } else if ( 7615 strict && 7616 format === 'ddd' && 7617 this._shortWeekdaysParse[i].test(weekdayName) 7618 ) { 7619 return i; 7620 } else if ( 7621 strict && 7622 format === 'dd' && 7623 this._minWeekdaysParse[i].test(weekdayName) 7624 ) { 7625 return i; 7626 } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { 7627 return i; 7628 } 7629 } 7630 } 7631 7632 // MOMENTS 7633 7634 function getSetDayOfWeek(input) { 7635 if (!this.isValid()) { 7636 return input != null ? this : NaN; 7637 } 7638 7639 var day = get(this, 'Day'); 7640 if (input != null) { 7641 input = parseWeekday(input, this.localeData()); 7642 return this.add(input - day, 'd'); 7643 } else { 7644 return day; 7645 } 7646 } 7647 7648 function getSetLocaleDayOfWeek(input) { 7649 if (!this.isValid()) { 7650 return input != null ? this : NaN; 7651 } 7652 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; 7653 return input == null ? weekday : this.add(input - weekday, 'd'); 7654 } 7655 7656 function getSetISODayOfWeek(input) { 7657 if (!this.isValid()) { 7658 return input != null ? this : NaN; 7659 } 7660 7661 // behaves the same as moment#day except 7662 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) 7663 // as a setter, sunday should belong to the previous week. 7664 7665 if (input != null) { 7666 var weekday = parseIsoWeekday(input, this.localeData()); 7667 return this.day(this.day() % 7 ? weekday : weekday - 7); 7668 } else { 7669 return this.day() || 7; 7670 } 7671 } 7672 7673 function weekdaysRegex(isStrict) { 7674 if (this._weekdaysParseExact) { 7675 if (!hasOwnProp(this, '_weekdaysRegex')) { 7676 computeWeekdaysParse.call(this); 7677 } 7678 if (isStrict) { 7679 return this._weekdaysStrictRegex; 7680 } else { 7681 return this._weekdaysRegex; 7682 } 7683 } else { 7684 if (!hasOwnProp(this, '_weekdaysRegex')) { 7685 this._weekdaysRegex = defaultWeekdaysRegex; 7686 } 7687 return this._weekdaysStrictRegex && isStrict 7688 ? this._weekdaysStrictRegex 7689 : this._weekdaysRegex; 7690 } 7691 } 7692 7693 function weekdaysShortRegex(isStrict) { 7694 if (this._weekdaysParseExact) { 7695 if (!hasOwnProp(this, '_weekdaysRegex')) { 7696 computeWeekdaysParse.call(this); 7697 } 7698 if (isStrict) { 7699 return this._weekdaysShortStrictRegex; 7700 } else { 7701 return this._weekdaysShortRegex; 7702 } 7703 } else { 7704 if (!hasOwnProp(this, '_weekdaysShortRegex')) { 7705 this._weekdaysShortRegex = defaultWeekdaysShortRegex; 7706 } 7707 return this._weekdaysShortStrictRegex && isStrict 7708 ? this._weekdaysShortStrictRegex 7709 : this._weekdaysShortRegex; 7710 } 7711 } 7712 7713 function weekdaysMinRegex(isStrict) { 7714 if (this._weekdaysParseExact) { 7715 if (!hasOwnProp(this, '_weekdaysRegex')) { 7716 computeWeekdaysParse.call(this); 7717 } 7718 if (isStrict) { 7719 return this._weekdaysMinStrictRegex; 7720 } else { 7721 return this._weekdaysMinRegex; 7722 } 7723 } else { 7724 if (!hasOwnProp(this, '_weekdaysMinRegex')) { 7725 this._weekdaysMinRegex = defaultWeekdaysMinRegex; 7726 } 7727 return this._weekdaysMinStrictRegex && isStrict 7728 ? this._weekdaysMinStrictRegex 7729 : this._weekdaysMinRegex; 7730 } 7731 } 7732 7733 function computeWeekdaysParse() { 7734 function cmpLenRev(a, b) { 7735 return b.length - a.length; 7736 } 7737 7738 var minPieces = [], 7739 shortPieces = [], 7740 longPieces = [], 7741 mixedPieces = [], 7742 i, 7743 mom, 7744 minp, 7745 shortp, 7746 longp; 7747 for (i = 0; i < 7; i++) { 7748 // make the regex if we don't have it already 7749 mom = createUTC([2000, 1]).day(i); 7750 minp = regexEscape(this.weekdaysMin(mom, '')); 7751 shortp = regexEscape(this.weekdaysShort(mom, '')); 7752 longp = regexEscape(this.weekdays(mom, '')); 7753 minPieces.push(minp); 7754 shortPieces.push(shortp); 7755 longPieces.push(longp); 7756 mixedPieces.push(minp); 7757 mixedPieces.push(shortp); 7758 mixedPieces.push(longp); 7759 } 7760 // Sorting makes sure if one weekday (or abbr) is a prefix of another it 7761 // will match the longer piece. 7762 minPieces.sort(cmpLenRev); 7763 shortPieces.sort(cmpLenRev); 7764 longPieces.sort(cmpLenRev); 7765 mixedPieces.sort(cmpLenRev); 7766 7767 this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 7768 this._weekdaysShortRegex = this._weekdaysRegex; 7769 this._weekdaysMinRegex = this._weekdaysRegex; 7770 7771 this._weekdaysStrictRegex = new RegExp( 7772 '^(' + longPieces.join('|') + ')', 7773 'i' 7774 ); 7775 this._weekdaysShortStrictRegex = new RegExp( 7776 '^(' + shortPieces.join('|') + ')', 7777 'i' 7778 ); 7779 this._weekdaysMinStrictRegex = new RegExp( 7780 '^(' + minPieces.join('|') + ')', 7781 'i' 7782 ); 7783 } 7784 7785 // FORMATTING 7786 7787 function hFormat() { 7788 return this.hours() % 12 || 12; 7789 } 7790 7791 function kFormat() { 7792 return this.hours() || 24; 7793 } 7794 7795 addFormatToken('H', ['HH', 2], 0, 'hour'); 7796 addFormatToken('h', ['hh', 2], 0, hFormat); 7797 addFormatToken('k', ['kk', 2], 0, kFormat); 7798 7799 addFormatToken('hmm', 0, 0, function () { 7800 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); 7801 }); 7802 7803 addFormatToken('hmmss', 0, 0, function () { 7804 return ( 7805 '' + 7806 hFormat.apply(this) + 7807 zeroFill(this.minutes(), 2) + 7808 zeroFill(this.seconds(), 2) 7809 ); 7810 }); 7811 7812 addFormatToken('Hmm', 0, 0, function () { 7813 return '' + this.hours() + zeroFill(this.minutes(), 2); 7814 }); 7815 7816 addFormatToken('Hmmss', 0, 0, function () { 7817 return ( 7818 '' + 7819 this.hours() + 7820 zeroFill(this.minutes(), 2) + 7821 zeroFill(this.seconds(), 2) 7822 ); 7823 }); 7824 7825 function meridiem(token, lowercase) { 7826 addFormatToken(token, 0, 0, function () { 7827 return this.localeData().meridiem( 7828 this.hours(), 7829 this.minutes(), 7830 lowercase 7831 ); 7832 }); 7833 } 7834 7835 meridiem('a', true); 7836 meridiem('A', false); 7837 7838 // PARSING 7839 7840 function matchMeridiem(isStrict, locale) { 7841 return locale._meridiemParse; 7842 } 7843 7844 addRegexToken('a', matchMeridiem); 7845 addRegexToken('A', matchMeridiem); 7846 addRegexToken('H', match1to2, match1to2HasZero); 7847 addRegexToken('h', match1to2, match1to2NoLeadingZero); 7848 addRegexToken('k', match1to2, match1to2NoLeadingZero); 7849 addRegexToken('HH', match1to2, match2); 7850 addRegexToken('hh', match1to2, match2); 7851 addRegexToken('kk', match1to2, match2); 7852 7853 addRegexToken('hmm', match3to4); 7854 addRegexToken('hmmss', match5to6); 7855 addRegexToken('Hmm', match3to4); 7856 addRegexToken('Hmmss', match5to6); 7857 7858 addParseToken(['H', 'HH'], HOUR); 7859 addParseToken(['k', 'kk'], function (input, array, config) { 7860 var kInput = toInt(input); 7861 array[HOUR] = kInput === 24 ? 0 : kInput; 7862 }); 7863 addParseToken(['a', 'A'], function (input, array, config) { 7864 config._isPm = config._locale.isPM(input); 7865 config._meridiem = input; 7866 }); 7867 addParseToken(['h', 'hh'], function (input, array, config) { 7868 array[HOUR] = toInt(input); 7869 getParsingFlags(config).bigHour = true; 7870 }); 7871 addParseToken('hmm', function (input, array, config) { 7872 var pos = input.length - 2; 7873 array[HOUR] = toInt(input.substr(0, pos)); 7874 array[MINUTE] = toInt(input.substr(pos)); 7875 getParsingFlags(config).bigHour = true; 7876 }); 7877 addParseToken('hmmss', function (input, array, config) { 7878 var pos1 = input.length - 4, 7879 pos2 = input.length - 2; 7880 array[HOUR] = toInt(input.substr(0, pos1)); 7881 array[MINUTE] = toInt(input.substr(pos1, 2)); 7882 array[SECOND] = toInt(input.substr(pos2)); 7883 getParsingFlags(config).bigHour = true; 7884 }); 7885 addParseToken('Hmm', function (input, array, config) { 7886 var pos = input.length - 2; 7887 array[HOUR] = toInt(input.substr(0, pos)); 7888 array[MINUTE] = toInt(input.substr(pos)); 7889 }); 7890 addParseToken('Hmmss', function (input, array, config) { 7891 var pos1 = input.length - 4, 7892 pos2 = input.length - 2; 7893 array[HOUR] = toInt(input.substr(0, pos1)); 7894 array[MINUTE] = toInt(input.substr(pos1, 2)); 7895 array[SECOND] = toInt(input.substr(pos2)); 7896 }); 7897 7898 // LOCALES 7899 7900 function localeIsPM(input) { 7901 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing str
vendor: 7,803 bytes, lines 7901-8120
7901ings like arrays 7902 // Using charAt should be more compatible. 7903 return (input + '').toLowerCase().charAt(0) === 'p'; 7904 } 7905 7906 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, 7907 // Setting the hour should keep the time, because the user explicitly 7908 // specified which hour they want. So trying to maintain the same hour (in 7909 // a new timezone) makes sense. Adding/subtracting hours does not follow 7910 // this rule. 7911 getSetHour = makeGetSet('Hours', true); 7912 7913 function localeMeridiem(hours, minutes, isLower) { 7914 if (hours > 11) { 7915 return isLower ? 'pm' : 'PM'; 7916 } else { 7917 return isLower ? 'am' : 'AM'; 7918 } 7919 } 7920 7921 var baseConfig = { 7922 calendar: defaultCalendar, 7923 longDateFormat: defaultLongDateFormat, 7924 invalidDate: defaultInvalidDate, 7925 ordinal: defaultOrdinal, 7926 dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, 7927 relativeTime: defaultRelativeTime, 7928 7929 months: defaultLocaleMonths, 7930 monthsShort: defaultLocaleMonthsShort, 7931 7932 week: defaultLocaleWeek, 7933 7934 weekdays: defaultLocaleWeekdays, 7935 weekdaysMin: defaultLocaleWeekdaysMin, 7936 weekdaysShort: defaultLocaleWeekdaysShort, 7937 7938 meridiemParse: defaultLocaleMeridiemParse, 7939 }; 7940 7941 // internal storage for locale config files 7942 var locales = {}, 7943 localeFamilies = {}, 7944 globalLocale; 7945 7946 function commonPrefix(arr1, arr2) { 7947 var i, 7948 minl = Math.min(arr1.length, arr2.length); 7949 for (i = 0; i < minl; i += 1) { 7950 if (arr1[i] !== arr2[i]) { 7951 return i; 7952 } 7953 } 7954 return minl; 7955 } 7956 7957 function normalizeLocale(key) { 7958 return key ? key.toLowerCase().replace('_', '-') : key; 7959 } 7960 7961 // pick the locale from the array 7962 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each 7963 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root 7964 function chooseLocale(names) { 7965 var i = 0, 7966 j, 7967 next, 7968 locale, 7969 split; 7970 7971 while (i < names.length) { 7972 split = normalizeLocale(names[i]).split('-'); 7973 j = split.length; 7974 next = normalizeLocale(names[i + 1]); 7975 next = next ? next.split('-') : null; 7976 while (j > 0) { 7977 locale = loadLocale(split.slice(0, j).join('-')); 7978 if (locale) { 7979 return locale; 7980 } 7981 if ( 7982 next && 7983 next.length >= j && 7984 commonPrefix(split, next) >= j - 1 7985 ) { 7986 //the next array item is better than a shallower substring of this one 7987 break; 7988 } 7989 j--; 7990 } 7991 i++; 7992 } 7993 return globalLocale; 7994 } 7995 7996 function isLocaleNameSane(name) { 7997 // Prevent names that look like filesystem paths, i.e contain '/' or '\' 7998 // Ensure name is available and function returns boolean 7999 return !!(name && name.match('^[^/\\\\]*$')); 8000 } 8001 8002 function loadLocale(name) { 8003 var oldLocale = null, 8004 aliasedRequire; 8005 // TODO: Find a better way to register and load all the locales in Node 8006 if ( 8007 locales[name] === undefined && 8008 typeof module !== 'undefined' && 8009 module && 8010 module.exports && 8011 isLocaleNameSane(name) 8012 ) { 8013 try { 8014 oldLocale = globalLocale._abbr; 8015 aliasedRequire = require; 8016 aliasedRequire('./locale/' + name); 8017 getSetGlobalLocale(oldLocale); 8018 } catch (e) { 8019 // mark as not found to avoid repeating expensive file require call causing high CPU 8020 // when trying to find en-US, en_US, en-us for every format call 8021 locales[name] = null; // null means not found 8022 } 8023 } 8024 return locales[name]; 8025 } 8026 8027 // This function will load locale and then set the global locale. If 8028 // no arguments are passed in, it will simply return the current global 8029 // locale key. 8030 function getSetGlobalLocale(key, values) { 8031 var data; 8032 if (key) { 8033 if (isUndefined(values)) { 8034 data = getLocale(key); 8035 } else { 8036 data = defineLocale(key, values); 8037 } 8038 8039 if (data) { 8040 // moment.duration._locale = moment._locale = data; 8041 globalLocale = data; 8042 } else { 8043 if (typeof console !== 'undefined' && console.warn) { 8044 //warn user if arguments are passed but the locale could not be set 8045 console.warn( 8046 'Locale ' + key + ' not found. Did you forget to load it?' 8047 ); 8048 } 8049 } 8050 } 8051 8052 return globalLocale._abbr; 8053 } 8054 8055 function defineLocale(name, config) { 8056 if (config !== null) { 8057 var locale, 8058 parentConfig = baseConfig; 8059 config.abbr = name; 8060 if (locales[name] != null) { 8061 deprecateSimple( 8062 'defineLocaleOverride', 8063 'use moment.updateLocale(localeName, config) to change ' + 8064 'an existing locale. moment.defineLocale(localeName, ' + 8065 'config) should only be used for creating a new locale ' + 8066 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' 8067 ); 8068 parentConfig = locales[name]._config; 8069 } else if (config.parentLocale != null) { 8070 if (locales[config.parentLocale] != null) { 8071 parentConfig = locales[config.parentLocale]._config; 8072 } else { 8073 locale = loadLocale(config.parentLocale); 8074 if (locale != null) { 8075 parentConfig = locale._config; 8076 } else { 8077 if (!localeFamilies[config.parentLocale]) { 8078 localeFamilies[config.parentLocale] = []; 8079 } 8080 localeFamilies[config.parentLocale].push({ 8081 name: name, 8082 config: config, 8083 }); 8084 return null; 8085 } 8086 } 8087 } 8088 locales[name] = new Locale(mergeConfigs(parentConfig, config)); 8089 8090 if (localeFamilies[name]) { 8091 localeFamilies[name].forEach(function (x) { 8092 defineLocale(x.name, x.config); 8093 }); 8094 } 8095 8096 // backwards compat for now: also set the locale 8097 // make sure we set the locale AFTER all child locales have been 8098 // created, so we won't end up with the child locale set. 8099 getSetGlobalLocale(name); 8100 8101 return locales[name]; 8102 } else { 8103 // useful for testing 8104 delete locales[name]; 8105 return null; 8106 } 8107 } 8108 8109 function updateLocale(name, config) { 8110 if (config != null) { 8111 var locale, 8112 tmpLocale, 8113 parentConfig = baseConfig; 8114 8115 if (locales[name] != null && locales[name].parentLocale != null) { 8116 // Update existing child locale in-place to avoid memory-leaks 8117 locales[name].set(mergeConfigs(locales[name]._config, config)); 8118 } else { 8119 // MERGE 8120 tmpLocale = loadLocale(name);
vendor: 12,148 bytes, lines 8120-8488
8120 8121 if (tmpLocale != null) { 8122 parentConfig = tmpLocale._config; 8123 } 8124 config = mergeConfigs(parentConfig, config); 8125 if (tmpLocale == null) { 8126 // updateLocale is called for creating a new locale 8127 // Set abbr so it will have a name (getters return 8128 // undefined otherwise). 8129 config.abbr = name; 8130 } 8131 locale = new Locale(config); 8132 locale.parentLocale = locales[name]; 8133 locales[name] = locale; 8134 } 8135 8136 // backwards compat for now: also set the locale 8137 getSetGlobalLocale(name); 8138 } else { 8139 // pass null for config to unupdate, useful for tests 8140 if (locales[name] != null) { 8141 if (locales[name].parentLocale != null) { 8142 locales[name] = locales[name].parentLocale; 8143 if (name === getSetGlobalLocale()) { 8144 getSetGlobalLocale(name); 8145 } 8146 } else if (locales[name] != null) { 8147 delete locales[name]; 8148 } 8149 } 8150 } 8151 return locales[name]; 8152 } 8153 8154 // returns locale data 8155 function getLocale(key) { 8156 var locale; 8157 8158 if (key && key._locale && key._locale._abbr) { 8159 key = key._locale._abbr; 8160 } 8161 8162 if (!key) { 8163 return globalLocale; 8164 } 8165 8166 if (!isArray(key)) { 8167 //short-circuit everything else 8168 locale = loadLocale(key); 8169 if (locale) { 8170 return locale; 8171 } 8172 key = [key]; 8173 } 8174 8175 return chooseLocale(key); 8176 } 8177 8178 function listLocales() { 8179 return keys(locales); 8180 } 8181 8182 function checkOverflow(m) { 8183 var overflow, 8184 a = m._a; 8185 8186 if (a && getParsingFlags(m).overflow === -2) { 8187 overflow = 8188 a[MONTH] < 0 || a[MONTH] > 11 8189 ? MONTH 8190 : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) 8191 ? DATE 8192 : a[HOUR] < 0 || 8193 a[HOUR] > 24 || 8194 (a[HOUR] === 24 && 8195 (a[MINUTE] !== 0 || 8196 a[SECOND] !== 0 || 8197 a[MILLISECOND] !== 0)) 8198 ? HOUR 8199 : a[MINUTE] < 0 || a[MINUTE] > 59 8200 ? MINUTE 8201 : a[SECOND] < 0 || a[SECOND] > 59 8202 ? SECOND 8203 : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 8204 ? MILLISECOND 8205 : -1; 8206 8207 if ( 8208 getParsingFlags(m)._overflowDayOfYear && 8209 (overflow < YEAR || overflow > DATE) 8210 ) { 8211 overflow = DATE; 8212 } 8213 if (getParsingFlags(m)._overflowWeeks && overflow === -1) { 8214 overflow = WEEK; 8215 } 8216 if (getParsingFlags(m)._overflowWeekday && overflow === -1) { 8217 overflow = WEEKDAY; 8218 } 8219 8220 getParsingFlags(m).overflow = overflow; 8221 } 8222 8223 return m; 8224 } 8225 8226 // iso 8601 regex 8227 // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) 8228 var extendedIsoRegex = 8229 /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, 8230 basicIsoRegex = 8231 /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, 8232 tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, 8233 isoDates = [ 8234 ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], 8235 ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], 8236 ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], 8237 ['GGGG-[W]WW', /\d{4}-W\d\d/, false], 8238 ['YYYY-DDD', /\d{4}-\d{3}/], 8239 ['YYYY-MM', /\d{4}-\d\d/, false], 8240 ['YYYYYYMMDD', /[+-]\d{10}/], 8241 ['YYYYMMDD', /\d{8}/], 8242 ['GGGG[W]WWE', /\d{4}W\d{3}/], 8243 ['GGGG[W]WW', /\d{4}W\d{2}/, false], 8244 ['YYYYDDD', /\d{7}/], 8245 ['YYYYMM', /\d{6}/, false], 8246 ['YYYY', /\d{4}/, false], 8247 ], 8248 // iso time formats and regexes 8249 isoTimes = [ 8250 ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], 8251 ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], 8252 ['HH:mm:ss', /\d\d:\d\d:\d\d/], 8253 ['HH:mm', /\d\d:\d\d/], 8254 ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], 8255 ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], 8256 ['HHmmss', /\d\d\d\d\d\d/], 8257 ['HHmm', /\d\d\d\d/], 8258 ['HH', /\d\d/], 8259 ], 8260 aspNetJsonRegex = /^\/?Date\((-?\d+)/i, 8261 // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 8262 rfc2822 = 8263 /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, 8264 obsOffsets = { 8265 UT: 0, 8266 GMT: 0, 8267 EDT: -4 * 60, 8268 EST: -5 * 60, 8269 CDT: -5 * 60, 8270 CST: -6 * 60, 8271 MDT: -6 * 60, 8272 MST: -7 * 60, 8273 PDT: -7 * 60, 8274 PST: -8 * 60, 8275 }; 8276 8277 // date from iso format 8278 function configFromISO(config) { 8279 var i, 8280 l, 8281 string = config._i, 8282 match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), 8283 allowTime, 8284 dateFormat, 8285 timeFormat, 8286 tzFormat, 8287 isoDatesLen = isoDates.length, 8288 isoTimesLen = isoTimes.length; 8289 8290 if (match) { 8291 getParsingFlags(config).iso = true; 8292 for (i = 0, l = isoDatesLen; i < l; i++) { 8293 if (isoDates[i][1].exec(match[1])) { 8294 dateFormat = isoDates[i][0]; 8295 allowTime = isoDates[i][2] !== false; 8296 break; 8297 } 8298 } 8299 if (dateFormat == null) { 8300 config._isValid = false; 8301 return; 8302 } 8303 if (match[3]) { 8304 for (i = 0, l = isoTimesLen; i < l; i++) { 8305 if (isoTimes[i][1].exec(match[3])) { 8306 // match[2] should be 'T' or space 8307 timeFormat = (match[2] || ' ') + isoTimes[i][0]; 8308 break; 8309 } 8310 } 8311 if (timeFormat == null) { 8312 config._isValid = false; 8313 return; 8314 } 8315 } 8316 if (!allowTime && timeFormat != null) { 8317 config._isValid = false; 8318 return; 8319 } 8320 if (match[4]) { 8321 if (tzRegex.exec(match[4])) { 8322 tzFormat = 'Z'; 8323 } else { 8324 config._isValid = false; 8325 return; 8326 } 8327 } 8328 config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); 8329 configFromStringAndFormat(config); 8330 } else { 8331 config._isValid = false; 8332 } 8333 } 8334 8335 function extractFromRFC2822Strings( 8336 yearStr, 8337 monthStr, 8338 dayStr, 8339 hourStr, 8340 minuteStr, 8341 secondStr 8342 ) { 8343 var result = [ 8344 untruncateYear(yearStr), 8345 defaultLocaleMonthsShort.indexOf(monthStr), 8346 parseInt(dayStr, 10), 8347 parseInt(hourStr, 10), 8348 parseInt(minuteStr, 10), 8349 ]; 8350 8351 if (secondStr) { 8352 result.push(parseInt(secondStr, 10)); 8353 } 8354 8355 return result; 8356 } 8357 8358 function untruncateYear(yearStr) { 8359 var year = parseInt(yearStr, 10); 8360 if (year <= 49) { 8361 return 2000 + year; 8362 } else if (year <= 999) { 8363 return 1900 + year; 8364 } 8365 return year; 8366 } 8367 8368 function preprocessRFC2822(s) { 8369 // Remove comments and folding whitespace and replace multiple-spaces with a single space 8370 return s 8371 .replace(/\([^()]*\)|[\n\t]/g, ' ') 8372 .replace(/(\s\s+)/g, ' ') 8373 .replace(/^\s\s*/, '') 8374 .replace(/\s\s*$/, ''); 8375 } 8376 8377 function checkWeekday(weekdayStr, parsedInput, config) { 8378 if (weekdayStr) { 8379 // TODO: Replace the vanilla JS Date object with an independent day-of-week check. 8380 var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), 8381 weekdayActual = new Date( 8382 parsedInput[0], 8383 parsedInput[1], 8384 parsedInput[2] 8385 ).getDay(); 8386 if (weekdayProvided !== weekdayActual) { 8387 getParsingFlags(config).weekdayMismatch = true; 8388 config._isValid = false; 8389 return false; 8390 } 8391 } 8392 return true; 8393 } 8394 8395 function calculateOffset(obsOffset, militaryOffset, numOffset) { 8396 if (obsOffset) { 8397 return obsOffsets[obsOffset]; 8398 } else if (militaryOffset) { 8399 // the only allowed military tz is Z 8400 return 0; 8401 } else { 8402 var hm = parseInt(numOffset, 10), 8403 m = hm % 100, 8404 h = (hm - m) / 100; 8405 return h * 60 + m; 8406 } 8407 } 8408 8409 // date and time from ref 2822 format 8410 function configFromRFC2822(config) { 8411 var match = rfc2822.exec(preprocessRFC2822(config._i)), 8412 parsedArray; 8413 if (match) { 8414 parsedArray = extractFromRFC2822Strings( 8415 match[4], 8416 match[3], 8417 match[2], 8418 match[5], 8419 match[6], 8420 match[7] 8421 ); 8422 if (!checkWeekday(match[1], parsedArray, config)) { 8423 return; 8424 } 8425 8426 config._a = parsedArray; 8427 config._tzm = calculateOffset(match[8], match[9], match[10]); 8428 8429 config._d = createUTCDate.apply(null, config._a); 8430 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 8431 8432 getParsingFlags(config).rfc2822 = true; 8433 } else { 8434 config._isValid = false; 8435 } 8436 } 8437 8438 // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict 8439 function configFromString(config) { 8440 var matched = aspNetJsonRegex.exec(config._i); 8441 if (matched !== null) { 8442 config._d = new Date(+matched[1]); 8443 return; 8444 } 8445 8446 configFromISO(config); 8447 if (config._isValid === false) { 8448 delete config._isValid; 8449 } else { 8450 return; 8451 } 8452 8453 configFromRFC2822(config); 8454 if (config._isValid === false) { 8455 delete config._isValid; 8456 } else { 8457 return; 8458 } 8459 8460 if (config._strict) { 8461 config._isValid = false; 8462 } else { 8463 // Final attempt, use Input Fallback 8464 hooks.createFromInputFallback(config); 8465 } 8466 } 8467 8468 hooks.createFromInputFallback = deprecate( 8469 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 8470 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 8471 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', 8472 function (config) { 8473 config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); 8474 } 8475 ); 8476 8477 // Pick the first defined of two or three arguments. 8478 function defaults(a, b, c) { 8479 if (a != null) { 8480 return a; 8481 } 8482 if (b != null) { 8483 return b; 8484 } 8485 return c; 8486 } 8487 8488 function currentDateArray(config
vendor: 17,694 bytes, lines 8488-9049
8488) { 8489 // hooks is actually the exported moment object 8490 var nowValue = new Date(hooks.now()); 8491 if (config._useUTC) { 8492 return [ 8493 nowValue.getUTCFullYear(), 8494 nowValue.getUTCMonth(), 8495 nowValue.getUTCDate(), 8496 ]; 8497 } 8498 return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; 8499 } 8500 8501 // convert an array to a date. 8502 // the array should mirror the parameters below 8503 // note: all values past the year are optional and will default to the lowest possible value. 8504 // [year, month, day , hour, minute, second, millisecond] 8505 function configFromArray(config) { 8506 var i, 8507 date, 8508 input = [], 8509 currentDate, 8510 expectedWeekday, 8511 yearToUse; 8512 8513 if (config._d) { 8514 return; 8515 } 8516 8517 currentDate = currentDateArray(config); 8518 8519 //compute day of the year from weeks and weekdays 8520 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { 8521 dayOfYearFromWeekInfo(config); 8522 } 8523 8524 //if the day of the year is set, figure out what it is 8525 if (config._dayOfYear != null) { 8526 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); 8527 8528 if ( 8529 config._dayOfYear > daysInYear(yearToUse) || 8530 config._dayOfYear === 0 8531 ) { 8532 getParsingFlags(config)._overflowDayOfYear = true; 8533 } 8534 8535 date = createUTCDate(yearToUse, 0, config._dayOfYear); 8536 config._a[MONTH] = date.getUTCMonth(); 8537 config._a[DATE] = date.getUTCDate(); 8538 } 8539 8540 // Default to current date. 8541 // * if no year, month, day of month are given, default to today 8542 // * if day of month is given, default month and year 8543 // * if month is given, default only year 8544 // * if year is given, don't default anything 8545 for (i = 0; i < 3 && config._a[i] == null; ++i) { 8546 config._a[i] = input[i] = currentDate[i]; 8547 } 8548 8549 // Zero out whatever was not defaulted, including time 8550 for (; i < 7; i++) { 8551 config._a[i] = input[i] = 8552 config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; 8553 } 8554 8555 // Check for 24:00:00.000 8556 if ( 8557 config._a[HOUR] === 24 && 8558 config._a[MINUTE] === 0 && 8559 config._a[SECOND] === 0 && 8560 config._a[MILLISECOND] === 0 8561 ) { 8562 config._nextDay = true; 8563 config._a[HOUR] = 0; 8564 } 8565 8566 config._d = (config._useUTC ? createUTCDate : createDate).apply( 8567 null, 8568 input 8569 ); 8570 expectedWeekday = config._useUTC 8571 ? config._d.getUTCDay() 8572 : config._d.getDay(); 8573 8574 // Apply timezone offset from input. The actual utcOffset can be changed 8575 // with parseZone. 8576 if (config._tzm != null) { 8577 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 8578 } 8579 8580 if (config._nextDay) { 8581 config._a[HOUR] = 24; 8582 } 8583 8584 // check for mismatching day of week 8585 if ( 8586 config._w && 8587 typeof config._w.d !== 'undefined' && 8588 config._w.d !== expectedWeekday 8589 ) { 8590 getParsingFlags(config).weekdayMismatch = true; 8591 } 8592 } 8593 8594 function dayOfYearFromWeekInfo(config) { 8595 var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; 8596 8597 w = config._w; 8598 if (w.GG != null || w.W != null || w.E != null) { 8599 dow = 1; 8600 doy = 4; 8601 8602 // TODO: We need to take the current isoWeekYear, but that depends on 8603 // how we interpret now (local, utc, fixed offset). So create 8604 // a now version of current config (take local/utc/offset flags, and 8605 // create now). 8606 weekYear = defaults( 8607 w.GG, 8608 config._a[YEAR], 8609 weekOfYear(createLocal(), 1, 4).year 8610 ); 8611 week = defaults(w.W, 1); 8612 weekday = defaults(w.E, 1); 8613 if (weekday < 1 || weekday > 7) { 8614 weekdayOverflow = true; 8615 } 8616 } else { 8617 dow = config._locale._week.dow; 8618 doy = config._locale._week.doy; 8619 8620 curWeek = weekOfYear(createLocal(), dow, doy); 8621 8622 weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); 8623 8624 // Default to current week. 8625 week = defaults(w.w, curWeek.week); 8626 8627 if (w.d != null) { 8628 // weekday -- low day numbers are considered next week 8629 weekday = w.d; 8630 if (weekday < 0 || weekday > 6) { 8631 weekdayOverflow = true; 8632 } 8633 } else if (w.e != null) { 8634 // local weekday -- counting starts from beginning of week 8635 weekday = w.e + dow; 8636 if (w.e < 0 || w.e > 6) { 8637 weekdayOverflow = true; 8638 } 8639 } else { 8640 // default to beginning of week 8641 weekday = dow; 8642 } 8643 } 8644 if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { 8645 getParsingFlags(config)._overflowWeeks = true; 8646 } else if (weekdayOverflow != null) { 8647 getParsingFlags(config)._overflowWeekday = true; 8648 } else { 8649 temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); 8650 config._a[YEAR] = temp.year; 8651 config._dayOfYear = temp.dayOfYear; 8652 } 8653 } 8654 8655 // constant that refers to the ISO standard 8656 hooks.ISO_8601 = function () {}; 8657 8658 // constant that refers to the RFC 2822 form 8659 hooks.RFC_2822 = function () {}; 8660 8661 // date from string and format string 8662 function configFromStringAndFormat(config) { 8663 // TODO: Move this to another part of the creation flow to prevent circular deps 8664 if (config._f === hooks.ISO_8601) { 8665 configFromISO(config); 8666 return; 8667 } 8668 if (config._f === hooks.RFC_2822) { 8669 configFromRFC2822(config); 8670 return; 8671 } 8672 config._a = []; 8673 getParsingFlags(config).empty = true; 8674 8675 // This array is used to make a Date, either with `new Date` or `Date.UTC` 8676 var string = '' + config._i, 8677 i, 8678 parsedInput, 8679 tokens, 8680 token, 8681 skipped, 8682 stringLength = string.length, 8683 totalParsedInputLength = 0, 8684 era, 8685 tokenLen; 8686 8687 tokens = 8688 expandFormat(config._f, config._locale).match(formattingTokens) || []; 8689 tokenLen = tokens.length; 8690 for (i = 0; i < tokenLen; i++) { 8691 token = tokens[i]; 8692 parsedInput = (string.match(getParseRegexForToken(token, config)) || 8693 [])[0]; 8694 if (parsedInput) { 8695 skipped = string.substr(0, string.indexOf(parsedInput)); 8696 if (skipped.length > 0) { 8697 getParsingFlags(config).unusedInput.push(skipped); 8698 } 8699 string = string.slice( 8700 string.indexOf(parsedInput) + parsedInput.length 8701 ); 8702 totalParsedInputLength += parsedInput.length; 8703 } 8704 // don't parse if it's not a known token 8705 if (formatTokenFunctions[token]) { 8706 if (parsedInput) { 8707 getParsingFlags(config).empty = false; 8708 } else { 8709 getParsingFlags(config).unusedTokens.push(token); 8710 } 8711 addTimeToArrayFromToken(token, parsedInput, config); 8712 } else if (config._strict && !parsedInput) { 8713 getParsingFlags(config).unusedTokens.push(token); 8714 } 8715 } 8716 8717 // add remaining unparsed input length to the string 8718 getParsingFlags(config).charsLeftOver = 8719 stringLength - totalParsedInputLength; 8720 if (string.length > 0) { 8721 getParsingFlags(config).unusedInput.push(string); 8722 } 8723 8724 // clear _12h flag if hour is <= 12 8725 if ( 8726 config._a[HOUR] <= 12 && 8727 getParsingFlags(config).bigHour === true && 8728 config._a[HOUR] > 0 8729 ) { 8730 getParsingFlags(config).bigHour = undefined; 8731 } 8732 8733 getParsingFlags(config).parsedDateParts = config._a.slice(0); 8734 getParsingFlags(config).meridiem = config._meridiem; 8735 // handle meridiem 8736 config._a[HOUR] = meridiemFixWrap( 8737 config._locale, 8738 config._a[HOUR], 8739 config._meridiem 8740 ); 8741 8742 // handle era 8743 era = getParsingFlags(config).era; 8744 if (era !== null) { 8745 config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); 8746 } 8747 8748 configFromArray(config); 8749 checkOverflow(config); 8750 } 8751 8752 function meridiemFixWrap(locale, hour, meridiem) { 8753 var isPm; 8754 8755 if (meridiem == null) { 8756 // nothing to do 8757 return hour; 8758 } 8759 if (locale.meridiemHour != null) { 8760 return locale.meridiemHour(hour, meridiem); 8761 } else if (locale.isPM != null) { 8762 // Fallback 8763 isPm = locale.isPM(meridiem); 8764 if (isPm && hour < 12) { 8765 hour += 12; 8766 } 8767 if (!isPm && hour === 12) { 8768 hour = 0; 8769 } 8770 return hour; 8771 } else { 8772 // this is not supposed to happen 8773 return hour; 8774 } 8775 } 8776 8777 // date from string and array of format strings 8778 function configFromStringAndArray(config) { 8779 var tempConfig, 8780 bestMoment, 8781 scoreToBeat, 8782 i, 8783 currentScore, 8784 validFormatFound, 8785 bestFormatIsValid = false, 8786 configfLen = config._f.length; 8787 8788 if (configfLen === 0) { 8789 getParsingFlags(config).invalidFormat = true; 8790 config._d = new Date(NaN); 8791 return; 8792 } 8793 8794 for (i = 0; i < configfLen; i++) { 8795 currentScore = 0; 8796 validFormatFound = false; 8797 tempConfig = copyConfig({}, config); 8798 if (config._useUTC != null) { 8799 tempConfig._useUTC = config._useUTC; 8800 } 8801 tempConfig._f = config._f[i]; 8802 configFromStringAndFormat(tempConfig); 8803 8804 if (isValid(tempConfig)) { 8805 validFormatFound = true; 8806 } 8807 8808 // if there is any input that was not parsed add a penalty for that format 8809 currentScore += getParsingFlags(tempConfig).charsLeftOver; 8810 8811 //or tokens 8812 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; 8813 8814 getParsingFlags(tempConfig).score = currentScore; 8815 8816 if (!bestFormatIsValid) { 8817 if ( 8818 scoreToBeat == null || 8819 currentScore < scoreToBeat || 8820 validFormatFound 8821 ) { 8822 scoreToBeat = currentScore; 8823 bestMoment = tempConfig; 8824 if (validFormatFound) { 8825 bestFormatIsValid = true; 8826 } 8827 } 8828 } else { 8829 if (currentScore < scoreToBeat) { 8830 scoreToBeat = currentScore; 8831 bestMoment = tempConfig; 8832 } 8833 } 8834 } 8835 8836 extend(config, bestMoment || tempConfig); 8837 } 8838 8839 function configFromObject(config) { 8840 if (config._d) { 8841 return; 8842 } 8843 8844 var i = normalizeObjectUnits(config._i), 8845 dayOrDate = i.day === undefined ? i.date : i.day; 8846 config._a = map( 8847 [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], 8848 function (obj) { 8849 return obj && parseInt(obj, 10); 8850 } 8851 ); 8852 8853 configFromArray(config); 8854 } 8855 8856 function createFromConfig(config) { 8857 var res = new Moment(checkOverflow(prepareConfig(config))); 8858 if (res._nextDay) { 8859 // Adding is smart enough around DST 8860 res.add(1, 'd'); 8861 res._nextDay = undefined; 8862 } 8863 8864 return res; 8865 } 8866 8867 function prepareConfig(config) { 8868 var input = config._i, 8869 format = config._f; 8870 8871 config._locale = config._locale || getLocale(config._l); 8872 8873 if (input === null || (format === undefined && input === '')) { 8874 return createInvalid({ nullInput: true }); 8875 } 8876 8877 if (typeof input === 'string') { 8878 config._i = input = config._locale.preparse(input); 8879 } 8880 8881 if (isMoment(input)) { 8882 return new Moment(checkOverflow(input)); 8883 } else if (isDate(input)) { 8884 config._d = input; 8885 } else if (isArray(format)) { 8886 configFromStringAndArray(config); 8887 } else if (format) { 8888 configFromStringAndFormat(config); 8889 } else { 8890 configFromInput(config); 8891 } 8892 8893 if (!isValid(config)) { 8894 config._d = null; 8895 } 8896 8897 return config; 8898 } 8899 8900 function configFromInput(config) { 8901 var input = config._i; 8902 if (isUndefined(input)) { 8903 config._d = new Date(hooks.now()); 8904 } else if (isDate(input)) { 8905 config._d = new Date(input.valueOf()); 8906 } else if (typeof input === 'string') { 8907 configFromString(config); 8908 } else if (isArray(input)) { 8909 config._a = map(input.slice(0), function (obj) { 8910 return parseInt(obj, 10); 8911 }); 8912 configFromArray(config); 8913 } else if (isObject(input)) { 8914 configFromObject(config); 8915 } else if (isNumber(input)) { 8916 // from milliseconds 8917 config._d = new Date(input); 8918 } else { 8919 hooks.createFromInputFallback(config); 8920 } 8921 } 8922 8923 function createLocalOrUTC(input, format, locale, strict, isUTC) { 8924 var c = {}; 8925 8926 if (format === true || format === false) { 8927 strict = format; 8928 format = undefined; 8929 } 8930 8931 if (locale === true || locale === false) { 8932 strict = locale; 8933 locale = undefined; 8934 } 8935 8936 if ( 8937 (isObject(input) && isObjectEmpty(input)) || 8938 (isArray(input) && input.length === 0) 8939 ) { 8940 input = undefined; 8941 } 8942 // object construction must be done this way. 8943 // https://github.com/moment/moment/issues/1423 8944 c._isAMomentObject = true; 8945 c._useUTC = c._isUTC = isUTC; 8946 c._l = locale; 8947 c._i = input; 8948 c._f = format; 8949 c._strict = strict; 8950 8951 return createFromConfig(c); 8952 } 8953 8954 function createLocal(input, format, locale, strict) { 8955 return createLocalOrUTC(input, format, locale, strict, false); 8956 } 8957 8958 var prototypeMin = deprecate( 8959 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', 8960 function () { 8961 var other = createLocal.apply(null, arguments); 8962 if (this.isValid() && other.isValid()) { 8963 return other < this ? this : other; 8964 } else { 8965 return createInvalid(); 8966 } 8967 } 8968 ), 8969 prototypeMax = deprecate( 8970 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', 8971 function () { 8972 var other = createLocal.apply(null, arguments); 8973 if (this.isValid() && other.isValid()) { 8974 return other > this ? this : other; 8975 } else { 8976 return createInvalid(); 8977 } 8978 } 8979 ); 8980 8981 // Pick a moment m from moments so that m[fn](other) is true for all 8982 // other. This relies on the function fn to be transitive. 8983 // 8984 // moments should either be an array of moment objects or an array, whose 8985 // first element is an array of moment objects. 8986 function pickBy(fn, moments) { 8987 var res, i; 8988 if (moments.length === 1 && isArray(moments[0])) { 8989 moments = moments[0]; 8990 } 8991 if (!moments.length) { 8992 return createLocal(); 8993 } 8994 res = moments[0]; 8995 for (i = 1; i < moments.length; ++i) { 8996 if (!moments[i].isValid() || moments[i][fn](res)) { 8997 res = moments[i]; 8998 } 8999 } 9000 return res; 9001 } 9002 9003 // TODO: Use [].sort instead? 9004 function min() { 9005 var args = [].slice.call(arguments, 0); 9006 9007 return pickBy('isBefore', args); 9008 } 9009 9010 function max() { 9011 var args = [].slice.call(arguments, 0); 9012 9013 return pickBy('isAfter', args); 9014 } 9015 9016 var now = function () { 9017 return Date.now ? Date.now() : +new Date(); 9018 }; 9019 9020 var ordering = [ 9021 'year', 9022 'quarter', 9023 'month', 9024 'week', 9025 'day', 9026 'hour', 9027 'minute', 9028 'second', 9029 'millisecond', 9030 ]; 9031 9032 function isDurationValid(m) { 9033 var key, 9034 unitHasDecimal = false, 9035 i, 9036 orderLen = ordering.length; 9037 for (key in m) { 9038 if ( 9039 hasOwnProp(m, key) && 9040 !( 9041 indexOf.call(ordering, key) !== -1 && 9042 (m[key] == null || !isNaN(m[key])) 9043 ) 9044 ) { 9045 return false; 9046 } 9047 } 9048 9049 for (i = 0; i < orderLen
vendor: 10,251 bytes, lines 9049-9374
9049; ++i) { 9050 if (m[ordering[i]]) { 9051 if (unitHasDecimal) { 9052 return false; // only allow non-integers for smallest unit 9053 } 9054 if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { 9055 unitHasDecimal = true; 9056 } 9057 } 9058 } 9059 9060 return true; 9061 } 9062 9063 function isValid$1() { 9064 return this._isValid; 9065 } 9066 9067 function createInvalid$1() { 9068 return createDuration(NaN); 9069 } 9070 9071 function Duration(duration) { 9072 var normalizedInput = normalizeObjectUnits(duration), 9073 years = normalizedInput.year || 0, 9074 quarters = normalizedInput.quarter || 0, 9075 months = normalizedInput.month || 0, 9076 weeks = normalizedInput.week || normalizedInput.isoWeek || 0, 9077 days = normalizedInput.day || 0, 9078 hours = normalizedInput.hour || 0, 9079 minutes = normalizedInput.minute || 0, 9080 seconds = normalizedInput.second || 0, 9081 milliseconds = normalizedInput.millisecond || 0; 9082 9083 this._isValid = isDurationValid(normalizedInput); 9084 9085 // representation for dateAddRemove 9086 this._milliseconds = 9087 +milliseconds + 9088 seconds * 1e3 + // 1000 9089 minutes * 6e4 + // 1000 * 60 9090 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 9091 // Because of dateAddRemove treats 24 hours as different from a 9092 // day when working around DST, we need to store them separately 9093 this._days = +days + weeks * 7; 9094 // It is impossible to translate months into days without knowing 9095 // which months you are are talking about, so we have to store 9096 // it separately. 9097 this._months = +months + quarters * 3 + years * 12; 9098 9099 this._data = {}; 9100 9101 this._locale = getLocale(); 9102 9103 this._bubble(); 9104 } 9105 9106 function isDuration(obj) { 9107 return obj instanceof Duration; 9108 } 9109 9110 function absRound(number) { 9111 if (number < 0) { 9112 return Math.round(-1 * number) * -1; 9113 } else { 9114 return Math.round(number); 9115 } 9116 } 9117 9118 // compare two arrays, return the number of differences 9119 function compareArrays(array1, array2, dontConvert) { 9120 var len = Math.min(array1.length, array2.length), 9121 lengthDiff = Math.abs(array1.length - array2.length), 9122 diffs = 0, 9123 i; 9124 for (i = 0; i < len; i++) { 9125 if ( 9126 (dontConvert && array1[i] !== array2[i]) || 9127 (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) 9128 ) { 9129 diffs++; 9130 } 9131 } 9132 return diffs + lengthDiff; 9133 } 9134 9135 // FORMATTING 9136 9137 function offset(token, separator) { 9138 addFormatToken(token, 0, 0, function () { 9139 var offset = this.utcOffset(), 9140 sign = '+'; 9141 if (offset < 0) { 9142 offset = -offset; 9143 sign = '-'; 9144 } 9145 return ( 9146 sign + 9147 zeroFill(~~(offset / 60), 2) + 9148 separator + 9149 zeroFill(~~offset % 60, 2) 9150 ); 9151 }); 9152 } 9153 9154 offset('Z', ':'); 9155 offset('ZZ', ''); 9156 9157 // PARSING 9158 9159 addRegexToken('Z', matchShortOffset); 9160 addRegexToken('ZZ', matchShortOffset); 9161 addParseToken(['Z', 'ZZ'], function (input, array, config) { 9162 config._useUTC = true; 9163 config._tzm = offsetFromString(matchShortOffset, input); 9164 }); 9165 9166 // HELPERS 9167 9168 // timezone chunker 9169 // '+10:00' > ['10', '00'] 9170 // '-1530' > ['-15', '30'] 9171 var chunkOffset = /([\+\-]|\d\d)/gi; 9172 9173 function offsetFromString(matcher, string) { 9174 var matches = (string || '').match(matcher), 9175 chunk, 9176 parts, 9177 minutes; 9178 9179 if (matches === null) { 9180 return null; 9181 } 9182 9183 chunk = matches[matches.length - 1] || []; 9184 parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; 9185 minutes = +(parts[1] * 60) + toInt(parts[2]); 9186 9187 return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; 9188 } 9189 9190 // Return a moment from input, that is local/utc/zone equivalent to model. 9191 function cloneWithOffset(input, model) { 9192 var res, diff; 9193 if (model._isUTC) { 9194 res = model.clone(); 9195 diff = 9196 (isMoment(input) || isDate(input) 9197 ? input.valueOf() 9198 : createLocal(input).valueOf()) - res.valueOf(); 9199 // Use low-level api, because this fn is low-level api. 9200 res._d.setTime(res._d.valueOf() + diff); 9201 hooks.updateOffset(res, false); 9202 return res; 9203 } else { 9204 return createLocal(input).local(); 9205 } 9206 } 9207 9208 function getDateOffset(m) { 9209 // On Firefox.24 Date#getTimezoneOffset returns a floating point. 9210 // https://github.com/moment/moment/pull/1871 9211 return -Math.round(m._d.getTimezoneOffset()); 9212 } 9213 9214 // HOOKS 9215 9216 // This function will be called whenever a moment is mutated. 9217 // It is intended to keep the offset in sync with the timezone. 9218 hooks.updateOffset = function () {}; 9219 9220 // MOMENTS 9221 9222 // keepLocalTime = true means only change the timezone, without 9223 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> 9224 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset 9225 // +0200, so we adjust the time as needed, to be valid. 9226 // 9227 // Keeping the time actually adds/subtracts (one hour) 9228 // from the actual represented time. That is why we call updateOffset 9229 // a second time. In case it wants us to change the offset again 9230 // _changeInProgress == true case, then we have to adjust, because 9231 // there is no such time in the given timezone. 9232 function getSetOffset(input, keepLocalTime, keepMinutes) { 9233 var offset = this._offset || 0, 9234 localAdjust; 9235 if (!this.isValid()) { 9236 return input != null ? this : NaN; 9237 } 9238 if (input != null) { 9239 if (typeof input === 'string') { 9240 input = offsetFromString(matchShortOffset, input); 9241 if (input === null) { 9242 return this; 9243 } 9244 } else if (Math.abs(input) < 16 && !keepMinutes) { 9245 input = input * 60; 9246 } 9247 if (!this._isUTC && keepLocalTime) { 9248 localAdjust = getDateOffset(this); 9249 } 9250 this._offset = input; 9251 this._isUTC = true; 9252 if (localAdjust != null) { 9253 this.add(localAdjust, 'm'); 9254 } 9255 if (offset !== input) { 9256 if (!keepLocalTime || this._changeInProgress) { 9257 addSubtract( 9258 this, 9259 createDuration(input - offset, 'm'), 9260 1, 9261 false 9262 ); 9263 } else if (!this._changeInProgress) { 9264 this._changeInProgress = true; 9265 hooks.updateOffset(this, true); 9266 this._changeInProgress = null; 9267 } 9268 } 9269 return this; 9270 } else { 9271 return this._isUTC ? offset : getDateOffset(this); 9272 } 9273 } 9274 9275 function getSetZone(input, keepLocalTime) { 9276 if (input != null) { 9277 if (typeof input !== 'string') { 9278 input = -input; 9279 } 9280 9281 this.utcOffset(input, keepLocalTime); 9282 9283 return this; 9284 } else { 9285 return -this.utcOffset(); 9286 } 9287 } 9288 9289 function setOffsetToUTC(keepLocalTime) { 9290 return this.utcOffset(0, keepLocalTime); 9291 } 9292 9293 function setOffsetToLocal(keepLocalTime) { 9294 if (this._isUTC) { 9295 this.utcOffset(0, keepLocalTime); 9296 this._isUTC = false; 9297 9298 if (keepLocalTime) { 9299 this.subtract(getDateOffset(this), 'm'); 9300 } 9301 } 9302 return this; 9303 } 9304 9305 function setOffsetToParsedOffset() { 9306 if (this._tzm != null) { 9307 this.utcOffset(this._tzm, false, true); 9308 } else if (typeof this._i === 'string') { 9309 var tZone = offsetFromString(matchOffset, this._i); 9310 if (tZone != null) { 9311 this.utcOffset(tZone); 9312 } else { 9313 this.utcOffset(0, true); 9314 } 9315 } 9316 return this; 9317 } 9318 9319 function hasAlignedHourOffset(input) { 9320 if (!this.isValid()) { 9321 return false; 9322 } 9323 input = input ? createLocal(input).utcOffset() : 0; 9324 9325 return (this.utcOffset() - input) % 60 === 0; 9326 } 9327 9328 function isDaylightSavingTime() { 9329 return ( 9330 this.utcOffset() > this.clone().month(0).utcOffset() || 9331 this.utcOffset() > this.clone().month(5).utcOffset() 9332 ); 9333 } 9334 9335 function isDaylightSavingTimeShifted() { 9336 if (!isUndefined(this._isDSTShifted)) { 9337 return this._isDSTShifted; 9338 } 9339 9340 var c = {}, 9341 other; 9342 9343 copyConfig(c, this); 9344 c = prepareConfig(c); 9345 9346 if (c._a) { 9347 other = c._isUTC ? createUTC(c._a) : createLocal(c._a); 9348 this._isDSTShifted = 9349 this.isValid() && compareArrays(c._a, other.toArray()) > 0; 9350 } else { 9351 this._isDSTShifted = false; 9352 } 9353 9354 return this._isDSTShifted; 9355 } 9356 9357 function isLocal() { 9358 return this.isValid() ? !this._isUTC : false; 9359 } 9360 9361 function isUtcOffset() { 9362 return this.isValid() ? this._isUTC : false; 9363 } 9364 9365 function isUtc() { 9366 return this.isValid() ? this._isUTC && this._offset === 0 : false; 9367 } 9368 9369 // ASP.NET json date format regex 9370 var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, 9371 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html 9372 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere 9373 // and further modified to allow for strings containing both week and day 9374 isoRegex =
vendor: 9,081 bytes, lines 9374-9664
9374 9375 /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; 9376 9377 function createDuration(input, key) { 9378 var duration = input, 9379 // matching against regexp is expensive, do it on demand 9380 match = null, 9381 sign, 9382 ret, 9383 diffRes; 9384 9385 if (isDuration(input)) { 9386 duration = { 9387 ms: input._milliseconds, 9388 d: input._days, 9389 M: input._months, 9390 }; 9391 } else if (isNumber(input) || !isNaN(+input)) { 9392 duration = {}; 9393 if (key) { 9394 duration[key] = +input; 9395 } else { 9396 duration.milliseconds = +input; 9397 } 9398 } else if ((match = aspNetRegex.exec(input))) { 9399 sign = match[1] === '-' ? -1 : 1; 9400 duration = { 9401 y: 0, 9402 d: toInt(match[DATE]) * sign, 9403 h: toInt(match[HOUR]) * sign, 9404 m: toInt(match[MINUTE]) * sign, 9405 s: toInt(match[SECOND]) * sign, 9406 ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match 9407 }; 9408 } else if ((match = isoRegex.exec(input))) { 9409 sign = match[1] === '-' ? -1 : 1; 9410 duration = { 9411 y: parseIso(match[2], sign), 9412 M: parseIso(match[3], sign), 9413 w: parseIso(match[4], sign), 9414 d: parseIso(match[5], sign), 9415 h: parseIso(match[6], sign), 9416 m: parseIso(match[7], sign), 9417 s: parseIso(match[8], sign), 9418 }; 9419 } else if (duration == null) { 9420 // checks for null or undefined 9421 duration = {}; 9422 } else if ( 9423 typeof duration === 'object' && 9424 ('from' in duration || 'to' in duration) 9425 ) { 9426 diffRes = momentsDifference( 9427 createLocal(duration.from), 9428 createLocal(duration.to) 9429 ); 9430 9431 duration = {}; 9432 duration.ms = diffRes.milliseconds; 9433 duration.M = diffRes.months; 9434 } 9435 9436 ret = new Duration(duration); 9437 9438 if (isDuration(input) && hasOwnProp(input, '_locale')) { 9439 ret._locale = input._locale; 9440 } 9441 9442 if (isDuration(input) && hasOwnProp(input, '_isValid')) { 9443 ret._isValid = input._isValid; 9444 } 9445 9446 return ret; 9447 } 9448 9449 createDuration.fn = Duration.prototype; 9450 createDuration.invalid = createInvalid$1; 9451 9452 function parseIso(inp, sign) { 9453 // We'd normally use ~~inp for this, but unfortunately it also 9454 // converts floats to ints. 9455 // inp may be undefined, so careful calling replace on it. 9456 var res = inp && parseFloat(inp.replace(',', '.')); 9457 // apply sign while we're at it 9458 return (isNaN(res) ? 0 : res) * sign; 9459 } 9460 9461 function positiveMomentsDifference(base, other) { 9462 var res = {}; 9463 9464 res.months = 9465 other.month() - base.month() + (other.year() - base.year()) * 12; 9466 if (base.clone().add(res.months, 'M').isAfter(other)) { 9467 --res.months; 9468 } 9469 9470 res.milliseconds = +other - +base.clone().add(res.months, 'M'); 9471 9472 return res; 9473 } 9474 9475 function momentsDifference(base, other) { 9476 var res; 9477 if (!(base.isValid() && other.isValid())) { 9478 return { milliseconds: 0, months: 0 }; 9479 } 9480 9481 other = cloneWithOffset(other, base); 9482 if (base.isBefore(other)) { 9483 res = positiveMomentsDifference(base, other); 9484 } else { 9485 res = positiveMomentsDifference(other, base); 9486 res.milliseconds = -res.milliseconds; 9487 res.months = -res.months; 9488 } 9489 9490 return res; 9491 } 9492 9493 // TODO: remove 'name' arg after deprecation is removed 9494 function createAdder(direction, name) { 9495 return function (val, period) { 9496 var dur, tmp; 9497 //invert the arguments, but complain about it 9498 if (period !== null && !isNaN(+period)) { 9499 deprecateSimple( 9500 name, 9501 'moment().' + 9502 name + 9503 '(period, number) is deprecated. Please use moment().' + 9504 name + 9505 '(number, period). ' + 9506 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' 9507 ); 9508 tmp = val; 9509 val = period; 9510 period = tmp; 9511 } 9512 9513 dur = createDuration(val, period); 9514 addSubtract(this, dur, direction); 9515 return this; 9516 }; 9517 } 9518 9519 function addSubtract(mom, duration, isAdding, updateOffset) { 9520 var milliseconds = duration._milliseconds, 9521 days = absRound(duration._days), 9522 months = absRound(duration._months); 9523 9524 if (!mom.isValid()) { 9525 // No op 9526 return; 9527 } 9528 9529 updateOffset = updateOffset == null ? true : updateOffset; 9530 9531 if (months) { 9532 setMonth(mom, get(mom, 'Month') + months * isAdding); 9533 } 9534 if (days) { 9535 set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); 9536 } 9537 if (milliseconds) { 9538 mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); 9539 } 9540 if (updateOffset) { 9541 hooks.updateOffset(mom, days || months); 9542 } 9543 } 9544 9545 var add = createAdder(1, 'add'), 9546 subtract = createAdder(-1, 'subtract'); 9547 9548 function isString(input) { 9549 return typeof input === 'string' || input instanceof String; 9550 } 9551 9552 // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined 9553 function isMomentInput(input) { 9554 return ( 9555 isMoment(input) || 9556 isDate(input) || 9557 isString(input) || 9558 isNumber(input) || 9559 isNumberOrStringArray(input) || 9560 isMomentInputObject(input) || 9561 input === null || 9562 input === undefined 9563 ); 9564 } 9565 9566 function isMomentInputObject(input) { 9567 var objectTest = isObject(input) && !isObjectEmpty(input), 9568 propertyTest = false, 9569 properties = [ 9570 'years', 9571 'year', 9572 'y', 9573 'months', 9574 'month', 9575 'M', 9576 'days', 9577 'day', 9578 'd', 9579 'dates', 9580 'date', 9581 'D', 9582 'hours', 9583 'hour', 9584 'h', 9585 'minutes', 9586 'minute', 9587 'm', 9588 'seconds', 9589 'second', 9590 's', 9591 'milliseconds', 9592 'millisecond', 9593 'ms', 9594 ], 9595 i, 9596 property, 9597 propertyLen = properties.length; 9598 9599 for (i = 0; i < propertyLen; i += 1) { 9600 property = properties[i]; 9601 propertyTest = propertyTest || hasOwnProp(input, property); 9602 } 9603 9604 return objectTest && propertyTest; 9605 } 9606 9607 function isNumberOrStringArray(input) { 9608 var arrayTest = isArray(input), 9609 dataTypeTest = false; 9610 if (arrayTest) { 9611 dataTypeTest = 9612 input.filter(function (item) { 9613 return !isNumber(item) && isString(input); 9614 }).length === 0; 9615 } 9616 return arrayTest && dataTypeTest; 9617 } 9618 9619 function isCalendarSpec(input) { 9620 var objectTest = isObject(input) && !isObjectEmpty(input), 9621 propertyTest = false, 9622 properties = [ 9623 'sameDay', 9624 'nextDay', 9625 'lastDay', 9626 'nextWeek', 9627 'lastWeek', 9628 'sameElse', 9629 ], 9630 i, 9631 property; 9632 9633 for (i = 0; i < properties.length; i += 1) { 9634 property = properties[i]; 9635 propertyTest = propertyTest || hasOwnProp(input, property); 9636 } 9637 9638 return objectTest && propertyTest; 9639 } 9640 9641 function getCalendarFormat(myMoment, now) { 9642 var diff = myMoment.diff(now, 'days', true); 9643 return diff < -6 9644 ? 'sameElse' 9645 : diff < -1 9646 ? 'lastWeek' 9647 : diff < 0 9648 ? 'lastDay' 9649 : diff < 1 9650 ? 'sameDay' 9651 : diff < 2 9652 ? 'nextDay' 9653 : diff < 7 9654 ? 'nextWeek' 9655 : 'sameElse'; 9656 } 9657 9658 function calendar$1(time, formats) { 9659 // Support for single parameter, formats only overload to the calendar function 9660 if (arguments.length === 1) { 9661 if (!arguments[0]) { 9662 time = undefined; 9663 formats = undefined; 9664 } else
vendor: 17,627 bytes, lines 9664-10222
9664 if (isMomentInput(arguments[0])) { 9665 time = arguments[0]; 9666 formats = undefined; 9667 } else if (isCalendarSpec(arguments[0])) { 9668 formats = arguments[0]; 9669 time = undefined; 9670 } 9671 } 9672 // We want to compare the start of today, vs this. 9673 // Getting start-of-today depends on whether we're local/utc/offset or not. 9674 var now = time || createLocal(), 9675 sod = cloneWithOffset(now, this).startOf('day'), 9676 format = hooks.calendarFormat(this, sod) || 'sameElse', 9677 output = 9678 formats && 9679 (isFunction(formats[format]) 9680 ? formats[format].call(this, now) 9681 : formats[format]); 9682 9683 return this.format( 9684 output || this.localeData().calendar(format, this, createLocal(now)) 9685 ); 9686 } 9687 9688 function clone() { 9689 return new Moment(this); 9690 } 9691 9692 function isAfter(input, units) { 9693 var localInput = isMoment(input) ? input : createLocal(input); 9694 if (!(this.isValid() && localInput.isValid())) { 9695 return false; 9696 } 9697 units = normalizeUnits(units) || 'millisecond'; 9698 if (units === 'millisecond') { 9699 return this.valueOf() > localInput.valueOf(); 9700 } else { 9701 return localInput.valueOf() < this.clone().startOf(units).valueOf(); 9702 } 9703 } 9704 9705 function isBefore(input, units) { 9706 var localInput = isMoment(input) ? input : createLocal(input); 9707 if (!(this.isValid() && localInput.isValid())) { 9708 return false; 9709 } 9710 units = normalizeUnits(units) || 'millisecond'; 9711 if (units === 'millisecond') { 9712 return this.valueOf() < localInput.valueOf(); 9713 } else { 9714 return this.clone().endOf(units).valueOf() < localInput.valueOf(); 9715 } 9716 } 9717 9718 function isBetween(from, to, units, inclusivity) { 9719 var localFrom = isMoment(from) ? from : createLocal(from), 9720 localTo = isMoment(to) ? to : createLocal(to); 9721 if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { 9722 return false; 9723 } 9724 inclusivity = inclusivity || '()'; 9725 return ( 9726 (inclusivity[0] === '(' 9727 ? this.isAfter(localFrom, units) 9728 : !this.isBefore(localFrom, units)) && 9729 (inclusivity[1] === ')' 9730 ? this.isBefore(localTo, units) 9731 : !this.isAfter(localTo, units)) 9732 ); 9733 } 9734 9735 function isSame(input, units) { 9736 var localInput = isMoment(input) ? input : createLocal(input), 9737 inputMs; 9738 if (!(this.isValid() && localInput.isValid())) { 9739 return false; 9740 } 9741 units = normalizeUnits(units) || 'millisecond'; 9742 if (units === 'millisecond') { 9743 return this.valueOf() === localInput.valueOf(); 9744 } else { 9745 inputMs = localInput.valueOf(); 9746 return ( 9747 this.clone().startOf(units).valueOf() <= inputMs && 9748 inputMs <= this.clone().endOf(units).valueOf() 9749 ); 9750 } 9751 } 9752 9753 function isSameOrAfter(input, units) { 9754 return this.isSame(input, units) || this.isAfter(input, units); 9755 } 9756 9757 function isSameOrBefore(input, units) { 9758 return this.isSame(input, units) || this.isBefore(input, units); 9759 } 9760 9761 function diff(input, units, asFloat) { 9762 var that, zoneDelta, output; 9763 9764 if (!this.isValid()) { 9765 return NaN; 9766 } 9767 9768 that = cloneWithOffset(input, this); 9769 9770 if (!that.isValid()) { 9771 return NaN; 9772 } 9773 9774 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; 9775 9776 units = normalizeUnits(units); 9777 9778 switch (units) { 9779 case 'year': 9780 output = monthDiff(this, that) / 12; 9781 break; 9782 case 'month': 9783 output = monthDiff(this, that); 9784 break; 9785 case 'quarter': 9786 output = monthDiff(this, that) / 3; 9787 break; 9788 case 'second': 9789 output = (this - that) / 1e3; 9790 break; // 1000 9791 case 'minute': 9792 output = (this - that) / 6e4; 9793 break; // 1000 * 60 9794 case 'hour': 9795 output = (this - that) / 36e5; 9796 break; // 1000 * 60 * 60 9797 case 'day': 9798 output = (this - that - zoneDelta) / 864e5; 9799 break; // 1000 * 60 * 60 * 24, negate dst 9800 case 'week': 9801 output = (this - that - zoneDelta) / 6048e5; 9802 break; // 1000 * 60 * 60 * 24 * 7, negate dst 9803 default: 9804 output = this - that; 9805 } 9806 9807 return asFloat ? output : absFloor(output); 9808 } 9809 9810 function monthDiff(a, b) { 9811 if (a.date() < b.date()) { 9812 // end-of-month calculations work correct when the start month has more 9813 // days than the end month. 9814 return -monthDiff(b, a); 9815 } 9816 // difference in months 9817 var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), 9818 // b is in (anchor - 1 month, anchor + 1 month) 9819 anchor = a.clone().add(wholeMonthDiff, 'months'), 9820 anchor2, 9821 adjust; 9822 9823 if (b - anchor < 0) { 9824 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); 9825 // linear across the month 9826 adjust = (b - anchor) / (anchor - anchor2); 9827 } else { 9828 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); 9829 // linear across the month 9830 adjust = (b - anchor) / (anchor2 - anchor); 9831 } 9832 9833 //check for negative zero, return zero if negative zero 9834 return -(wholeMonthDiff + adjust) || 0; 9835 } 9836 9837 hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; 9838 hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; 9839 9840 function toString() { 9841 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); 9842 } 9843 9844 function toISOString(keepOffset) { 9845 if (!this.isValid()) { 9846 return null; 9847 } 9848 var utc = keepOffset !== true, 9849 m = utc ? this.clone().utc() : this; 9850 if (m.year() < 0 || m.year() > 9999) { 9851 return formatMoment( 9852 m, 9853 utc 9854 ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' 9855 : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' 9856 ); 9857 } 9858 if (isFunction(Date.prototype.toISOString)) { 9859 // native implementation is ~50x faster, use it when we can 9860 if (utc) { 9861 return this.toDate().toISOString(); 9862 } else { 9863 return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) 9864 .toISOString() 9865 .replace('Z', formatMoment(m, 'Z')); 9866 } 9867 } 9868 return formatMoment( 9869 m, 9870 utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' 9871 ); 9872 } 9873 9874 /** 9875 * Return a human readable representation of a moment that can 9876 * also be evaluated to get a new moment which is the same 9877 * 9878 * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects 9879 */ 9880 function inspect() { 9881 if (!this.isValid()) { 9882 return 'moment.invalid(/* ' + this._i + ' */)'; 9883 } 9884 var func = 'moment', 9885 zone = '', 9886 prefix, 9887 year, 9888 datetime, 9889 suffix; 9890 if (!this.isLocal()) { 9891 func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; 9892 zone = 'Z'; 9893 } 9894 prefix = '[' + func + '("]'; 9895 year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; 9896 datetime = '-MM-DD[T]HH:mm:ss.SSS'; 9897 suffix = zone + '[")]'; 9898 9899 return this.format(prefix + year + datetime + suffix); 9900 } 9901 9902 function format(inputString) { 9903 if (!inputString) { 9904 inputString = this.isUtc() 9905 ? hooks.defaultFormatUtc 9906 : hooks.defaultFormat; 9907 } 9908 var output = formatMoment(this, inputString); 9909 return this.localeData().postformat(output); 9910 } 9911 9912 function from(time, withoutSuffix) { 9913 if ( 9914 this.isValid() && 9915 ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) 9916 ) { 9917 return createDuration({ to: this, from: time }) 9918 .locale(this.locale()) 9919 .humanize(!withoutSuffix); 9920 } else { 9921 return this.localeData().invalidDate(); 9922 } 9923 } 9924 9925 function fromNow(withoutSuffix) { 9926 return this.from(createLocal(), withoutSuffix); 9927 } 9928 9929 function to(time, withoutSuffix) { 9930 if ( 9931 this.isValid() && 9932 ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) 9933 ) { 9934 return createDuration({ from: this, to: time }) 9935 .locale(this.locale()) 9936 .humanize(!withoutSuffix); 9937 } else { 9938 return this.localeData().invalidDate(); 9939 } 9940 } 9941 9942 function toNow(withoutSuffix) { 9943 return this.to(createLocal(), withoutSuffix); 9944 } 9945 9946 // If passed a locale key, it will set the locale for this 9947 // instance. Otherwise, it will return the locale configuration 9948 // variables for this instance. 9949 function locale(key) { 9950 var newLocaleData; 9951 9952 if (key === undefined) { 9953 return this._locale._abbr; 9954 } else { 9955 newLocaleData = getLocale(key); 9956 if (newLocaleData != null) { 9957 this._locale = newLocaleData; 9958 } 9959 return this; 9960 } 9961 } 9962 9963 var lang = deprecate( 9964 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', 9965 function (key) { 9966 if (key === undefined) { 9967 return this.localeData(); 9968 } else { 9969 return this.locale(key); 9970 } 9971 } 9972 ); 9973 9974 function localeData() { 9975 return this._locale; 9976 } 9977 9978 var MS_PER_SECOND = 1000, 9979 MS_PER_MINUTE = 60 * MS_PER_SECOND, 9980 MS_PER_HOUR = 60 * MS_PER_MINUTE, 9981 MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; 9982 9983 // actual modulo - handles negative numbers (for dates before 1970): 9984 function mod$1(dividend, divisor) { 9985 return ((dividend % divisor) + divisor) % divisor; 9986 } 9987 9988 function localStartOfDate(y, m, d) { 9989 // the date constructor remaps years 0-99 to 1900-1999 9990 if (y < 100 && y >= 0) { 9991 // preserve leap years using a full 400 year cycle, then reset 9992 return new Date(y + 400, m, d) - MS_PER_400_YEARS; 9993 } else { 9994 return new Date(y, m, d).valueOf(); 9995 } 9996 } 9997 9998 function utcStartOfDate(y, m, d) { 9999 // Date.UTC remaps years 0-99 to 1900-1999 10000 if (y < 100 && y >= 0) { 10001 // preserve leap years using a full 400 year cycle, then reset 10002 return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; 10003 } else { 10004 return Date.UTC(y, m, d); 10005 } 10006 } 10007 10008 function startOf(units) { 10009 var time, startOfDate; 10010 units = normalizeUnits(units); 10011 if (units === undefined || units === 'millisecond' || !this.isValid()) { 10012 return this; 10013 } 10014 10015 startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; 10016 10017 switch (units) { 10018 case 'year': 10019 time = startOfDate(this.year(), 0, 1); 10020 break; 10021 case 'quarter': 10022 time = startOfDate( 10023 this.year(), 10024 this.month() - (this.month() % 3), 10025 1 10026 ); 10027 break; 10028 case 'month': 10029 time = startOfDate(this.year(), this.month(), 1); 10030 break; 10031 case 'week': 10032 time = startOfDate( 10033 this.year(), 10034 this.month(), 10035 this.date() - this.weekday() 10036 ); 10037 break; 10038 case 'isoWeek': 10039 time = startOfDate( 10040 this.year(), 10041 this.month(), 10042 this.date() - (this.isoWeekday() - 1) 10043 ); 10044 break; 10045 case 'day': 10046 case 'date': 10047 time = startOfDate(this.year(), this.month(), this.date()); 10048 break; 10049 case 'hour': 10050 time = this._d.valueOf(); 10051 time -= mod$1( 10052 time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), 10053 MS_PER_HOUR 10054 ); 10055 break; 10056 case 'minute': 10057 time = this._d.valueOf(); 10058 time -= mod$1(time, MS_PER_MINUTE); 10059 break; 10060 case 'second': 10061 time = this._d.valueOf(); 10062 time -= mod$1(time, MS_PER_SECOND); 10063 break; 10064 } 10065 10066 this._d.setTime(time); 10067 hooks.updateOffset(this, true); 10068 return this; 10069 } 10070 10071 function endOf(units) { 10072 var time, startOfDate; 10073 units = normalizeUnits(units); 10074 if (units === undefined || units === 'millisecond' || !this.isValid()) { 10075 return this; 10076 } 10077 10078 startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; 10079 10080 switch (units) { 10081 case 'year': 10082 time = startOfDate(this.year() + 1, 0, 1) - 1; 10083 break; 10084 case 'quarter': 10085 time = 10086 startOfDate( 10087 this.year(), 10088 this.month() - (this.month() % 3) + 3, 10089 1 10090 ) - 1; 10091 break; 10092 case 'month': 10093 time = startOfDate(this.year(), this.month() + 1, 1) - 1; 10094 break; 10095 case 'week': 10096 time = 10097 startOfDate( 10098 this.year(), 10099 this.month(), 10100 this.date() - this.weekday() + 7 10101 ) - 1; 10102 break; 10103 case 'isoWeek': 10104 time = 10105 startOfDate( 10106 this.year(), 10107 this.month(), 10108 this.date() - (this.isoWeekday() - 1) + 7 10109 ) - 1; 10110 break; 10111 case 'day': 10112 case 'date': 10113 time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; 10114 break; 10115 case 'hour': 10116 time = this._d.valueOf(); 10117 time += 10118 MS_PER_HOUR - 10119 mod$1( 10120 time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), 10121 MS_PER_HOUR 10122 ) - 10123 1; 10124 break; 10125 case 'minute': 10126 time = this._d.valueOf(); 10127 time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; 10128 break; 10129 case 'second': 10130 time = this._d.valueOf(); 10131 time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; 10132 break; 10133 } 10134 10135 this._d.setTime(time); 10136 hooks.updateOffset(this, true); 10137 return this; 10138 } 10139 10140 function valueOf() { 10141 return this._d.valueOf() - (this._offset || 0) * 60000; 10142 } 10143 10144 function unix() { 10145 return Math.floor(this.valueOf() / 1000); 10146 } 10147 10148 function toDate() { 10149 return new Date(this.valueOf()); 10150 } 10151 10152 function toArray() { 10153 var m = this; 10154 return [ 10155 m.year(), 10156 m.month(), 10157 m.date(), 10158 m.hour(), 10159 m.minute(), 10160 m.second(), 10161 m.millisecond(), 10162 ]; 10163 } 10164 10165 function toObject() { 10166 var m = this; 10167 return { 10168 years: m.year(), 10169 months: m.month(), 10170 date: m.date(), 10171 hours: m.hours(), 10172 minutes: m.minutes(), 10173 seconds: m.seconds(), 10174 milliseconds: m.milliseconds(), 10175 }; 10176 } 10177 10178 function toJSON() { 10179 // new Date(NaN).toJSON() === null 10180 return this.isValid() ? this.toISOString() : null; 10181 } 10182 10183 function isValid$2() { 10184 return isValid(this); 10185 } 10186 10187 function parsingFlags() { 10188 return extend({}, getParsingFlags(this)); 10189 } 10190 10191 function invalidAt() { 10192 return getParsingFlags(this).overflow; 10193 } 10194 10195 function creationData() { 10196 return { 10197 input: this._i, 10198 format: this._f, 10199 locale: this._locale, 10200 isUTC: this._isUTC, 10201 strict: this._strict, 10202 }; 10203 } 10204 10205 addFormatToken('N', 0, 0, 'eraAbbr'); 10206 addFormatToken('NN', 0, 0, 'eraAbbr'); 10207 addFormatToken('NNN', 0, 0, 'eraAbbr'); 10208 addFormatToken('NNNN', 0, 0, 'eraName'); 10209 addFormatToken('NNNNN', 0, 0, 'eraNarrow'); 10210 10211 addFormatToken('y', ['y', 1], 'yo', 'eraYear'); 10212 addFormatToken('y', ['yy', 2], 0, 'eraYear'); 10213 addFormatToken('y', ['yyy', 3], 0, 'eraYear'); 10214 addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); 10215 10216 addRegexToken('N', matchEraAbbr); 10217 addRegexToken('NN', matchEraAbbr); 10218 addRegexToken('NNN', matchEraAbbr); 10219 addRegexToken('NNNN', matchEraName); 10220 addRegexToken('NNNNN', matchEraNarrow); 10221 10222 addParseToken(
vendor: 5,275 bytes, lines 10222-10400
10222 10223 ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], 10224 function (input, array, config, token) { 10225 var era = config._locale.erasParse(input, token, config._strict); 10226 if (era) { 10227 getParsingFlags(config).era = era; 10228 } else { 10229 getParsingFlags(config).invalidEra = input; 10230 } 10231 } 10232 ); 10233 10234 addRegexToken('y', matchUnsigned); 10235 addRegexToken('yy', matchUnsigned); 10236 addRegexToken('yyy', matchUnsigned); 10237 addRegexToken('yyyy', matchUnsigned); 10238 addRegexToken('yo', matchEraYearOrdinal); 10239 10240 addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); 10241 addParseToken(['yo'], function (input, array, config, token) { 10242 var match; 10243 if (config._locale._eraYearOrdinalRegex) { 10244 match = input.match(config._locale._eraYearOrdinalRegex); 10245 } 10246 10247 if (config._locale.eraYearOrdinalParse) { 10248 array[YEAR] = config._locale.eraYearOrdinalParse(input, match); 10249 } else { 10250 array[YEAR] = parseInt(input, 10); 10251 } 10252 }); 10253 10254 function localeEras(m, format) { 10255 var i, 10256 l, 10257 date, 10258 eras = this._eras || getLocale('en')._eras; 10259 for (i = 0, l = eras.length; i < l; ++i) { 10260 switch (typeof eras[i].since) { 10261 case 'string': 10262 // truncate time 10263 date = hooks(eras[i].since).startOf('day'); 10264 eras[i].since = date.valueOf(); 10265 break; 10266 } 10267 10268 switch (typeof eras[i].until) { 10269 case 'undefined': 10270 eras[i].until = +Infinity; 10271 break; 10272 case 'string': 10273 // truncate time 10274 date = hooks(eras[i].until).startOf('day').valueOf(); 10275 eras[i].until = date.valueOf(); 10276 break; 10277 } 10278 } 10279 return eras; 10280 } 10281 10282 function localeErasParse(eraName, format, strict) { 10283 var i, 10284 l, 10285 eras = this.eras(), 10286 name, 10287 abbr, 10288 narrow; 10289 eraName = eraName.toUpperCase(); 10290 10291 for (i = 0, l = eras.length; i < l; ++i) { 10292 name = eras[i].name.toUpperCase(); 10293 abbr = eras[i].abbr.toUpperCase(); 10294 narrow = eras[i].narrow.toUpperCase(); 10295 10296 if (strict) { 10297 switch (format) { 10298 case 'N': 10299 case 'NN': 10300 case 'NNN': 10301 if (abbr === eraName) { 10302 return eras[i]; 10303 } 10304 break; 10305 10306 case 'NNNN': 10307 if (name === eraName) { 10308 return eras[i]; 10309 } 10310 break; 10311 10312 case 'NNNNN': 10313 if (narrow === eraName) { 10314 return eras[i]; 10315 } 10316 break; 10317 } 10318 } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { 10319 return eras[i]; 10320 } 10321 } 10322 } 10323 10324 function localeErasConvertYear(era, year) { 10325 var dir = era.since <= era.until ? +1 : -1; 10326 if (year === undefined) { 10327 return hooks(era.since).year(); 10328 } else { 10329 return hooks(era.since).year() + (year - era.offset) * dir; 10330 } 10331 } 10332 10333 function getEraName() { 10334 var i, 10335 l, 10336 val, 10337 eras = this.localeData().eras(); 10338 for (i = 0, l = eras.length; i < l; ++i) { 10339 // truncate time 10340 val = this.clone().startOf('day').valueOf(); 10341 10342 if (eras[i].since <= val && val <= eras[i].until) { 10343 return eras[i].name; 10344 } 10345 if (eras[i].until <= val && val <= eras[i].since) { 10346 return eras[i].name; 10347 } 10348 } 10349 10350 return ''; 10351 } 10352 10353 function getEraNarrow() { 10354 var i, 10355 l, 10356 val, 10357 eras = this.localeData().eras(); 10358 for (i = 0, l = eras.length; i < l; ++i) { 10359 // truncate time 10360 val = this.clone().startOf('day').valueOf(); 10361 10362 if (eras[i].since <= val && val <= eras[i].until) { 10363 return eras[i].narrow; 10364 } 10365 if (eras[i].until <= val && val <= eras[i].since) { 10366 return eras[i].narrow; 10367 } 10368 } 10369 10370 return ''; 10371 } 10372 10373 function getEraAbbr() { 10374 var i, 10375 l, 10376 val, 10377 eras = this.localeData().eras(); 10378 for (i = 0, l = eras.length; i < l; ++i) { 10379 // truncate time 10380 val = this.clone().startOf('day').valueOf(); 10381 10382 if (eras[i].since <= val && val <= eras[i].until) { 10383 return eras[i].abbr; 10384 } 10385 if (eras[i].until <= val && val <= eras[i].since) { 10386 return eras[i].abbr; 10387 } 10388 } 10389 10390 return ''; 10391 } 10392 10393 function getEraYear() { 10394 var i, 10395 l, 10396 dir, 10397 val, 10398 eras = this.localeData().eras(); 10399 for (i = 0, l = eras.length; i < l; ++i) { 10400 dir = eras[i].since <= eras[i].until ? +
vendor: 9,818 bytes, lines 10400-10759
104001 : -1; 10401 10402 // truncate time 10403 val = this.clone().startOf('day').valueOf(); 10404 10405 if ( 10406 (eras[i].since <= val && val <= eras[i].until) || 10407 (eras[i].until <= val && val <= eras[i].since) 10408 ) { 10409 return ( 10410 (this.year() - hooks(eras[i].since).year()) * dir + 10411 eras[i].offset 10412 ); 10413 } 10414 } 10415 10416 return this.year(); 10417 } 10418 10419 function erasNameRegex(isStrict) { 10420 if (!hasOwnProp(this, '_erasNameRegex')) { 10421 computeErasParse.call(this); 10422 } 10423 return isStrict ? this._erasNameRegex : this._erasRegex; 10424 } 10425 10426 function erasAbbrRegex(isStrict) { 10427 if (!hasOwnProp(this, '_erasAbbrRegex')) { 10428 computeErasParse.call(this); 10429 } 10430 return isStrict ? this._erasAbbrRegex : this._erasRegex; 10431 } 10432 10433 function erasNarrowRegex(isStrict) { 10434 if (!hasOwnProp(this, '_erasNarrowRegex')) { 10435 computeErasParse.call(this); 10436 } 10437 return isStrict ? this._erasNarrowRegex : this._erasRegex; 10438 } 10439 10440 function matchEraAbbr(isStrict, locale) { 10441 return locale.erasAbbrRegex(isStrict); 10442 } 10443 10444 function matchEraName(isStrict, locale) { 10445 return locale.erasNameRegex(isStrict); 10446 } 10447 10448 function matchEraNarrow(isStrict, locale) { 10449 return locale.erasNarrowRegex(isStrict); 10450 } 10451 10452 function matchEraYearOrdinal(isStrict, locale) { 10453 return locale._eraYearOrdinalRegex || matchUnsigned; 10454 } 10455 10456 function computeErasParse() { 10457 var abbrPieces = [], 10458 namePieces = [], 10459 narrowPieces = [], 10460 mixedPieces = [], 10461 i, 10462 l, 10463 erasName, 10464 erasAbbr, 10465 erasNarrow, 10466 eras = this.eras(); 10467 10468 for (i = 0, l = eras.length; i < l; ++i) { 10469 erasName = regexEscape(eras[i].name); 10470 erasAbbr = regexEscape(eras[i].abbr); 10471 erasNarrow = regexEscape(eras[i].narrow); 10472 10473 namePieces.push(erasName); 10474 abbrPieces.push(erasAbbr); 10475 narrowPieces.push(erasNarrow); 10476 mixedPieces.push(erasName); 10477 mixedPieces.push(erasAbbr); 10478 mixedPieces.push(erasNarrow); 10479 } 10480 10481 this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 10482 this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); 10483 this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); 10484 this._erasNarrowRegex = new RegExp( 10485 '^(' + narrowPieces.join('|') + ')', 10486 'i' 10487 ); 10488 } 10489 10490 // FORMATTING 10491 10492 addFormatToken(0, ['gg', 2], 0, function () { 10493 return this.weekYear() % 100; 10494 }); 10495 10496 addFormatToken(0, ['GG', 2], 0, function () { 10497 return this.isoWeekYear() % 100; 10498 }); 10499 10500 function addWeekYearFormatToken(token, getter) { 10501 addFormatToken(0, [token, token.length], 0, getter); 10502 } 10503 10504 addWeekYearFormatToken('gggg', 'weekYear'); 10505 addWeekYearFormatToken('ggggg', 'weekYear'); 10506 addWeekYearFormatToken('GGGG', 'isoWeekYear'); 10507 addWeekYearFormatToken('GGGGG', 'isoWeekYear'); 10508 10509 // ALIASES 10510 10511 // PARSING 10512 10513 addRegexToken('G', matchSigned); 10514 addRegexToken('g', matchSigned); 10515 addRegexToken('GG', match1to2, match2); 10516 addRegexToken('gg', match1to2, match2); 10517 addRegexToken('GGGG', match1to4, match4); 10518 addRegexToken('gggg', match1to4, match4); 10519 addRegexToken('GGGGG', match1to6, match6); 10520 addRegexToken('ggggg', match1to6, match6); 10521 10522 addWeekParseToken( 10523 ['gggg', 'ggggg', 'GGGG', 'GGGGG'], 10524 function (input, week, config, token) { 10525 week[token.substr(0, 2)] = toInt(input); 10526 } 10527 ); 10528 10529 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { 10530 week[token] = hooks.parseTwoDigitYear(input); 10531 }); 10532 10533 // MOMENTS 10534 10535 function getSetWeekYear(input) { 10536 return getSetWeekYearHelper.call( 10537 this, 10538 input, 10539 this.week(), 10540 this.weekday() + this.localeData()._week.dow, 10541 this.localeData()._week.dow, 10542 this.localeData()._week.doy 10543 ); 10544 } 10545 10546 function getSetISOWeekYear(input) { 10547 return getSetWeekYearHelper.call( 10548 this, 10549 input, 10550 this.isoWeek(), 10551 this.isoWeekday(), 10552 1, 10553 4 10554 ); 10555 } 10556 10557 function getISOWeeksInYear() { 10558 return weeksInYear(this.year(), 1, 4); 10559 } 10560 10561 function getISOWeeksInISOWeekYear() { 10562 return weeksInYear(this.isoWeekYear(), 1, 4); 10563 } 10564 10565 function getWeeksInYear() { 10566 var weekInfo = this.localeData()._week; 10567 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); 10568 } 10569 10570 function getWeeksInWeekYear() { 10571 var weekInfo = this.localeData()._week; 10572 return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); 10573 } 10574 10575 function getSetWeekYearHelper(input, week, weekday, dow, doy) { 10576 var weeksTarget; 10577 if (input == null) { 10578 return weekOfYear(this, dow, doy).year; 10579 } else { 10580 weeksTarget = weeksInYear(input, dow, doy); 10581 if (week > weeksTarget) { 10582 week = weeksTarget; 10583 } 10584 return setWeekAll.call(this, input, week, weekday, dow, doy); 10585 } 10586 } 10587 10588 function setWeekAll(weekYear, week, weekday, dow, doy) { 10589 var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), 10590 date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); 10591 10592 this.year(date.getUTCFullYear()); 10593 this.month(date.getUTCMonth()); 10594 this.date(date.getUTCDate()); 10595 return this; 10596 } 10597 10598 // FORMATTING 10599 10600 addFormatToken('Q', 0, 'Qo', 'quarter'); 10601 10602 // PARSING 10603 10604 addRegexToken('Q', match1); 10605 addParseToken('Q', function (input, array) { 10606 array[MONTH] = (toInt(input) - 1) * 3; 10607 }); 10608 10609 // MOMENTS 10610 10611 function getSetQuarter(input) { 10612 return input == null 10613 ? Math.ceil((this.month() + 1) / 3) 10614 : this.month((input - 1) * 3 + (this.month() % 3)); 10615 } 10616 10617 // FORMATTING 10618 10619 addFormatToken('D', ['DD', 2], 'Do', 'date'); 10620 10621 // PARSING 10622 10623 addRegexToken('D', match1to2, match1to2NoLeadingZero); 10624 addRegexToken('DD', match1to2, match2); 10625 addRegexToken('Do', function (isStrict, locale) { 10626 // TODO: Remove "ordinalParse" fallback in next major release. 10627 return isStrict 10628 ? locale._dayOfMonthOrdinalParse || locale._ordinalParse 10629 : locale._dayOfMonthOrdinalParseLenient; 10630 }); 10631 10632 addParseToken(['D', 'DD'], DATE); 10633 addParseToken('Do', function (input, array) { 10634 array[DATE] = toInt(input.match(match1to2)[0]); 10635 }); 10636 10637 // MOMENTS 10638 10639 var getSetDayOfMonth = makeGetSet('Date', true); 10640 10641 // FORMATTING 10642 10643 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); 10644 10645 // PARSING 10646 10647 addRegexToken('DDD', match1to3); 10648 addRegexToken('DDDD', match3); 10649 addParseToken(['DDD', 'DDDD'], function (input, array, config) { 10650 config._dayOfYear = toInt(input); 10651 }); 10652 10653 // HELPERS 10654 10655 // MOMENTS 10656 10657 function getSetDayOfYear(input) { 10658 var dayOfYear = 10659 Math.round( 10660 (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 10661 ) + 1; 10662 return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); 10663 } 10664 10665 // FORMATTING 10666 10667 addFormatToken('m', ['mm', 2], 0, 'minute'); 10668 10669 // PARSING 10670 10671 addRegexToken('m', match1to2, match1to2HasZero); 10672 addRegexToken('mm', match1to2, match2); 10673 addParseToken(['m', 'mm'], MINUTE); 10674 10675 // MOMENTS 10676 10677 var getSetMinute = makeGetSet('Minutes', false); 10678 10679 // FORMATTING 10680 10681 addFormatToken('s', ['ss', 2], 0, 'second'); 10682 10683 // PARSING 10684 10685 addRegexToken('s', match1to2, match1to2HasZero); 10686 addRegexToken('ss', match1to2, match2); 10687 addParseToken(['s', 'ss'], SECOND); 10688 10689 // MOMENTS 10690 10691 var getSetSecond = makeGetSet('Seconds', false); 10692 10693 // FORMATTING 10694 10695 addFormatToken('S', 0, 0, function () { 10696 return ~~(this.millisecond() / 100); 10697 }); 10698 10699 addFormatToken(0, ['SS', 2], 0, function () { 10700 return ~~(this.millisecond() / 10); 10701 }); 10702 10703 addFormatToken(0, ['SSS', 3], 0, 'millisecond'); 10704 addFormatToken(0, ['SSSS', 4], 0, function () { 10705 return this.millisecond() * 10; 10706 }); 10707 addFormatToken(0, ['SSSSS', 5], 0, function () { 10708 return this.millisecond() * 100; 10709 }); 10710 addFormatToken(0, ['SSSSSS', 6], 0, function () { 10711 return this.millisecond() * 1000; 10712 }); 10713 addFormatToken(0, ['SSSSSSS', 7], 0, function () { 10714 return this.millisecond() * 10000; 10715 }); 10716 addFormatToken(0, ['SSSSSSSS', 8], 0, function () { 10717 return this.millisecond() * 100000; 10718 }); 10719 addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { 10720 return this.millisecond() * 1000000; 10721 }); 10722 10723 // PARSING 10724 10725 addRegexToken('S', match1to3, match1); 10726 addRegexToken('SS', match1to3, match2); 10727 addRegexToken('SSS', match1to3, match3); 10728 10729 var token, getSetMillisecond; 10730 for (token = 'SSSS'; token.length <= 9; token += 'S') { 10731 addRegexToken(token, matchUnsigned); 10732 } 10733 10734 function parseMs(input, array) { 10735 array[MILLISECOND] = toInt(('0.' + input) * 1000); 10736 } 10737 10738 for (token = 'S'; token.length <= 9; token += 'S') { 10739 addParseToken(token, parseMs); 10740 } 10741 10742 getSetMillisecond = makeGetSet('Milliseconds', false); 10743 10744 // FORMATTING 10745 10746 addFormatToken('z', 0, 0, 'zoneAbbr'); 10747 addFormatToken('zz', 0, 0, 'zoneName'); 10748 10749 // MOMENTS 10750 10751 function getZoneAbbr() { 10752 return this._isUTC ? 'UTC' : ''; 10753 } 10754 10755 function getZoneName() { 10756 return this._isUTC ? 'Coordinated Universal Time' : ''; 10757 } 10758 10759 var proto
vendor: 8,352 bytes, lines 10759-11030
10759 = Moment.prototype; 10760 10761 proto.add = add; 10762 proto.calendar = calendar$1; 10763 proto.clone = clone; 10764 proto.diff = diff; 10765 proto.endOf = endOf; 10766 proto.format = format; 10767 proto.from = from; 10768 proto.fromNow = fromNow; 10769 proto.to = to; 10770 proto.toNow = toNow; 10771 proto.get = stringGet; 10772 proto.invalidAt = invalidAt; 10773 proto.isAfter = isAfter; 10774 proto.isBefore = isBefore; 10775 proto.isBetween = isBetween; 10776 proto.isSame = isSame; 10777 proto.isSameOrAfter = isSameOrAfter; 10778 proto.isSameOrBefore = isSameOrBefore; 10779 proto.isValid = isValid$2; 10780 proto.lang = lang; 10781 proto.locale = locale; 10782 proto.localeData = localeData; 10783 proto.max = prototypeMax; 10784 proto.min = prototypeMin; 10785 proto.parsingFlags = parsingFlags; 10786 proto.set = stringSet; 10787 proto.startOf = startOf; 10788 proto.subtract = subtract; 10789 proto.toArray = toArray; 10790 proto.toObject = toObject; 10791 proto.toDate = toDate; 10792 proto.toISOString = toISOString; 10793 proto.inspect = inspect; 10794 if (typeof Symbol !== 'undefined' && Symbol.for != null) { 10795 proto[Symbol.for('nodejs.util.inspect.custom')] = function () { 10796 return 'Moment<' + this.format() + '>'; 10797 }; 10798 } 10799 proto.toJSON = toJSON; 10800 proto.toString = toString; 10801 proto.unix = unix; 10802 proto.valueOf = valueOf; 10803 proto.creationData = creationData; 10804 proto.eraName = getEraName; 10805 proto.eraNarrow = getEraNarrow; 10806 proto.eraAbbr = getEraAbbr; 10807 proto.eraYear = getEraYear; 10808 proto.year = getSetYear; 10809 proto.isLeapYear = getIsLeapYear; 10810 proto.weekYear = getSetWeekYear; 10811 proto.isoWeekYear = getSetISOWeekYear; 10812 proto.quarter = proto.quarters = getSetQuarter; 10813 proto.month = getSetMonth; 10814 proto.daysInMonth = getDaysInMonth; 10815 proto.week = proto.weeks = getSetWeek; 10816 proto.isoWeek = proto.isoWeeks = getSetISOWeek; 10817 proto.weeksInYear = getWeeksInYear; 10818 proto.weeksInWeekYear = getWeeksInWeekYear; 10819 proto.isoWeeksInYear = getISOWeeksInYear; 10820 proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; 10821 proto.date = getSetDayOfMonth; 10822 proto.day = proto.days = getSetDayOfWeek; 10823 proto.weekday = getSetLocaleDayOfWeek; 10824 proto.isoWeekday = getSetISODayOfWeek; 10825 proto.dayOfYear = getSetDayOfYear; 10826 proto.hour = proto.hours = getSetHour; 10827 proto.minute = proto.minutes = getSetMinute; 10828 proto.second = proto.seconds = getSetSecond; 10829 proto.millisecond = proto.milliseconds = getSetMillisecond; 10830 proto.utcOffset = getSetOffset; 10831 proto.utc = setOffsetToUTC; 10832 proto.local = setOffsetToLocal; 10833 proto.parseZone = setOffsetToParsedOffset; 10834 proto.hasAlignedHourOffset = hasAlignedHourOffset; 10835 proto.isDST = isDaylightSavingTime; 10836 proto.isLocal = isLocal; 10837 proto.isUtcOffset = isUtcOffset; 10838 proto.isUtc = isUtc; 10839 proto.isUTC = isUtc; 10840 proto.zoneAbbr = getZoneAbbr; 10841 proto.zoneName = getZoneName; 10842 proto.dates = deprecate( 10843 'dates accessor is deprecated. Use date instead.', 10844 getSetDayOfMonth 10845 ); 10846 proto.months = deprecate( 10847 'months accessor is deprecated. Use month instead', 10848 getSetMonth 10849 ); 10850 proto.years = deprecate( 10851 'years accessor is deprecated. Use year instead', 10852 getSetYear 10853 ); 10854 proto.zone = deprecate( 10855 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', 10856 getSetZone 10857 ); 10858 proto.isDSTShifted = deprecate( 10859 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', 10860 isDaylightSavingTimeShifted 10861 ); 10862 10863 function createUnix(input) { 10864 return createLocal(input * 1000); 10865 } 10866 10867 function createInZone() { 10868 return createLocal.apply(null, arguments).parseZone(); 10869 } 10870 10871 function preParsePostFormat(string) { 10872 return string; 10873 } 10874 10875 var proto$1 = Locale.prototype; 10876 10877 proto$1.calendar = calendar; 10878 proto$1.longDateFormat = longDateFormat; 10879 proto$1.invalidDate = invalidDate; 10880 proto$1.ordinal = ordinal; 10881 proto$1.preparse = preParsePostFormat; 10882 proto$1.postformat = preParsePostFormat; 10883 proto$1.relativeTime = relativeTime; 10884 proto$1.pastFuture = pastFuture; 10885 proto$1.set = set; 10886 proto$1.eras = localeEras; 10887 proto$1.erasParse = localeErasParse; 10888 proto$1.erasConvertYear = localeErasConvertYear; 10889 proto$1.erasAbbrRegex = erasAbbrRegex; 10890 proto$1.erasNameRegex = erasNameRegex; 10891 proto$1.erasNarrowRegex = erasNarrowRegex; 10892 10893 proto$1.months = localeMonths; 10894 proto$1.monthsShort = localeMonthsShort; 10895 proto$1.monthsParse = localeMonthsParse; 10896 proto$1.monthsRegex = monthsRegex; 10897 proto$1.monthsShortRegex = monthsShortRegex; 10898 proto$1.week = localeWeek; 10899 proto$1.firstDayOfYear = localeFirstDayOfYear; 10900 proto$1.firstDayOfWeek = localeFirstDayOfWeek; 10901 10902 proto$1.weekdays = localeWeekdays; 10903 proto$1.weekdaysMin = localeWeekdaysMin; 10904 proto$1.weekdaysShort = localeWeekdaysShort; 10905 proto$1.weekdaysParse = localeWeekdaysParse; 10906 10907 proto$1.weekdaysRegex = weekdaysRegex; 10908 proto$1.weekdaysShortRegex = weekdaysShortRegex; 10909 proto$1.weekdaysMinRegex = weekdaysMinRegex; 10910 10911 proto$1.isPM = localeIsPM; 10912 proto$1.meridiem = localeMeridiem; 10913 10914 function get$1(format, index, field, setter) { 10915 var locale = getLocale(), 10916 utc = createUTC().set(setter, index); 10917 return locale[field](utc, format); 10918 } 10919 10920 function listMonthsImpl(format, index, field) { 10921 if (isNumber(format)) { 10922 index = format; 10923 format = undefined; 10924 } 10925 10926 format = format || ''; 10927 10928 if (index != null) { 10929 return get$1(format, index, field, 'month'); 10930 } 10931 10932 var i, 10933 out = []; 10934 for (i = 0; i < 12; i++) { 10935 out[i] = get$1(format, i, field, 'month'); 10936 } 10937 return out; 10938 } 10939 10940 // () 10941 // (5) 10942 // (fmt, 5) 10943 // (fmt) 10944 // (true) 10945 // (true, 5) 10946 // (true, fmt, 5) 10947 // (true, fmt) 10948 function listWeekdaysImpl(localeSorted, format, index, field) { 10949 if (typeof localeSorted === 'boolean') { 10950 if (isNumber(format)) { 10951 index = format; 10952 format = undefined; 10953 } 10954 10955 format = format || ''; 10956 } else { 10957 format = localeSorted; 10958 index = format; 10959 localeSorted = false; 10960 10961 if (isNumber(format)) { 10962 index = format; 10963 format = undefined; 10964 } 10965 10966 format = format || ''; 10967 } 10968 10969 var locale = getLocale(), 10970 shift = localeSorted ? locale._week.dow : 0, 10971 i, 10972 out = []; 10973 10974 if (index != null) { 10975 return get$1(format, (index + shift) % 7, field, 'day'); 10976 } 10977 10978 for (i = 0; i < 7; i++) { 10979 out[i] = get$1(format, (i + shift) % 7, field, 'day'); 10980 } 10981 return out; 10982 } 10983 10984 function listMonths(format, index) { 10985 return listMonthsImpl(format, index, 'months'); 10986 } 10987 10988 function listMonthsShort(format, index) { 10989 return listMonthsImpl(format, index, 'monthsShort'); 10990 } 10991 10992 function listWeekdays(localeSorted, format, index) { 10993 return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); 10994 } 10995 10996 function listWeekdaysShort(localeSorted, format, index) { 10997 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); 10998 } 10999 11000 function listWeekdaysMin(localeSorted, format, index) { 11001 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); 11002 } 11003 11004 getSetGlobalLocale('en', { 11005 eras: [ 11006 { 11007 since: '0001-01-01', 11008 until: +Infinity, 11009 offset: 1, 11010 name: 'Anno Domini', 11011 narrow: 'AD', 11012 abbr: 'AD', 11013 }, 11014 { 11015 since: '0000-12-31', 11016 until: -Infinity, 11017 offset: 1, 11018 name: 'Before Christ', 11019 narrow: 'BC', 11020 abbr: 'BC', 11021 }, 11022 ], 11023 dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, 11024 ordinal: function (number) { 11025 var b = number % 10, 11026 output = 11027 toInt((number % 100) / 10) === 1 11028 ? 'th' 11029 : b === 1 11030
vendor: 8,612 bytes, lines 11030-11304
11030 ? 'st' 11031 : b === 2 11032 ? 'nd' 11033 : b === 3 11034 ? 'rd' 11035 : 'th'; 11036 return number + output; 11037 }, 11038 }); 11039 11040 // Side effect imports 11041 11042 hooks.lang = deprecate( 11043 'moment.lang is deprecated. Use moment.locale instead.', 11044 getSetGlobalLocale 11045 ); 11046 hooks.langData = deprecate( 11047 'moment.langData is deprecated. Use moment.localeData instead.', 11048 getLocale 11049 ); 11050 11051 var mathAbs = Math.abs; 11052 11053 function abs() { 11054 var data = this._data; 11055 11056 this._milliseconds = mathAbs(this._milliseconds); 11057 this._days = mathAbs(this._days); 11058 this._months = mathAbs(this._months); 11059 11060 data.milliseconds = mathAbs(data.milliseconds); 11061 data.seconds = mathAbs(data.seconds); 11062 data.minutes = mathAbs(data.minutes); 11063 data.hours = mathAbs(data.hours); 11064 data.months = mathAbs(data.months); 11065 data.years = mathAbs(data.years); 11066 11067 return this; 11068 } 11069 11070 function addSubtract$1(duration, input, value, direction) { 11071 var other = createDuration(input, value); 11072 11073 duration._milliseconds += direction * other._milliseconds; 11074 duration._days += direction * other._days; 11075 duration._months += direction * other._months; 11076 11077 return duration._bubble(); 11078 } 11079 11080 // supports only 2.0-style add(1, 's') or add(duration) 11081 function add$1(input, value) { 11082 return addSubtract$1(this, input, value, 1); 11083 } 11084 11085 // supports only 2.0-style subtract(1, 's') or subtract(duration) 11086 function subtract$1(input, value) { 11087 return addSubtract$1(this, input, value, -1); 11088 } 11089 11090 function absCeil(number) { 11091 if (number < 0) { 11092 return Math.floor(number); 11093 } else { 11094 return Math.ceil(number); 11095 } 11096 } 11097 11098 function bubble() { 11099 var milliseconds = this._milliseconds, 11100 days = this._days, 11101 months = this._months, 11102 data = this._data, 11103 seconds, 11104 minutes, 11105 hours, 11106 years, 11107 monthsFromDays; 11108 11109 // if we have a mix of positive and negative values, bubble down first 11110 // check: https://github.com/moment/moment/issues/2166 11111 if ( 11112 !( 11113 (milliseconds >= 0 && days >= 0 && months >= 0) || 11114 (milliseconds <= 0 && days <= 0 && months <= 0) 11115 ) 11116 ) { 11117 milliseconds += absCeil(monthsToDays(months) + days) * 864e5; 11118 days = 0; 11119 months = 0; 11120 } 11121 11122 // The following code bubbles up values, see the tests for 11123 // examples of what that means. 11124 data.milliseconds = milliseconds % 1000; 11125 11126 seconds = absFloor(milliseconds / 1000); 11127 data.seconds = seconds % 60; 11128 11129 minutes = absFloor(seconds / 60); 11130 data.minutes = minutes % 60; 11131 11132 hours = absFloor(minutes / 60); 11133 data.hours = hours % 24; 11134 11135 days += absFloor(hours / 24); 11136 11137 // convert days to months 11138 monthsFromDays = absFloor(daysToMonths(days)); 11139 months += monthsFromDays; 11140 days -= absCeil(monthsToDays(monthsFromDays)); 11141 11142 // 12 months -> 1 year 11143 years = absFloor(months / 12); 11144 months %= 12; 11145 11146 data.days = days; 11147 data.months = months; 11148 data.years = years; 11149 11150 return this; 11151 } 11152 11153 function daysToMonths(days) { 11154 // 400 years have 146097 days (taking into account leap year rules) 11155 // 400 years have 12 months === 4800 11156 return (days * 4800) / 146097; 11157 } 11158 11159 function monthsToDays(months) { 11160 // the reverse of daysToMonths 11161 return (months * 146097) / 4800; 11162 } 11163 11164 function as(units) { 11165 if (!this.isValid()) { 11166 return NaN; 11167 } 11168 var days, 11169 months, 11170 milliseconds = this._milliseconds; 11171 11172 units = normalizeUnits(units); 11173 11174 if (units === 'month' || units === 'quarter' || units === 'year') { 11175 days = this._days + milliseconds / 864e5; 11176 months = this._months + daysToMonths(days); 11177 switch (units) { 11178 case 'month': 11179 return months; 11180 case 'quarter': 11181 return months / 3; 11182 case 'year': 11183 return months / 12; 11184 } 11185 } else { 11186 // handle milliseconds separately because of floating point math errors (issue #1867) 11187 days = this._days + Math.round(monthsToDays(this._months)); 11188 switch (units) { 11189 case 'week': 11190 return days / 7 + milliseconds / 6048e5; 11191 case 'day': 11192 return days + milliseconds / 864e5; 11193 case 'hour': 11194 return days * 24 + milliseconds / 36e5; 11195 case 'minute': 11196 return days * 1440 + milliseconds / 6e4; 11197 case 'second': 11198 return days * 86400 + milliseconds / 1000; 11199 // Math.floor prevents floating point math errors here 11200 case 'millisecond': 11201 return Math.floor(days * 864e5) + milliseconds; 11202 default: 11203 throw new Error('Unknown unit ' + units); 11204 } 11205 } 11206 } 11207 11208 function makeAs(alias) { 11209 return function () { 11210 return this.as(alias); 11211 }; 11212 } 11213 11214 var asMilliseconds = makeAs('ms'), 11215 asSeconds = makeAs('s'), 11216 asMinutes = makeAs('m'), 11217 asHours = makeAs('h'), 11218 asDays = makeAs('d'), 11219 asWeeks = makeAs('w'), 11220 asMonths = makeAs('M'), 11221 asQuarters = makeAs('Q'), 11222 asYears = makeAs('y'), 11223 valueOf$1 = asMilliseconds; 11224 11225 function clone$1() { 11226 return createDuration(this); 11227 } 11228 11229 function get$2(units) { 11230 units = normalizeUnits(units); 11231 return this.isValid() ? this[units + 's']() : NaN; 11232 } 11233 11234 function makeGetter(name) { 11235 return function () { 11236 return this.isValid() ? this._data[name] : NaN; 11237 }; 11238 } 11239 11240 var milliseconds = makeGetter('milliseconds'), 11241 seconds = makeGetter('seconds'), 11242 minutes = makeGetter('minutes'), 11243 hours = makeGetter('hours'), 11244 days = makeGetter('days'), 11245 months = makeGetter('months'), 11246 years = makeGetter('years'); 11247 11248 function weeks() { 11249 return absFloor(this.days() / 7); 11250 } 11251 11252 var round = Math.round, 11253 thresholds = { 11254 ss: 44, // a few seconds to seconds 11255 s: 45, // seconds to minute 11256 m: 45, // minutes to hour 11257 h: 22, // hours to day 11258 d: 26, // days to month/week 11259 w: null, // weeks to month 11260 M: 11, // months to year 11261 }; 11262 11263 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize 11264 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { 11265 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); 11266 } 11267 11268 function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { 11269 var duration = createDuration(posNegDuration).abs(), 11270 seconds = round(duration.as('s')), 11271 minutes = round(duration.as('m')), 11272 hours = round(duration.as('h')), 11273 days = round(duration.as('d')), 11274 months = round(duration.as('M')), 11275 weeks = round(duration.as('w')), 11276 years = round(duration.as('y')), 11277 a = 11278 (seconds <= thresholds.ss && ['s', seconds]) || 11279 (seconds < thresholds.s && ['ss', seconds]) || 11280 (minutes <= 1 && ['m']) || 11281 (minutes < thresholds.m && ['mm', minutes]) || 11282 (hours <= 1 && ['h']) || 11283 (hours < thresholds.h && ['hh', hours]) || 11284 (days <= 1 && ['d']) || 11285 (days < thresholds.d && ['dd', days]); 11286 11287 if (thresholds.w != null) { 11288 a = 11289 a || 11290 (weeks <= 1 && ['w']) || 11291 (weeks < thresholds.w && ['ww', weeks]); 11292 } 11293 a = a || 11294 (months <= 1 && ['M']) || 11295 (months < thresholds.M && ['MM', months]) || 11296 (years <= 1 && ['y']) || ['yy', years]; 11297 11298 a[2] = withoutSuffix; 11299 a[3] = +posNegDuration > 0; 11300 a[4] = locale; 11301 return substituteTimeAgo.apply(null, a); 11302 } 11303 11304 // This function allows you to set the rounding function for relative time strings
vendor: 8,967 bytes, lines 11305-11563
11305 function getSetRelativeTimeRounding(roundingFunction) { 11306 if (roundingFunction === undefined) { 11307 return round; 11308 } 11309 if (typeof roundingFunction === 'function') { 11310 round = roundingFunction; 11311 return true; 11312 } 11313 return false; 11314 } 11315 11316 // This function allows you to set a threshold for relative time strings 11317 function getSetRelativeTimeThreshold(threshold, limit) { 11318 if (thresholds[threshold] === undefined) { 11319 return false; 11320 } 11321 if (limit === undefined) { 11322 return thresholds[threshold]; 11323 } 11324 thresholds[threshold] = limit; 11325 if (threshold === 's') { 11326 thresholds.ss = limit - 1; 11327 } 11328 return true; 11329 } 11330 11331 function humanize(argWithSuffix, argThresholds) { 11332 if (!this.isValid()) { 11333 return this.localeData().invalidDate(); 11334 } 11335 11336 var withSuffix = false, 11337 th = thresholds, 11338 locale, 11339 output; 11340 11341 if (typeof argWithSuffix === 'object') { 11342 argThresholds = argWithSuffix; 11343 argWithSuffix = false; 11344 } 11345 if (typeof argWithSuffix === 'boolean') { 11346 withSuffix = argWithSuffix; 11347 } 11348 if (typeof argThresholds === 'object') { 11349 th = Object.assign({}, thresholds, argThresholds); 11350 if (argThresholds.s != null && argThresholds.ss == null) { 11351 th.ss = argThresholds.s - 1; 11352 } 11353 } 11354 11355 locale = this.localeData(); 11356 output = relativeTime$1(this, !withSuffix, th, locale); 11357 11358 if (withSuffix) { 11359 output = locale.pastFuture(+this, output); 11360 } 11361 11362 return locale.postformat(output); 11363 } 11364 11365 var abs$1 = Math.abs; 11366 11367 function sign(x) { 11368 return (x > 0) - (x < 0) || +x; 11369 } 11370 11371 function toISOString$1() { 11372 // for ISO strings we do not use the normal bubbling rules: 11373 // * milliseconds bubble up until they become hours 11374 // * days do not bubble at all 11375 // * months bubble up until they become years 11376 // This is because there is no context-free conversion between hours and days 11377 // (think of clock changes) 11378 // and also not between days and months (28-31 days per month) 11379 if (!this.isValid()) { 11380 return this.localeData().invalidDate(); 11381 } 11382 11383 var seconds = abs$1(this._milliseconds) / 1000, 11384 days = abs$1(this._days), 11385 months = abs$1(this._months), 11386 minutes, 11387 hours, 11388 years, 11389 s, 11390 total = this.asSeconds(), 11391 totalSign, 11392 ymSign, 11393 daysSign, 11394 hmsSign; 11395 11396 if (!total) { 11397 // this is the same as C#'s (Noda) and python (isodate)... 11398 // but not other JS (goog.date) 11399 return 'P0D'; 11400 } 11401 11402 // 3600 seconds -> 60 minutes -> 1 hour 11403 minutes = absFloor(seconds / 60); 11404 hours = absFloor(minutes / 60); 11405 seconds %= 60; 11406 minutes %= 60; 11407 11408 // 12 months -> 1 year 11409 years = absFloor(months / 12); 11410 months %= 12; 11411 11412 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js 11413 s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; 11414 11415 totalSign = total < 0 ? '-' : ''; 11416 ymSign = sign(this._months) !== sign(total) ? '-' : ''; 11417 daysSign = sign(this._days) !== sign(total) ? '-' : ''; 11418 hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; 11419 11420 return ( 11421 totalSign + 11422 'P' + 11423 (years ? ymSign + years + 'Y' : '') + 11424 (months ? ymSign + months + 'M' : '') + 11425 (days ? daysSign + days + 'D' : '') + 11426 (hours || minutes || seconds ? 'T' : '') + 11427 (hours ? hmsSign + hours + 'H' : '') + 11428 (minutes ? hmsSign + minutes + 'M' : '') + 11429 (seconds ? hmsSign + s + 'S' : '') 11430 ); 11431 } 11432 11433 var proto$2 = Duration.prototype; 11434 11435 proto$2.isValid = isValid$1; 11436 proto$2.abs = abs; 11437 proto$2.add = add$1; 11438 proto$2.subtract = subtract$1; 11439 proto$2.as = as; 11440 proto$2.asMilliseconds = asMilliseconds; 11441 proto$2.asSeconds = asSeconds; 11442 proto$2.asMinutes = asMinutes; 11443 proto$2.asHours = asHours; 11444 proto$2.asDays = asDays; 11445 proto$2.asWeeks = asWeeks; 11446 proto$2.asMonths = asMonths; 11447 proto$2.asQuarters = asQuarters; 11448 proto$2.asYears = asYears; 11449 proto$2.valueOf = valueOf$1; 11450 proto$2._bubble = bubble; 11451 proto$2.clone = clone$1; 11452 proto$2.get = get$2; 11453 proto$2.milliseconds = milliseconds; 11454 proto$2.seconds = seconds; 11455 proto$2.minutes = minutes; 11456 proto$2.hours = hours; 11457 proto$2.days = days; 11458 proto$2.weeks = weeks; 11459 proto$2.months = months; 11460 proto$2.years = years; 11461 proto$2.humanize = humanize; 11462 proto$2.toISOString = toISOString$1; 11463 proto$2.toString = toISOString$1; 11464 proto$2.toJSON = toISOString$1; 11465 proto$2.locale = locale; 11466 proto$2.localeData = localeData; 11467 11468 proto$2.toIsoString = deprecate( 11469 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', 11470 toISOString$1 11471 ); 11472 proto$2.lang = lang; 11473 11474 // FORMATTING 11475 11476 addFormatToken('X', 0, 0, 'unix'); 11477 addFormatToken('x', 0, 0, 'valueOf'); 11478 11479 // PARSING 11480 11481 addRegexToken('x', matchSigned); 11482 addRegexToken('X', matchTimestamp); 11483 addParseToken('X', function (input, array, config) { 11484 config._d = new Date(parseFloat(input) * 1000); 11485 }); 11486 addParseToken('x', function (input, array, config) { 11487 config._d = new Date(toInt(input)); 11488 }); 11489 11490 //! moment.js 11491 11492 hooks.version = '2.30.1'; 11493 11494 setHookCallback(createLocal); 11495 11496 hooks.fn = proto; 11497 hooks.min = min; 11498 hooks.max = max; 11499 hooks.now = now; 11500 hooks.utc = createUTC; 11501 hooks.unix = createUnix; 11502 hooks.months = listMonths; 11503 hooks.isDate = isDate; 11504 hooks.locale = getSetGlobalLocale; 11505 hooks.invalid = createInvalid; 11506 hooks.duration = createDuration; 11507 hooks.isMoment = isMoment; 11508 hooks.weekdays = listWeekdays; 11509 hooks.parseZone = createInZone; 11510 hooks.localeData = getLocale; 11511 hooks.isDuration = isDuration; 11512 hooks.monthsShort = listMonthsShort; 11513 hooks.weekdaysMin = listWeekdaysMin; 11514 hooks.defineLocale = defineLocale; 11515 hooks.updateLocale = updateLocale; 11516 hooks.locales = listLocales; 11517 hooks.weekdaysShort = listWeekdaysShort; 11518 hooks.normalizeUnits = normalizeUnits; 11519 hooks.relativeTimeRounding = getSetRelativeTimeRounding; 11520 hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; 11521 hooks.calendarFormat = getCalendarFormat; 11522 hooks.prototype = proto; 11523 11524 // currently HTML5 input type only supports 24-hour formats 11525 hooks.HTML5_FMT = { 11526 DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" /> 11527 DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" /> 11528 DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" /> 11529 DATE: 'YYYY-MM-DD', // <input type="date" /> 11530 TIME: 'HH:mm', // <input type="time" /> 11531 TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" /> 11532 TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" /> 11533 WEEK: 'GGGG-[W]WW', // <input type="week" /> 11534 MONTH: 'YYYY-MM', // <input type="month" /> 11535 }; 11536 11537 return hooks; 11538 11539}))); 11540 11541}); 11542$_mod.def("/panel-adsempiredirect$1.0.0/views/types/Base", function(require, exports, module, __filename, __dirname) { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 11543 11544var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 11545 11546function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11547 11548var moment = require('/moment$2.30.1/moment'/*"moment"*/); 11549 11550var Base = function () { 11551 function Base() { 11552 _classCallCheck(this, Base); 11553 11554 this.name = ""; 11555 this.shortName = ""; 11556 this.navigationItems = []; 11557 this.systemNavigationItems = []; 11558 this.logo = ""; 11559 this.colors = { 11560 fill: "#1E88E5", 11561 limitExceeded: "#FF9800", 11562 domainChange: "#F11925", 11563 leads: {
11564 pointBackgroundColor: "rgba(240, 79, 35, 1)", 11565 borderColor: "rgba(240, 79, 35, 1)", 11566 borderWidth: 3 11567 }, 11568 visits: { 11569 pointBackgroundColor: "rgba(72, 103, 170, 1)", 11570 borderColor: "rgba(72, 103, 170, 1)", 11571 borderWidth: 3 11572 } 11573 }; 11574 this.paymentHelperText = ""; 11575 this.dashboardFields = []; 11576 this.additionalFields = []; 11577 this.offerwallTitle = "Our Offers"; 11578 this.faq = []; 11579 this.reportTitle = "Report"; 11580 this.transactionFields = []; 11581 this.transactionColumns = []; 11582 this.payoutPageTitle = "Payout history"; 11583 this.pagesTitle = { 11584 report: "Report", 11585 transactionReport: "Transaction report" 11586 }; 11587 } 11588 11589 _createClass(Base, [{ 11590 key: "getPageTitle", 11591 value: function getPageTitle(route) { 11592 return this.pagesTitle[route]; 11593 } 11594 }, { 11595 key: "getPayoutPageTitle", 11596 value: function getPayoutPageTitle() { 11597 return this.payoutPageTitle; 11598 } 11599 }, { 11600 key: "getTransactionColumns", 11601 value: function getTransactionColumns() { 11602 return this.transactionColumns; 11603 } 11604 }, { 11605 key: "getTransactionFields", 11606 value: function getTransactionFields() { 11607 return this.transactionFields; 11608 } 11609 }, { 11610 key: "getReportTitle", 11611 value: function getReportTitle() { 11612 return this.pagesTitle.report; 11613 } 11614 }, { 11615 key: "getShortName", 11616 value: function getShortName() { 11617 return this.shortName; 11618 } 11619 }, { 11620 key: "getLogo", 11621 value: function getLogo() { 11622 return this.logo; 11623 } 11624 }, { 11625 key: "getNavigationItems", 11626 value: function getNavigationItems() { 11627 return this.navigationItems; 11628 } 11629 }, { 11630 key: "getSystemNavigationItems", 11631 value: function getSystemNavigationItems() { 11632 return this.systemNavigationItems; 11633 } 11634 }, { 11635 key: "getAllNavigationItems", 11636 value: function getAllNavigationItems() { 11637 return { 11638 system: this.systemNavigationItems, 11639 navigation: this.navigationItems 11640 }; 11641 } 11642 }, { 11643 key: "getColor", 11644 value: function getColor(type) { 11645 return this.colors[type]; 11646 } 11647 }, { 11648 key: "getPaymentHelperText", 11649 value: function getPaymentHelperText() { 11650 return this.paymentHelperText; 11651 } 11652 }, { 11653 key: "getDashboardFields", 11654 value: function getDashboardFields() { 11655 return this.dashboardFields; 11656 } 11657 }, { 11658 key: "getColorsLeads", 11659 value: function getColorsLeads() { 11660 return this.colors.leads; 11661 } 11662 }, { 11663 key: "getColorsVisits", 11664 value: function getColorsVisits() { 11665 return this.colors.visits; 11666 } 11667 }, { 11668 key: "getChartData", 11669 value: function getChartData(tableData) { 11670 return { 11671 data: { 11672 datasets: [_extends({ 11673 label: "Clicks", 11674 data: tableData.map(function (item) { 11675 return { 11676 x: moment(item.date, "YYYY-MM-DD").format("DD.MM.YY"), 11677 y: item.clicks 11678 }; 11679 }), 11680 pointStyle: "circle" 11681 }, this.getColorsVisits()), _extends({ 11682 label: "Leads", 11683 data: tableData.map(function (item) { 11684 return { 11685 x: moment(item.date, "YYYY-MM-DD").format("DD.MM.YY"), 11686 y: item.leads 11687 }; 11688 }), 11689 pointStyle: "circle" 11690 }, this.getColorsLeads())] 11691 } 11692 }; 11693 } 11694 }, { 11695 key: "getOfferWallTitle", 11696 value: function getOfferWallTitle() { 11697 return this.offerwallTitle; 11698 } 11699 }, { 11700 key: "getFaqText", 11701 value: function getFaqText() { 11702 return this.faq; 11703 } 11704 }]); 11705 11706 return Base; 11707}(); 11708 11709module.exports = Base; 11710}); 11711$_mod.def("/panel-adsempiredirect$1.0.0/views/types/Direct", function(require, exports, module, __filename, __dirname) { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 11712 11713var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 11714 11715function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11716 11717function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } 11718 11719function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { c
11719onstructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 11720 11721var Base = require('/panel-adsempiredirect$1.0.0/views/types/Base'/*"./Base"*/); 11722var moment = require('/moment$2.30.1/moment'/*"moment"*/); 11723 11724var Direct = function (_Base) { 11725 _inherits(Direct, _Base); 11726 11727 function Direct() { 11728 _classCallCheck(this, Direct); 11729 11730 var _this = _possibleConstructorReturn(this, (Direct.__proto__ || Object.getPrototypeOf(Direct)).call(this)); 11731 11732 _this.name = "Direct"; 11733 _this.shortName = "dr"; 11734 _this.navigationItems = [{ 11735 icon: "dashboard", 11736 name: "Dashboard", 11737 href: "/affiliate/dashboard", 11738 route: "dashboard", 11739 submenu: [] 11740 }, { 11741 icon: "offer", 11742 name: "Offerwall", 11743 href: "/affiliate/offerwall", 11744 route: "offerwall", 11745 submenu: [] 11746 }, { 11747 icon: "postback", 11748 name: "Postback URLs", 11749 href: "/affiliate/postback", 11750 route: "postbacks", 11751 submenu: [] 11752 }, { 11753 icon: "card", 11754 name: "Payout History", 11755 route: "payoutHistory", 11756 href: "/affiliate/payoutHistory", 11757 submenu: [] 11758 }, { 11759 icon: "report", 11760 name: "Reports", 11761 href: "/affiliate/report", 11762 route: "report", 11763 submenu: [{ 11764 name: "Main Report", 11765 route: "report", 11766 href: "/affiliate/report" 11767 }, { 11768 name: "Transaction Report", 11769 route: "transactionReport", 11770 href: "/affiliate/report/transactions" 11771 }] 11772 }, { 11773 icon: "faq", 11774 name: "Help Center", 11775 submenu: [{ 11776 name: "FAQ", 11777 route: "faq", 11778 href: "/affiliate/faq" 11779 }] 11780 }]; 11781 _this.systemNavigationItems = [{ 11782 icon: "profile", 11783 name: "My Account", 11784 href: "/affiliate/profile", 11785 route: "profile" 11786 }, {
11787 icon: "logout", 11788 name: "Logout", 11789 iconFill: "#ccc", 11790 href: "/logout" 11791 }]; 11792 _this.logo = "/new/img/affiliateUI/Adsempire_Logo_Invert.svg"; 11793 _this.colors = { 11794 fill: "#FF9000", 11795 limitExceeded: "#366DC0", 11796 domainChange: "#F11925", 11797 leads: { 11798 pointBackgroundColor: "#FF9000", 11799 borderColor: "#FF9000", 11800 borderWidth: 3 11801 }, 11802 visits: { 11803 pointBackgroundColor: "#366DC0", 11804 borderColor: "#366DC0", 11805 borderWidth: 3 11806 } 11807 }; 11808 _this.paymentHelperText = "Please modify your personal details, choose payout method and provide your payment details below. Please make sure you provide accurate payment details. Commission payments will be made NET-15 if you reach minimum amount of $500 (except bank transfer, which is $3000)"; 11809 _this.dashboardFields = [{ label: "Date", name: "date" }, { label: "Clicks", name: "clicks" }, { label: "Registrations", name: "cpa_registrations" }, { label: "Confirms", name: "cpa_confirms" }, { label: "Installs", name: "cpa_installs" }, { label: "Sales", name: "cpa_payments" }, { label: "Click2Reg", name: "click2reg" }, { label: "Reg2Conf", name: "reg2conf" }, { label: "Reg2Sale", name: "reg2sale" }, { label: "EPC", name: "epc" }, { label: "Revenue", name: "revenue" }]; 11810 _this.offerwallTitle = "Offerwall"; 11811 _this.faq = [{ 11812 id: 1, 11813 header: "What is AdsEmpire?", 11814 body: "\n AdsEmpire is a fast-growing affiliate network which provides plenty of profitable opportunities with many verticals for affiliates and advertisers.\n We have the best technologies to help you monetize 100% of your traffic in any convenient way, via direct CPA offers or Smartlink. \n ", 11815 keywords: ["network", "direct", "smartlink"] 11816 }, { 11817 id: 2, 11818 header: "What are the main AdsEmpire verticals?", 11819 body: "\n We have a wide range of profitable verticals, such as dating, games, crypto, and sweepstakes.\n ", 11820 keywords: ["vertical", "dating", "games", "crypto", "sweepstakes"] 11821 }, { 11822 id: 3, 11823 header: "What traffic types does AdsEmpire accept?", 11824 body: "\n We allow all kinds of legal traffic that doesn\u2019t violate the corporate rules and policies of our advertisers. \n We don\u2019t accept any kind of fraudulent traffic, chat traffic, or incentive traffic. Please note that such traffic sources as Email, SMS, Celebrity, Clickunder, or Popunders traffic are restricted by some advertisers. \n You must notify your account manager about such traffic beforehand, otherwise we reserve the right to withhold part or the entire sum of your traffic value. \n There might also be some other general traffic restrictions for exact offers, so please read the description of each specific offer.\n ", 11825 keywords: ["traffic", "incentive", "chat", "fraudulent"] 11826 }, { 11827 id: 4, 11828 header: "What GEOs does AdsEmpire accept?", 11829 body: "\n We accept traffic from all over the world.\n ", 11830 keywords: ["geo", "country"] 11831 }, { 11832 id: 5, 11833 header: "What is the best targeting option for me?", 11834 body: "\n Targeting options depend on the advertiser\u2019s requirements for each offer and traffic source. You can ask your manager for the best targeting recommendation for specific offers.\n ", 11835 keywords: ["targeting"] 11836 }, { 11837 id: 6, 11838 header: "How can l join AdsEmpire?", 11839 body: "\n You can sign up as a CPA network affiliate <a href=\"https://adsempire.com/signup-direct.html\"> here </a>.\n You can sign up as a Smartlink affiliate <a href=\"https://adsempire.com/signup-smartlink.html\"> here </a>.\n You can sign up as an advertiser <a href=\"https://adsempire.com/signup-adv.html\"> here </a>.\n ", 11840 keywords: ["join", "register"] 11841 }, { 11842 id: 7, 11843 header: "How long will it take for my application to be approved?", 11844 body: "\n We typically need <strong>48</strong> hours to review an application.\n ", 11845 keywords: ["application", "registration", "approve"] 11846 }, {
11847 id: 8, 11848 header: "How can l contact your support?", 11849 body: "\n You can contact our Support Team using the form <a href=\"https://adsempire.com\">here</a>.", 11850 keywords: ["contact", "support"] 11851 }, { 11852 id: 9, 11853 header: "What are the payment terms?", 11854 body: "\n Payment terms are monthly net30, but you can get upgraded to weekly payments if your weekly traffic volumes exceed $1,500.\n ", 11855 keywords: ["payment", "payout"] 11856 }, { 11857 id: 10, 11858 header: "What payment options do you have?", 11859 body: "\n You can get paid via Bitcoin, USDT, Wire, Paxum, PayPal payment systems.\n ", 11860 keywords: ["payment", "wire", "paxum", "bitcoin", "usdt", "paypal"] 11861 }, { 11862 id: 11, 11863 header: "What is the threshold for monthly and weekly payments?", 11864 body: "\n The threshold for weekly payments is $1,500 for Bitcoin, USDT.\n\n $2,000 for Wire, Paxum, PayPal payment methods.\n\n The threshold for monthly payments is $250 for Bitcoin, USDT.\n\n $2,000 for Wire, Paxum, PayPal payment methods.\n ", 11865 keywords: ["threshold", "weekly", "monthly"] 11866 }, { 11867 id: 12, 11868 header: "How do I set up S2S postback??", 11869 body: "\n You can set up your postback in the \u2018Postback URLs\u2019 section of your account. \n ", 11870 keywords: ["s2s", "postback", "tracking"] 11871 }, { 11872 id: 13, 11873 header: "What does âDeclinedâ status mean? ", 11874 body: "\n Your leads may be declined for several reasons, a list of which you can find in the \u2018Transaction Report\u2019 section. To receive further information, please contact your personal affiliate manager.\n ", 11875 keywords: ["decline", "report", "conversion"] 11876 }, { 11877 id: 14, 11878 header: "How often is statistics data updated?", 11879 body: "\n All statistics are updated every 15 minutes in the \u2018Reports\u2019 section of your account.\n ", 11880 keywords: ["statistics", "update", "data"] 11881 }]; 11882 _this.reportTitle = "Main Report"; 11883 _this.transactionFields = [{ 11884 label: "Date", 11885 name: "date" 11886 }, { 11887 label: "Conversion Time", 11888 name: "time" 11889 }, {
11890 label: "Type", 11891 name: "type" 11892 }, { 11893 label: "Commission", 11894 name: "payout", 11895 type: "Transform", 11896 appliedFunction: function appliedFunction(data) { 11897 return "$ " + parseFloat(data).toFixed(2); 11898 } 11899 }, { 11900 label: "CPA-offer", 11901 name: "cpaOffer" 11902 }, { 11903 label: "Country", 11904 name: "country" 11905 }, { 11906 label: "Platform", 11907 name: "platform" 11908 }, { 11909 label: "Status", 11910 name: "is_declined", 11911 type: "Transform", 11912 appliedFunction: function appliedFunction(data) { 11913 return data === false ? "Approved" : "Declined"; 11914 } 11915 }, { 11916 label: "Decline reason", 11917 name: "declineReason" 11918 }, { 11919 label: "subid", 11920 name: "utmContent" 11921 }, { 11922 label: "clickid", 11923 name: "data2" 11924 }]; 11925 _this.transactionColumns = [{ 11926 name: "s3", 11927 label: "subid2" 11928 }, { 11929 name: "tds_cid", 11930 label: "tds_cid" 11931 }, { 11932 name: "site", 11933 label: "Site" 11934 }, { 11935 name: "landing", 11936 label: "Landing" 11937 }, { 11938 name: "gender", 11939 label: "Gender" 11940 }, { 11941 name: "ip", 11942 label: "IP" 11943 }, { 11944 name: "age", 11945 label: "Age" 11946 }, {
11947 name: "emailDomain", 11948 label: "Email domain" 11949 }, { 11950 name: "deviceType", 11951 label: "Device type" 11952 }, { 11953 name: "deviceBrand", 11954 label: "Device brand" 11955 }, { 11956 name: "deviceOs", 11957 label: "Device OS" 11958 }, { 11959 name: "browser", 11960 label: "Browser" 11961 }, { 11962 name: "fraudScore", 11963 label: "Fraud Score" 11964 }, { 11965 name: "connectionType", 11966 label: "Connection Type" 11967 }, { 11968 name: "pixel", 11969 label: "Pixel", 11970 type: "Transform", 11971 appliedFunction: function appliedFunction(data) { 11972 return data === 0 ? "No" : "Yes"; 11973 } 11974 }]; 11975 _this.pagesTitle = { 11976 report: "Main Report", 11977 transactionReport: "Transaction report" 11978 }; 11979 return _this; 11980 } 11981 11982 _createClass(Direct, [{ 11983 key: "getDashboardFields", 11984 value: function getDashboardFields(allowAddition) { 11985 var result = this.dashboardFields; 11986 11987 if (allowAddition === true) { 11988 result.splice(9, 0, { label: "Additional revenue", name: "additional_revenue", width: "10px" }); 11989 result.splice(12, 0, { label: "Total revenue", name: "total_revenue" }); 11990 } 11991 11992 return result; 11993 } 11994 }, { 11995 key: "getChartData", 11996 value: function getChartData(tableData) { 11997 return { 11998 data: { 11999 datasets: [_extends({ 12000 label: "Clicks", 12001 data: tableData.map(function (item) { 12002 return { 12003 x: moment(item.date, "YYYY-MM-DD").format("DD.MM.YY"), 12004 y: item.clicks 12005 }; 12006 }), 12007 pointStyle: "circle" 12008 }, this.getColorsVisits()), _extends({ 12009 label: "Leads", 12010 data: tableData.map(function (item) { 12011 return { 12012 x: moment(item.date, "YYYY-MM-DD").format("DD.MM.YY"), 12013 y: item.leads 12014 }; 12015 }), 12016 pointStyle: "circle" 12017 }, this.getColorsLeads())] 12018 } 12019 }; 12020 } 12021 }]); 12022 12023 return Direct; 12024}(Base); 12025 12026module.exports = Direct; 12027}); 12028$_mod.def("/panel-adsempiredirect$1.0.0/views/types/components/drScores.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 12029"use strict"; 12030 12031var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12032 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12033 marko_registerComponent = components_helpers.rc, 12034 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/types/components/drScores.marko", function () { 12035 return module.exports; 12036}), 12037 marko_renderer = components_helpers.r, 12038 marko_defineComponent = components_helpers.c, 12039 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12040 marko_classAttr = marko_helpers.ca, 12041 marko_createElement = marko_helpers.e, 12042 marko_const = marko_helpers.const, 12043 marko_const_nextId = marko_const("a854df"), 12044 marko_node0 = marko_createElement("DIV", { 12045 "class": "main-scores-tile--text system--display--flex system--flexbox--align-items-center wallet" 12046}, "1", null, 2, 0, { 12047 i: marko_const_nextId() 12048}).e("I", { 12049 "class": "fas fa-wallet" 12050}, null, null, 0).e("DIV", null, null, null, 1).t("Outstanding balance"), 12051 marko_attrs0 = { 12052 "class": "main-scores-tile--number" 12053}; 12054 12055function render(input, out, __component, component, state) { 12056 var data = input; 12057 12058 out.e("DIV", { 12059 "class": marko_classAttr(["main-scores--tile", "system--display--flex", "system--flexbox--justify-space-between", "main-scores--tile--highlight", "system--flexbox--align-items-center", "wallet"]) 12060 }, "0", component, 2, 4).n(marko_node0, component).e("DIV", marko_attrs0, "4", component, 1).t(input.values.outBalance); 12061} 12062 12063marko_template._ = marko_renderer(render, { 12064 am_: true, 12065 _l_: marko_componentType 12066}); 12067 12068marko_template.Component = marko_defineComponent({}, marko_template._); 12069}); 12070$_mod.main("/panel-adsempiredirect$1.0.0/views/components/recaptcha-google", "index.marko"); 12071$_mod.def("/panel-adsempiredirect$1.0.0/views/components/recaptcha-google/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
12071[email protected] - DO NOT EDIT 12072"use strict"; 12073 12074var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12075 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12076 marko_registerComponent = components_helpers.rc, 12077 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/recaptcha-google/index.marko", function () { 12078 return module.exports; 12079}), 12080 marko_renderer = components_helpers.r, 12081 marko_defineComponent = components_helpers.c, 12082 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12083 marko_createElement = marko_helpers.e, 12084 marko_const = marko_helpers.const, 12085 marko_const_nextId = marko_const("94a9aa"), 12086 marko_node0 = marko_createElement("INPUT", { 12087 type: "hidden", 12088 name: "g-recaptcha-response", 12089 "class": "recaptcha-response system--margin-top--20px" 12090}, "0", null, 0, 0, { 12091 i: marko_const_nextId() 12092}); 12093 12094function render(input, out, __component, component, state) { 12095 var data = input; 12096 12097 out.n(marko_node0, component); 12098} 12099 12100marko_template._ = marko_renderer(render, { 12101 am_: true, 12102 _l_: marko_componentType 12103}); 12104 12105marko_template.Component = marko_defineComponent({}, marko_template._); 12106}); 12107$_mod.def("/panel-adsempiredirect$1.0.0/views/types/components/defaultLogin.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 12108"use strict"; 12109 12110var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12111 marko_component = { 12112 showRestore: function showRestore() { 12113 this.emit("showRestore"); 12114 }, 12115 change: function change(e, el) { 12116 this.emit("change", { 12117 e: e, 12118 el: el 12119 }); 12120 }, 12121 submit: function submit() { 12122 this.emit("submit"); 12123 }, 12124 inputKeyPressed: function inputKeyPressed(e) { 12125 var enterKeyCode = 13; 12126 12127 if (e.keyCode === enterKeyCode) { 12128 this.submit(); 12129 } 12130 } 12131}, 12132 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12133 marko_registerComponent = components_helpers.rc, 12134 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/types/components/defaultLogin.marko", function () { 12135 return module.exports; 12136}), 12137 marko_renderer = components_helpers.r, 12138 marko_defineComponent = components_helpers.c, 12139 recaptcha_google_template = require('/panel-adsempiredirect$1.0.0/views/components/recaptcha-google/index.marko'/*"../../components/recaptcha-google"*/), 12140 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12141 marko_loadTag = marko_helpers.t, 12142 recaptcha_google_tag = marko_loadTag(recaptcha_google_template), 12143 marko_attrs0 = { 12144 "class": "login-page--login-form login-page--container login-page--main-font login-page--container--animated-fade-in" 12145}, 12146 marko_createElement = marko_helpers.e, 12147 marko_const = marko_helpers.const, 12148 marko_const_nextId = marko_const("0692bb"), 12149 marko_node0 = marko_createElement("DIV", { 12150 "class": "login-page--header" 12151}, "1", null, 1, 0, { 12152 i: marko_const_nextId() 12153}).t("LOG IN"), 12154 marko_node1 = marko_createElement("DIV", { 12155 "class": "login-page--login-problems-text" 12156}, "2", null, 1, 0, { 12157 i: marko_const_nextId() 12158}).t("If you're having trouble logging in to your account, please contact your AM."), 12159 marko_attrs1 = { 12160 "data-test-id": "loginButton", 12161 "class": "login-page--button-submit login-page--vertical-spacer" 12162}, 12163 marko_attrs2 = { 12164 "class": "login-page--vertical-spacer" 12165}, 12166 marko_attrs3 = { 12167 "class": "login-page--link-button" 12168}, 12169 marko_attrs4 = { 12170 "class": "login-page--message-block login-page--message-block--error login-page--vertical-spacer" 12171}, 12172 marko_attrs5 = { 12173 "class": "login-page--message-block login-page--message-block--success login-page--vertical-spacer" 12174}; 12175 12176function render(input, out, __component, component, state) { 12177 var data = input; 12178 12179 out.be("DIV", marko_attrs0, "0", component); 12180 12181 out.n(marko_node0, component); 12182 12183 out.n(marko_node1, component); 12184 12185 out.e("INPUT", { 12186 name: "login", 12187 type: "text", 12188 "data-test-id": "login", 12189 value: input.form.login, 12190 placeholder: "Login", 12191 "class": "login-page--input login-page--vertical-spacer" 12192 }, "3", component, 0, 0, { 12193 oninput: __component.d("input", "change", false), 12194 onkeyup: __component.d("keyup", "inputKeyPressed", false) 12195 }); 12196 12197 out.e("INPUT", { 12198 name: "password", 12199 type: "password", 12200 value: input.form.password, 12201 placeholder: "Password", 12202 "class": "login-page--input login-page--vertical-spacer" 12203 }, "4", component, 0, 0, { 12204 oninput: __component.d("input", "change", false), 12205 onkeyup: __component.d("keyup", "inputKeyPressed", false) 12206 }); 12207 12208 if (input.isShowGoogleRecaptcha) { 12209 recaptcha_google_tag({ 12210 sitekey: input.googleCaptchaClient 12211 }, out, __component, "5"); 12212 } 12213 12214 out.e("BUTTON", marko_attrs1, "6", component, 1, 0, { 12215 onclick: __component.d("click", "submit", false) 12216 }).t("Login"); 12217 12218 out.e("DIV", marko_attrs2, "7", component, 1).e("A", marko_attrs3, "8", component, 1, 0, { 12219 onclick: __component.d("click", "showRestore", false) 12220 }).t("Restore password"); 12221 12222 if (input.errorMessage.length > 0) { 12223 out.e("DIV", marko_attrs4, "9", component, 1).t(input.errorMessage); 12224 } 12225 12226 if (input.successMessage.length > 0) { 12227 out.e("DIV", marko_attrs5, "10", component, 1).t(input.successMessage); 12228 } 12229 12230 out.ee(); 12231} 12232 12233marko_template._ = marko_renderer(render, { 12234 _l_: marko_componentType 12235}
12235, marko_component); 12236 12237marko_template.Component = marko_defineComponent(marko_component, marko_template._); 12238}); 12239$_mod.def("/panel-adsempiredirect$1.0.0/views/types/components/defaultRestore.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 12240"use strict"; 12241 12242var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12243 marko_component = { 12244 showLogin: function showLogin() { 12245 this.emit("showLogin"); 12246 }, 12247 change: function change(e, el) { 12248 this.emit("change", { 12249 e: e, 12250 el: el 12251 }); 12252 }, 12253 submit: function submit() { 12254 this.emit("submitRestore"); 12255 }, 12256 inputKeyPressed: function inputKeyPressed(e) { 12257 var enterKeyCode = 13; 12258 12259 if (e.keyCode === enterKeyCode) { 12260 this.submit(); 12261 } 12262 } 12263}, 12264 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12265 marko_registerComponent = components_helpers.rc, 12266 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/types/components/defaultRestore.marko", function () { 12267 return module.exports; 12268}), 12269 marko_renderer = components_helpers.r, 12270 marko_defineComponent = components_helpers.c, 12271 recaptcha_google_template = require('/panel-adsempiredirect$1.0.0/views/components/recaptcha-google/index.marko'/*"../../components/recaptcha-google"*/), 12272 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12273 marko_loadTag = marko_helpers.t, 12274 recaptcha_google_tag = marko_loadTag(recaptcha_google_template), 12275 marko_attrs0 = { 12276 "class": "login-page--login-form login-page--container login-page--main-font login-page--container--animated-fade-in" 12277}, 12278 marko_createElement = marko_helpers.e, 12279 marko_const = marko_helpers.const, 12280 marko_const_nextId = marko_const("b9ea02"), 12281 marko_node0 = marko_createElement("DIV", { 12282 "class": "login-page--header" 12283}, "1", null, 1, 0, { 12284 i: marko_const_nextId() 12285}).t("Restore Password"), 12286 marko_attrs1 = { 12287 "class": "login-page--button-submit login-page--vertical-spacer" 12288}, 12289 marko_attrs2 = { 12290 "class": "login-page--vertical-spacer" 12291}, 12292 marko_attrs3 = { 12293 "class": "login-page--link-button" 12294}, 12295 marko_attrs4 = { 12296 "class": "login-page--message-block login-page--message-block--error login-page--vertical-spacer" 12297}, 12298 marko_attrs5 = { 12299 "class": "login-page--message-block login-page--message-block--success login-page--vertical-spacer" 12300}; 12301 12302function render(input, out, __component, component, state) { 12303 var data = input; 12304 12305 out.be("DIV", marko_attrs0, "0", component); 12306 12307 out.n(marko_node0, component); 12308 12309 out.e("INPUT", { 12310 name: "email", 12311 type: "text", 12312 value: input.restoreForm.email, 12313 placeholder: "E-mail", 12314 "class": "login-page--input login-page--vertical-spacer" 12315 }, "2", component, 0, 0, { 12316 oninput: __component.d("input", "change", false), 12317 onkeyup: __component.d("keyup", "inputKeyPressed", false) 12318 }); 12319 12320 out.e("BUTTON", marko_attrs1, "3", component, 1, 0, { 12321 onclick: __component.d("click", "submit", false) 12322 }).t("Restore"); 12323 12324 if (input.isShowGoogleRecaptcha) { 12325 recaptcha_google_tag({ 12326 sitekey: input.googleCaptchaClient 12327 }, out, __component, "4"); 12328 } 12329 12330 out.e("DIV", marko_attrs2, "5", component, 1).e("A", marko_attrs3, "6", component, 1, 0, { 12331 onclick: __component.d("click", "showLogin", false) 12332 }).t("Cancel"); 12333 12334 if (input.errorMessage.length > 0) { 12335 out.e("DIV", marko_attrs4, "7", component, 1).t(input.errorMessage); 12336 } 12337 12338 if (input.successMessage.length > 0) { 12339 out.e("DIV", marko_attrs5, "8", component, 1).t(input.successMessage); 12340 } 12341 12342 out.ee(); 12343} 12344 12345marko_template._ = marko_renderer(render, { 12346 _l_: marko_componentType 12347}, marko_component); 12348 12349marko_template.Component = marko_defineComponent(marko_component, marko_template._); 12350}); 12351$_mod.def("/panel-adsempiredirect$1.0.0/views/types/components/offerwallHeaderDr.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 12352"use strict"; 12353 12354var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12355 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12356 marko_classList = marko_helpers.cl, 12357 marko_component = { 12358 onCreate: function onCreate(input) { 12359 this.click = input.props.actions.click; 12360 } 12361}, 12362 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12363 marko_registerComponent = components_helpers.rc, 12364 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/types/components/offerwallHeaderDr.marko", function () { 12365 return module.exports; 12366}), 12367 marko_renderer = components_helpers.r, 12368 marko_defineComponent = components_helpers.c, 12369 marko_classAttr = marko_helpers.ca, 12370 marko_attrs0 = { 12371 colspan: "2" 12372}, 12373 marko_attrs1 = { 12374 style: "cursor: pointer;" 12375}, 12376 marko_attrs2 = { 12377 style: "cursor: pointer;" 12378}, 12379 marko_attrs3 = { 12380 style: "cursor: pointer;" 12381}, 12382 marko_attrs4 = { 12383 style: "cursor: pointer;" 12384}, 12385 marko_attrs5 = { 12386 style: "width: 10%;" 12387}, 12388 marko_attrs6 = { 12389 style: "cursor: pointer;" 12390}, 12391 marko_attrs7 = { 12392 style: "cursor: pointer;" 12393}, 12394 marko_attrs8 = { 12395 style: "cursor: pointer;" 12396}, 12397 marko_createElement = marko_helpers.e, 12398 marko_const = marko_helpers.const, 12399 marko_const_nextId = marko_const("7ccf55"), 12400 marko_node0 = marko_createElement("TH", null, "22", null, 1, 0, { 12401 i: marko_const_nextId() 12402}).t("Â "); 12403 12404function render(input, out, __component, component, state) { 12405 var data = input; 12406 12407 out.be("TR", null, "0", component); 12408 12409 out.be("TH", marko_attrs0, "1", component); 12410
12411 if (input.props.direction && input.props.field == "offerName") { 12412 out.e("I", { 12413 "class": marko_classAttr(marko_classList(["fa", "fa-caret-" + (input.props.direction === "desc" ? "down" : "up")])) 12414 }, "2", component, 0, 4); 12415 } 12416 12417 out.e("A", marko_attrs1, "3", component, 1, 0, { 12418 onclick: __component.d("click", "click", false, ["offerName"]) 12419 }).t("Offer"); 12420 12421 out.ee(); 12422 12423 out.be("TH", null, "4", component); 12424 12425 if (input.props.direction && input.props.field == "vertical") { 12426 out.e("I", { 12427 "class": marko_classAttr(marko_classList(["fa", "fa-caret-" + (input.props.direction === "desc" ? "down" : "up")])) 12428 }, "5", component, 0, 4); 12429 } 12430 12431 out.e("A", marko_attrs2, "6", component, 1, 0, { 12432 onclick: __component.d("click", "click", false, ["vertical"]) 12433 }).t("Vertical"); 12434 12435 out.ee(); 12436 12437 out.be("TH", null, "7", component); 12438 12439 if (input.props.direction && input.props.field == "conversionType") { 12440 out.e("I", { 12441 "class": marko_classAttr(marko_classList(["fa", "fa-caret-" + (input.props.direction === "desc" ? "down" : "up")])) 12442 }, "8", component, 0, 4); 12443 } 12444 12445 out.e("A", marko_attrs3, "9", component, 1, 0, { 12446 onclick: __component.d("click", "click", false, ["conversionType"]) 12447 }).t("Conversion Type"); 12448 12449 out.ee(); 12450 12451 out.be("TH", null, "10", component); 12452 12453 if (input.props.direction && input.props.field == "country") { 12454 out.e("I", { 12455 "class": marko_classAttr(marko_classList(["fa", "fa-caret-" + (input.props.direction === "desc" ? "down" : "up")])) 12456 }, "11", component, 0, 4); 12457 } 12458 12459 out.e("A", marko_attrs4, "12", component, 1, 0, { 12460 onclick: __component.d("click", "click", false, ["country"]) 12461 }).t("GEOs"); 12462 12463 out.ee(); 12464 12465 out.be("TH", marko_attrs5, "13", component); 12466 12467 if (input.props.direction && input.props.field == "platform") { 12468 out.e("I", { 12469 "class": marko_classAttr(marko_classList(["fa", "fa-caret-" + (input.props.direction === "desc" ? "down" : "up")])) 12470 }, "14", component, 0, 4); 12471 } 12472 12473 out.e("A", marko_attrs6, "15", component, 1, 0, { 12474 onclick: __component.d("click", "click", false, ["platform"]) 12475 }).t("Platform"); 12476 12477 out.ee(); 12478 12479 out.be("TH", null, "16", component); 12480 12481 if (input.props.direction && input.props.field == "description") { 12482 out.e("I", { 12483 "class": marko_classAttr(marko_classList(["fa", "fa-caret-" + (input.props.direction === "desc" ? "down" : "up")])) 12484 }, "17", component, 0, 4); 12485 } 12486 12487 out.e("A", marko_attrs7, "18", component, 1, 0, { 12488 onclick: __component.d("click", "click", false, ["description"]) 12489 }).t("Description"); 12490 12491 out.ee(); 12492 12493 out.be("TH", null, "19", component); 12494 12495 if (input.props.direction && input.props.field == "rate") { 12496 out.e("I", { 12497 "class": marko_classAttr(marko_classList(["fa", "fa-caret-" + (input.props.direction === "desc" ? "down" : "up")])) 12498 }, "20", component, 0, 4); 12499 } 12500 12501 out.e("A", marko_attrs8, "21", component, 1, 0, { 12502 onclick: __component.d("click", "click", false, ["rate"]) 12503 }).t("Rate"); 12504 12505 out.ee(); 12506 12507 out.n(marko_node0, component); 12508 12509 out.ee(); 12510} 12511 12512marko_template._ = marko_renderer(render, { 12513 _l_: marko_componentType 12514}, marko_component); 12515 12516marko_template.Component = marko_defineComponent(marko_component, marko_template._); 12517}); 12518$_mod.main("/panel-adsempiredirect$1.0.0/views/components/multiselect", "index.marko"); 12519$_mod.def("/panel-adsempiredirect$1.0.0/views/components/multiselect/component", function(require, exports, module, __filename, __dirname) { module.exports = { 12520 onCreate: function onCreate(input) { 12521 this.state = { 12522 config: input.config, 12523 elementId: input.elementId, 12524 multiple: input.multiple, 12525 name: input.name, 12526 options: input.options, 12527 showSubMenu: false, 12528 fieldType: input.fieldType 12529 }; 12530 }, 12531 onInput: function onInput(input) { 12532 if (input.options) { 12533 this.state.options.hasSubMenu = input.options.hasSubMenu; 12534 } 12535 12536 if (input.options && input.options.targetingName) { 12537 this.state.options.targetingName = input.options.targetingName; 12538 } 12539 12540 if (input.config && input.config.choices) { 12541 this.state.config.choices = input.config.choices; 12542 } 12543 12544 if (input.options && input.options.exceptList) { 12545 this.state.options.exceptList = input.options.exceptList; 12546 } 12547 }, 12548 onMount: function onMount() { 12549 var element = document.getElementById(this.state.elementId); 12550 var callbackOnCreateTemplates = function callbackOnCreateTemplates(template) { 12551 var classNames = this.config.classNames; 12552 var removeItemButton = this.config.removeItemButton; 12553 return { 12554 item: function item(data) { 12555 return template("<div class=\"" + classNames.item + " " + (data.highlighted ? classNames.highlightedState : classNames.itemSelectable) + "\" \n data-item data-id=\"" + data.id + "\" \n data-value=\"" + data.value + "\" \n " + (data.active ? "aria-selected='true'" : "") + " \n " + (data.disabled ? "aria-disabled='true'" : "") + ">
12555" + data.label + "\n <span>" + (data.customProperties && data.customProperties.subMenuValues && data.customProperties.subMenuValues.length ? "(" + data.customProperties.subMenuValues + ")" : "") + "\n </span>" + (removeItemButton ? "<button type='button' class='choices__button' data-button=''>Remove item</button>" : "") + "\n </div>"); 12556 } 12557 }; 12558 }; 12559 var isDisabled = this.state.options && this.state.options.disableSelect; 12560 var callbackOnInit = function callbackOnInit() { 12561 if (isDisabled) { 12562 this.disable(); 12563 } 12564 }; 12565 12566 this.state.config.callbackOnCreateTemplates = callbackOnCreateTemplates; 12567 this.state.config.callbackOnInit = callbackOnInit; 12568 this.state.config.itemSelectText = ""; 12569 12570 this.choices = new Choices(element, this.state.config || {}); // eslint-disable-line 12571 if (this.state.config) { 12572 this.choices.setChoices(this.state.config.choices, "value", "label", false); 12573 this.reRender(); 12574 } 12575 12576 this._setChoice(); 12577 12578 this.choices.passedElement.addEventListener("choice", this.onChangeItem.bind(this), false); 12579 this.choices.passedElement.addEventListener("search", this.searchDelay.bind(this), false); 12580 this.choices.passedElement.addEventListener("addItem", this.onAddItem.bind(this), false); 12581 this.choices.passedElement.addEventListener("removeItem", this.onRemoveItem.bind(this), false); 12582 this.choices.passedElement.addEventListener("highlightItem", this.onHighlightItem.bind(this), false); 12583 this.choices.passedElement.addEventListener("showDropdown", this.onShowDropdown.bind(this), false); 12584 }, 12585 searchDelay: function searchDelay(event) { 12586 var _this = this; 12587 12588 clearTimeout(this.time); 12589 this.time = setTimeout(function () { 12590 return _this.onSearchItem(event); 12591 }, 500); 12592 }, 12593 onUpdate: function onUpdate() { 12594 if (this.input.config.maxItemCount) { 12595 this.choices.config.maxItemCount = this.input.config.maxItemCount; 12596 } 12597 if (this.input.config.noChoicesText) { 12598 this.choices.config.noChoicesText = this.input.config.noChoicesText; 12599 } 12600 12601 this.choices.initialised = false; 12602 this.choices.init(); 12603 this.choices.clearStore(); 12604 this.choices.setChoices(this.input.config.choices, "value", "label", false); 12605 12606 this._setChoice(); 12607 }, 12608 onRemoveItem: function onRemoveItem(event) { 12609 if (this.state.options && this.state.options.hasSubMenu) { 12610 this.getComponent("subMenu").removedItem(event); 12611 } 12612 this.emit("removeItem", event); 12613 }, 12614 onAddItem: function onAddItem(event) { 12615 this.emit("addItem", event); 12616 }, 12617 onHideDropdown: function onHideDropdown(event) { 12618 this.emit("hideDropdown", event); 12619 }, 12620 onChangeItem: function onChangeItem(event) { 12621 this.emit("changeItem", event); 12622 }, 12623 onSearchItem: function onSearchItem(event) { 12624 var _this2 = this; 12625 12626 if (this.state.options && this.state.options.nativeSearch) { 12627 if (this.state.options && this.state.options.fetchUrl && this.state.options.fetchOptions && this.state.options.reponseDataMapper) { 12628 this.choices.ajax(function (cb) { 12629 var searchValue = event.detail.value.trim(); 12630 var url = _this2.state.options.fetchUrl + ("&method=" + _this2.state.options.searchMethod + "&q=" + searchValue + "&"); // eslint-disable-line 12631 12632 fetch(url, _this2.state.options.fetchOptions).then(function (response) { 12633 12634 return response.json().then(function (result) { 12635 _this2.choices.clearStore(); 12636 _this2.choices.setChoices(_this2._mapValues(result.data, _this2.state.options.reponseDataMapper), "value", "label", false); 12637 }); 12638 }).catch(function (err) { 12639 cb(err); 12640 }); 12641 }); 12642 } 12643 return; 12644 } 12645 }, 12646 _mapValues: function _mapValues(data, mapper) { 12647 var exceptListByValue = this.state.options.exceptList.map(function (item) { 12648 return item[mapper.value]; 12649 }); 12650 var result = data.map(function (item) { 12651 var customProperties = { 12652 params: item.params 12653 }; 12654 if (item.params && item.params.urlTail) { 12655 customProperties.urlTail = item.params.urlTail; 12656 } 12657 return { 12658 value: item[mapper.value], 12659 label: item[mapper.label], 12660 customProperties: customProperties 12661 }; 12662 }); 12663 result = result.filter(function (item) { 12664 return exceptListByValue.indexOf(item.value) < 0; 12665 }); 12666 return result; 12667 }, 12668 onHighlightItem: function onHighlightItem(event) { 12669 if (this.state.options && this.state.options.hasSubMenu) { 12670 var choiceObject = this.choices.currentState.choices.find(function (item) { 12671 return item.value === event.detail.value; 12672 }); 12673 this.choices.unhighlightAll(); 12674 this.state.showSubMenu = true; 12675 this.getComponent("subMenu").init(event.detail, choiceObject.customProperties); 12676 } 12677 }, 12678 onShowDropdown: function onShowDropdown() { 12679 if (this.state.options && this.state.options.hasSubMenu && this.state.showSubMenu) { 12680 this.state.showSubMenu = false;
12681 this.choices.hideDropdown(); 12682 } 12683 }, 12684 changeSubMenuValues: function changeSubMenuValues(value, countryLabel) { 12685 this.state.showSubMenu = false; 12686 this.emit("changeSubMenuValues", value, countryLabel); 12687 }, 12688 _setChoice: function _setChoice() { 12689 if (this.input.options && this.input.options.selectedItem && this.state.config.choices.length) { 12690 this.choices.setValueByChoice(this.input.options.selectedItem); 12691 } 12692 }, 12693 reRender: function reRender() { 12694 this.forceUpdate(); 12695 } 12696}; 12697}); 12698$_mod.main("/panel-adsempiredirect$1.0.0/views/components/multiselect/components/subMenu", "index.marko"); 12699$_mod.def("/panel-adsempiredirect$1.0.0/views/components/multiselect/components/subMenu/component", function(require, exports, module, __filename, __dirname) { module.exports = { 12700 onCreate: function onCreate() { 12701 this.state = { 12702 isVisible: false, 12703 label: "", 12704 list: [], 12705 showNoRegions: false, 12706 targetingValueLabel: "", 12707 targetingSubValueLabel: "" 12708 }; 12709 }, 12710 close: function close() { 12711 this.hideSubMenu(); 12712 }, 12713 changeAll: function changeAll(result) { 12714 this.state.list = this.state.list.map(function (region) { 12715 region.checked = result; 12716 return region; 12717 }); 12718 }, 12719 changeInput: function changeInput(event) { 12720 this.state.list.forEach(function (region) { 12721 if (String(region.value) === event.target.value) { 12722 region.checked = !region.checked; 12723 } 12724 }); 12725 }, 12726 init: function init(value, customProperties) { 12727 this.state.targetingValueLabel = customProperties.keyForValue; 12728 this.state.targetingSubValueLabel = customProperties.keyForSubMenu; 12729 this.state.label = value.label; 12730 this.state.isVisible = true; 12731 this._fetchSubMenuValues(value.value, customProperties); 12732 document.body.addEventListener("click", this._clickHandler.bind(this)); 12733 }, 12734 removedItem: function removedItem(e) { 12735 if (e.detail.label === this.state.label && this.state.isVisible) { 12736 this.hideSubMenu(); 12737 } 12738 }, 12739 _clickHandler: function _clickHandler(e) { 12740 if (this.state.isVisible && !e.target.closest(".multi-select-regions")) { 12741 this.hideSubMenu(); 12742 } 12743 }, 12744 _fetchSubMenuValues: function _fetchSubMenuValues(id, customProperties) { 12745 var _this = this; 12746 12747 fetch("/tds/createCampaign/getTargetingValue?targeting=" + customProperties.targetingName + "List&value=" + id, { credentials: "same-origin" }).then(function (response) { 12748 return response.json(); 12749 }).then(function (data) { 12750 _this.state.list = data.map(function (region) { 12751 region.checked = customProperties.subMenuValues.indexOf(region.value) > -1; 12752 12753 return region; 12754 }); 12755 12756 _this.state.showNoRegions = false; 12757 if (!data.length) { 12758 _this.state.showNoRegions = true; 12759 } 12760 }).catch(function (err) { 12761 return err; 12762 }); 12763 }, 12764 hideSubMenu: function hideSubMenu() { 12765 this.state.isVisible = false; 12766 var inputValue = []; 12767 this.state.list.forEach(function (region) { 12768 if (region.checked) { 12769 inputValue.push(region.value); 12770 } 12771 }); 12772 this.state.list = []; 12773 12774 this.emit("changeSubMenuValues", inputValue, this.state.label); 12775 } 12776}; 12777}); 12778$_mod.def("/panel-adsempiredirect$1.0.0/views/components/multiselect/components/subMenu/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 12779"use strict"; 12780 12781var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12782 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12783 marko_registerComponent = components_helpers.rc, 12784 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/multiselect/components/subMenu/index.marko", function () { 12785 return module.exports; 12786}), 12787 marko_component = require('/panel-adsempiredirect$1.0.0/views/components/multiselect/components/subMenu/component'/*"./component"*/), 12788 marko_renderer = components_helpers.r, 12789 marko_defineComponent = components_helpers.c, 12790 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12791 marko_forEach = marko_helpers.f, 12792 marko_attrs0 = {
12793 "class": "sub-menu-header row mb-1" 12794}, 12795 marko_attrs1 = { 12796 "class": "row" 12797}, 12798 marko_attrs2 = { 12799 "class": "col-md-12 regions-list" 12800}, 12801 marko_attrs3 = { 12802 "class": "sub-menu-footer row" 12803}, 12804 marko_attrs4 = { 12805 "class": "form-check col-md-6" 12806}, 12807 marko_attrs5 = { 12808 "class": "form-check-label" 12809}, 12810 marko_createElement = marko_helpers.e, 12811 marko_const = marko_helpers.const, 12812 marko_const_nextId = marko_const("05591f"), 12813 marko_node0 = marko_createElement("P", null, "9", null, 1, 0, { 12814 i: marko_const_nextId() 12815}).t("No regions for this country"), 12816 marko_attrs6 = { 12817 "class": "sub-menu-link col-md-4" 12818}, 12819 marko_attrs7 = { 12820 "class": "sub-menu-link col-md-4" 12821}, 12822 marko_attrs8 = { 12823 "class": "sub-menu-link col-md-4" 12824}; 12825 12826function render(input, out, __component, component, state) { 12827 var data = input; 12828 12829 if (state.isVisible) { 12830 out.be("DIV", { 12831 "data-modalName": state.label, 12832 "class": "container multi-select-regions" 12833 }, "0", component); 12834 12835 out.e("DIV", marko_attrs0, "1", component, 7).t("Select ").t(state.targetingSubValueLabel).t(" for ").t(state.targetingValueLabel).t(" \"").t(state.label).t("\""); 12836 12837 out.be("DIV", marko_attrs1, "2", component); 12838 12839 out.be("DIV", marko_attrs2, "3", component); 12840 12841 var for__4 = 0; 12842 12843 marko_forEach(state.list, function (region) { 12844 var keyscope__5 = "[" + (for__4++ + "]"); 12845 12846 out.e("DIV", marko_attrs4, "6" + keyscope__5, component, 2).e("INPUT", { 12847 type: "checkbox", 12848 value: region.value, 12849 checked: region.checked, 12850 "class": "form-check-input" 12851 }, "7" + keyscope__5, component, 0, 0, { 12852 onclick: __component.d("click", "changeInput", false) 12853 }).e("LABEL", marko_attrs5, "8" + keyscope__5, component, 1).t(region.label); 12854 }); 12855 12856 if (state.showNoRegions) { 12857 out.n(marko_node0, component); 12858 } 12859 12860 out.ee(); 12861 12862 out.ee(); 12863 12864 out.e("DIV", marko_attrs3, "10", component, 3).e("SPAN", marko_attrs6, "11", component, 1, 0, { 12865 onclick: __component.d("click", "changeAll", false, [true]) 12866 }).t("Select All").e("SPAN", marko_attrs7, "12", component, 1, 0, { 12867 onclick: __component.d("click", "changeAll", false, [false]) 12868 }).t("Unselect All").e("SPAN", marko_attrs8, "13", component, 1, 0, { 12869 onclick: __component.d("click", "close", false) 12870 }).t("Close"); 12871 12872 out.ee(); 12873 } 12874} 12875 12876marko_template._ = marko_renderer(render, { 12877 _l_: marko_componentType 12878}, marko_component); 12879 12880marko_template.Component = marko_defineComponent(marko_component, marko_template._); 12881}); 12882$_mod.def("/panel-adsempiredirect$1.0.0/views/components/multiselect/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 12883"use strict"; 12884 12885var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12886 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12887 marko_classList = marko_helpers.cl, 12888 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12889 marko_registerComponent = components_helpers.rc, 12890 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/multiselect/index.marko", function () { 12891 return module.exports; 12892}), 12893 marko_component = require('/panel-adsempiredirect$1.0.0/views/components/multiselect/component'/*"./component"*/), 12894 marko_renderer = components_helpers.r, 12895 marko_defineComponent = components_helpers.c, 12896 marko_classAttr = marko_helpers.ca, 12897 subMenu_template = require('/panel-adsempiredirect$1.0.0/views/components/multiselect/components/subMenu/index.marko'/*"./components/subMenu"*/), 12898 marko_loadTag = marko_helpers.t, 12899 subMenu_tag = marko_loadTag(subMenu_template), 12900 marko_forEach = marko_helpers.f, 12901 marko_attrs0 = { 12902 "class": "basic-input--subtext--error" 12903}; 12904 12905function render(input, out, __component, component, state) { 12906 var data = input; 12907 12908 out.e("DIV", { 12909 "class": marko_classAttr(marko_classList(["multiselect-wrap", { 12910 "disable-all-inputs": state.options && state.options.disableSelect, 12911 "is-invalid": input.class && input.class["is-invalid"] 12912 }])), 12913 "data-test-id": state.name 12914 }, "0", component, 1).e("SELECT", { 12915 id: state.elementId, 12916 name: state.name, 12917 multiple: state.multiple 12918 }, "1", component, 0); 12919 12920 if (state.options && state.options.hasSubMenu) { 12921 subMenu_tag({}, out, __component, "subMenu", [["changeSubMenuValues", "changeSubMenuValues", false]]); 12922 } 12923 12924 if (input.errors && input.errors[input.name]) { 12925 var for__2 = 0; 12926 12927 marko_forEach(input.errors[input.name], function (error) { 12928 var keyscope__3 = "[" + (for__2++ + "]"); 12929 12930 out.e("DIV", marko_attrs0, "4" + keyscope__3, component, 1).t(error.message); 12931 }); 12932 } 12933} 12934 12935marko_template._ = marko_renderer(render, { 12936 _l_: marko_componentType 12937}
12937, marko_component); 12938 12939marko_template.Component = marko_defineComponent(marko_component, marko_template._); 12940}); 12941$_mod.main("/panel-adsempiredirect$1.0.0/views/components/aui-select", "index.marko"); 12942$_mod.main("/panel-adsempiredirect$1.0.0/views/components/multi-purpose-select", "index.marko"); 12943$_mod.def("/panel-adsempiredirect$1.0.0/views/components/multi-purpose-select/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 12944"use strict"; 12945 12946var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 12947 marko_component = { 12948 onCreate: function onCreate(input) { 12949 this.change = input.change; 12950 } 12951}, 12952 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 12953 marko_registerComponent = components_helpers.rc, 12954 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/multi-purpose-select/index.marko", function () { 12955 return module.exports; 12956}), 12957 marko_renderer = components_helpers.r, 12958 marko_defineComponent = components_helpers.c, 12959 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 12960 marko_classAttr = marko_helpers.ca, 12961 marko_forEach = marko_helpers.f; 12962 12963function render(input, out, __component, component, state) { 12964 var data = input; 12965 12966 out.be("DIV", { 12967 "class": marko_classAttr(input.wrapperClass) 12968 }, "0", component, null, 4); 12969 12970 out.e("DIV", { 12971 "class": marko_classAttr(input.labelWrapperClass) 12972 }, "1", component, 1, 4).e("LABEL", { 12973 "class": marko_classAttr(input.labelClass) 12974 }, "2", component, 1, 4).t(input.label); 12975 12976 out.be("DIV", { 12977 "class": marko_classAttr(input.inputWrapperClass) 12978 }, "3", component, null, 4); 12979 12980 out.be("SELECT", { 12981 disabled: input.disabled, 12982 "class": marko_classAttr("" + input.inputClass + " " + (input.errors && input.errors[input.name] ? input.inputErrorClass : "")), 12983 name: input.name, 12984 "data-test-id": input.dataTestId, 12985 value: input.value, 12986 id: input.id 12987 }, "@" + input.name, component, null, 0, { 12988 onchange: __component.d("change", "change", false) 12989 }); 12990 12991 var for__4 = 0; 12992 12993 marko_forEach(input.options, function (option) { 12994 var keyscope__5 = "[" + (for__4++ + "]"); 12995 12996 out.e("OPTION", { 12997 value: option.value, 12998 selected: option.value == input.value, 12999 disabled: option.disabled || false, 13000 hidden: option.hidden || false 13001 }, "6" + keyscope__5, component, 1).t(option.text); 13002 }); 13003 13004 out.ee(); 13005 13006 out.ee(); 13007 13008 if (input.errors && input.errors[input.name]) { 13009 var for__7 = 0; 13010 13011 marko_forEach(input.errors[input.name], function (error) { 13012 var keyscope__8 = "[" + (for__7++ + "]"); 13013 13014 out.e("DIV", { 13015 "class": marko_classAttr(input.errorClass) 13016 }, "9" + keyscope__8, component, 1, 4).t(error.message); 13017 }); 13018 } 13019 13020 out.ee(); 13021} 13022 13023marko_template._ = marko_renderer(render, { 13024 _l_: marko_componentType 13025}, marko_component); 13026 13027marko_template.Component = marko_defineComponent(marko_component, marko_template._); 13028}); 13029$_mod.def("/panel-adsempiredirect$1.0.0/views/components/aui-select/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 13030"use strict"; 13031 13032var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13033 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13034 marko_registerComponent = components_helpers.rc, 13035 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/aui-select/index.marko", function () { 13036 return module.exports; 13037}), 13038 marko_renderer = components_helpers.r, 13039 marko_defineComponent = components_helpers.c, 13040 multi_purpose_select_template = require('/panel-adsempiredirect$1.0.0/views/components/multi-purpose-select/index.marko'/*"../multi-purpose-select"*/), 13041 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13042 marko_loadTag = marko_helpers.t, 13043 multi_purpose_select_tag = marko_loadTag(multi_purpose_select_template); 13044 13045function render(input, out, __component, component, state) { 13046 var data = input; 13047 13048 multi_purpose_select_tag({ 13049 id: input.id, 13050 name: input.name, 13051 dataTestId: input.dataTestId, 13052 label: input.label, 13053 change: input.change || function () {}, 13054 placeholder: input.placeholder, 13055 inputHander: input.inputHandler || function () {}, 13056 value: input.value, 13057 options: input.options, 13058 wrapperClass: input.wrapperClass, 13059 disabled: input.disabled, 13060 labelWrapperClass: "basic-input--label-wrapper", 13061 labelClass: "basic-input--label", 13062 inputWrapperClass: "basic-input--input-wrapper " + input.selectWrapperModifier, 13063 inputClass: "basic-select--input " + input.selectClassModifier, 13064 inputErrorClass: "basic-input--input--error", 13065 errorClass: "basic-input--subtext--error", 13066 errors: input.errors 13067 }
13067, out, __component, input.key); 13068} 13069 13070marko_template._ = marko_renderer(render, { 13071 am_: true, 13072 _l_: marko_componentType 13073}); 13074 13075marko_template.Component = marko_defineComponent({}, marko_template._); 13076}); 13077$_mod.def("/marko$4.14.8/dist/taglibs/core/include-tag", function(require, exports, module, __filename, __dirname) { var w10NOOP = require('/warp10$2.1.0/constants'/*"warp10/constants"*/).NOOP; 13078var RENDER_BODY_TO_JSON = function () { 13079 return w10NOOP; 13080}; 13081 13082var FLAG_WILL_RERENDER_IN_BROWSER = 1; 13083var IS_SERVER = typeof window === "undefined"; 13084 13085function doInclude(input, out, throwError) { 13086 var target = input._target; 13087 var arg = input._arg || input; 13088 var renderBody = target && target.renderBody || target; 13089 13090 if (target) { 13091 if (target.renderer) { 13092 return target.renderer(arg, out), true; 13093 } else if (target.render) { 13094 return target.render(arg, out), true; 13095 } else if (target.safeHTML) { 13096 return out.write(target.safeHTML), true; 13097 } else if (typeof renderBody !== "function") { 13098 if (typeof target === "string") { 13099 // TODO: deprecate this 13100 return target && out.text(target), true; 13101 } else if (throwError) { 13102 out.error("Invalid include target"); 13103 } 13104 } 13105 } 13106 13107 if (renderBody) { 13108 var isFn = renderBody !== w10NOOP; 13109 var componentsContext = out._r_; 13110 var componentDef = out.ai_ || componentsContext && componentsContext._p_; 13111 var willRerenderInBrowser = componentDef && componentDef._f_ & FLAG_WILL_RERENDER_IN_BROWSER; 13112 var preserve = IS_SERVER && willRerenderInBrowser || !isFn; 13113 out.aQ_(out._Z_, componentDef && componentDef._b_, preserve); 13114 if (isFn) { 13115 renderBody.toJSON = RENDER_BODY_TO_JSON; 13116 renderBody(out, arg); 13117 } 13118 out.aR_(); 13119 } 13120} 13121 13122function includeTag(input, out) { 13123 doInclude(input, out, true); 13124} 13125 13126includeTag.bR_ = doInclude; 13127 13128module.exports = includeTag; 13129}); 13130$_mod.main("/panel-adsempiredirect$1.0.0/views/components/date-picker", "index.marko"); 13131$_mod.def("/panel-adsempiredirect$1.0.0/views/components/date-picker/component", function(require, exports, module, __filename, __dirname) { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 13132 13133function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13134 13135var moment = require('/moment$2.30.1/moment'/*"moment"*/); 13136 13137module.exports = function () { 13138 function _class() { 13139 _classCallCheck(this, _class); 13140 } 13141 13142 _createClass(_class, [{ 13143 key: "onCreate", 13144 value: function onCreate(input) { 13145 this.state = { 13146 isOpenCalendar: false, 13147 date: {}, 13148 daysInMonth: [], 13149 selectedRange: "", 13150 firstDay: "", 13151 lastDay: "", 13152 titleFormatDate: input.params.titleFormatDate, 13153 dateFrom: input.dateFrom, 13154 dateTo: input.dateTo, 13155 elementId: input.elementId 13156 }; 13157 13158 this.months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
13158November", "December"]; 13159 } 13160 }, { 13161 key: "onInput", 13162 value: function onInput(input) { 13163 this.months = input.params.months || this.months; 13164 this.state.date = this.setStateDate(input[input.workWithDate]); 13165 this.state.dateFrom = input.dateFrom; 13166 this.state.dateTo = input.dateTo; 13167 this.state.daysInMonth = this.getDaysInMonth(this.state.date); 13168 } 13169 }, { 13170 key: "onMount", 13171 value: function onMount() { 13172 this.state.daysInMonth = this.getDaysInMonth(this.state.date); 13173 13174 if (this.input.params.thirdOfSeptemberMod && this.state.date.month + "-" + moment().get("D") == "9-3") { 13175 this.thirdOfSeptember(); 13176 } 13177 } 13178 }, { 13179 key: "setStateDate", 13180 value: function setStateDate(date) { 13181 return { 13182 day: moment(date).get("D"), 13183 month: moment(date).get("month") + 1, 13184 year: moment(date).get("year"), 13185 fullDate: moment(date).format("YYYY-M-DD"), 13186 titleDate: moment(date).format(this.state.titleFormatDate) 13187 }; 13188 } 13189 }, { 13190 key: "open", 13191 value: function open() { 13192 if (this.input.disabled) return; 13193 13194 this.state.isOpenCalendar = true; 13195 } 13196 }, { 13197 key: "close", 13198 value: function close() { 13199 this.state.isOpenCalendar = false; 13200 } 13201 }, { 13202 key: "getMonth", 13203 value: function getMonth(date) { 13204 return this.months[date.month - 1]; 13205 } 13206 }, { 13207 key: "nextMonth", 13208 value: function nextMonth(date) { 13209 var endOfYear = this.months.length + 1; 13210 13211 if (date.month != endOfYear) { 13212 date.month++; 13213 } 13214 13215 if (date.month == endOfYear) { 13216 date.month = 1; 13217 date.year++; 13218 } 13219 13220 date.day = moment(date.year + "-" + date.month, "YYYY-MM").daysInMonth(); 13221 date.fullDate = moment(date.year + "-" + date.month + "-" + date.day, "YYYY-M-DD").format("YYYY-M-DD"); 13222 13223 this.state["daysInMonth"] = this.getDaysInMonth(date); 13224 13225 this.forceUpdate(); 13226 return this.months[date.month]; 13227 } 13228 }, { 13229 key: "prevMonth", 13230 value: function prevMonth(date) { 13231 if (date.month != 0) { 13232 date.month--; 13233 } 13234 13235 if (date.month == 0) { 13236 date.month = 12; 13237 date.year--; 13238 } 13239 13240 date.day = moment(date.year + "-" + date.month, "YYYY-MM").daysInMonth(); 13241 date.fullDate = moment(date.year + "-" + date.month + "-" + date.day, "YYYY-M-DD").format("YYYY-M-DD"); 13242 this.state["daysInMonth"] = this.getDaysInMonth(date); 13243 13244 this.forceUpdate(); 13245 return this.months[date.month]; 13246 } 13247 }, { 13248 key: "getDaysInMonth", 13249 value: function getDaysInMonth(date) { 13250 var firstMonday = moment(date.fullDate, "YYYY-M-DD").startOf("month").isoWeekday(1).format("YYYY-M-DD"); 13251 13252 this.state["daysInMonth"] = []; 13253 var day = ""; 13254 var days = []; 13255 var count = 0; 13256 13257 for (var i = 0; i < 42; i++) { 13258 day = moment(firstMonday, "YYYY-M-DD").add(i, "day").format("YYYY-M-DD"); 13259 13260 days.push({ 13261 day: moment(day, "YYYY-M-DD").format("D"), 13262 month: moment(day, "YYYY-M-DD").format("M"), 13263 isDayFromThisMonth: moment(day, "YYYY-M-DD").month() + 1 === date.month ? true : false, //eslint-disable-line 13264 numberOfWeek: moment(day, "YYYY-M-DD").isoWeek(), 13265 date: moment(day, "YYYY-M-DD") 13266 }); 13267 } 13268 13269 for (var _i = 0; _i < 6; _i++) { 13270 this.state["daysInMonth"].push({ 13271 numberOfWeek: days[count].numberOfWeek, 13272 date: days[count].date, 13273 days: [] 13274 }); 13275 for (var j = 0; j < 7; j++) { 13276 this.state["daysInMonth"][_i].days.push(days[count]); 13277 count++; 13278 } 13279 } 13280 13281 return this.state["daysInMonth"]; 13282 } 13283 }, { 13284 key: "setDate", 13285 value: function setDate(day, isDayFromThisMonth) { 13286 if (!isDayFromThisMonth) { 13287 return; 13288 } 13289 13290 if (!this.checkStartEndDate(day)) { 13291 return; 13292 } 13293 13294 var date = this.state.date; 13295 13296 date.day = parseInt(day); 13297 this.state.date.day = day; 13298 13299 if (this.input.workWithDate === "dateFrom") { 13300 this.state["dateFrom"] = moment(this.state.date.year + "-" + this.state.date.month + "-" + day, "YYYY-M-D").format("YYYY-MM-DD"); 13301 } 13302 13303 if (this.input.workWithDate === "dateTo") { 13304 this.state["dateTo"] = moment(this.state.date.year + "-" + this.state.date.month + "-" + day, "YYYY-M-D").format("YYYY-MM-DD"); 13305 } 13306 13307 this.state["daysInMonth"] = this.getDaysInMonth(this.state.date); 13308 this.forceUpdate(); 13309 this.changeDate(); 13310 this.close(); 13311 } 13312 }, { 13313 key: "setWeek", 13314 value: function setWeek(numberOfWeek, date) { 13315 if (!this.checkStartEndDate(date.format("D"), date)) { 13316 return; 13317 } 13318 13319 if (this.input.workWithDate === "dateFrom") { 13320 this.state["dateFrom"] = moment(date, "YYYY-M-DD").isoWeeks(numberOfWeek).isoWeekday("Monday").format("YYYY-M-DD"); 13321 this.state["dateTo"] = moment(date, "YYYY-M-DD").isoWeeks(numberOfWeek).isoWeekday("Sunday").format("YYYY-M-DD"); 13322 } 13323 13324 if (this.input.workWithDate === "dateTo") { 13325 this.state["dateTo"] = moment(date, "YYYY-M-DD").isoWeekday("Sunday").format("YYYY-M-DD"); 13326 this.state["dateTo"] = moment(date, "YYYY-M-DD").isoWeekday("Sunday").format("YYYY-M-DD"); 13327 } 13328 13329 this.state.date = this.setStateDate(this.state[this.input.workWithDate]); 13330 this.state["daysInMonth"] = this.getDaysInMonth(this.state.date); 13331 this.forceUpdate(); 13332 this.changeDate(); 13333 this.close(); 13334 } 13335 }, { 13336 key: "checkDateInRange", 13337 value: function checkDateInRange(day, month) { 13338 var start = this.state.dateFrom; 13339 var end = this.state.dateTo; 13340 var date = moment(this.state.date.year + "-" + month + "-" + day, "YYYY-M-D").format("YYYY-M-D"); 13341 13342 return moment(date, "YYYY-M-D").isBetween(start, end, null, "[]"); 13343 } 13344 }, { 13345 key: "checkStartEndDate", 13346 value: function checkStartEndDate(day, date) { 13347 var start = this.state.dateFrom; 13348 date = date ? moment(date, "YYYY-M-D").format("YYYY-M-D") : moment(this.state.date.year + "-" + this.state.date.month + "-" + day, "YYYY-M-D").format("YYYY-M-D"); 13349 13350 if (this.input.workWithDate === "dateFrom") { 13351 return true; 13352 } 13353 13354 if (this.input.workWithDate === "dateTo") { 13355 return moment(date, "YYYY-M-D").add(1, "day").isAfter(start); 13356 } 13357 } 13358 }, { 13359 key: "changeDate", 13360 value: function changeDate() { 13361 var date = moment(this.state.date.year + "-" + this.state.date.month + "-" + this.state.date.day, "YYYY-M-D").format("YYYY-MM-DD"); //eslint-disable-line 13362 13363 if (this.input.workWithDate === "dateFrom") { 13364 //eslint-disable-line 13365 this.state.dateFrom = date; 13366 } 13367 13368 if (this.input.workWithDate === "dateTo") { 13369 //eslint-disable-line 13370 this.state.dateTo = date; 13371 } 13372
13373 return this.emit("change", this.state.dateFrom, this.state.dateTo); 13374 } 13375 13376 /* eslint-disable complexity */ 13377 13378 }, { 13379 key: "changeDateInput", 13380 value: function changeDateInput(e) { 13381 var date = e.target.value; 13382 var checkRegExpDate = date.match(this.input.params.regExpDate); //eslint-disable-line 13383 13384 if (!checkRegExpDate) { 13385 this.forceUpdate(); 13386 return; 13387 } 13388 13389 date = moment(date, this.input.params.titleFormatDate); 13390 13391 var year = moment(date, this.input.params.titleFormatDate).format("YYYY"); 13392 var month = moment(date, this.input.params.titleFormatDate).format("M"); 13393 var day = moment(date, this.input.params.titleFormatDate).format("D"); 13394 13395 if (this.checkEqualityDates(date) || day === "Invalid date") { 13396 //eslint-disable-line 13397 this.forceUpdate(); 13398 return; 13399 } 13400 13401 if (this.input.params.minYear > year) { 13402 year = this.input.params.minYear; 13403 } 13404 13405 if (this.input.params.maxYear < year) { 13406 year = this.input.params.maxYear; 13407 } 13408 13409 if (month < 1) { 13410 month = 1; 13411 } 13412 13413 if (month > 12) { 13414 month = 12; 13415 } 13416 13417 var countDaysInMonth = moment(year + "-" + month, "YYYY-MM").daysInMonth(); 13418 13419 if (1 > day) { 13420 day = 1; 13421 } 13422 13423 if (countDaysInMonth < day) { 13424 day = countDaysInMonth; 13425 } 13426 13427 date = moment(year + "-" + month + "-" + day, "YYYY-M-D"); 13428 this.state.date = this.setStateDate(date); 13429 13430 this.state.daysInMonth = this.getDaysInMonth(this.state.date); 13431 this.forceUpdate(); 13432 this.changeDate(); 13433 } 13434 /* eslint-enable complexity */ 13435 13436 }, { 13437 key: "thirdOfSeptember", 13438 value: function thirdOfSeptember() { 13439 var el = document.getElementsByClassName("datepicker--calendar--table"); 13440 el[0].style = "transform: rotate(180deg)"; 13441 el[1].style = "transform: rotate(180deg)"; 13442 } 13443 }, { 13444 key: "checkEqualityDates", 13445 value: function checkEqualityDates(date) { 13446 if (this.input.workWithDate === "dateFrom" && moment(date, this.input.params.titleFormatDate).isAfter("" + this.state.dateTo, "YYYY-M-D")) { 13447 //eslint-disable-line 13448 return true; 13449 } 13450 13451 if (this.input.workWithDate === "dateTo" && moment(date, this.input.params.titleFormatDate).isBefore("" + this.state.dateFrom, "YYYY-M-D")) { 13452 //eslint-disable-line 13453 return true; 13454 } 13455 13456 return false; 13457 } 13458 }]); 13459 13460 return _class; 13461}(); 13462}); 13463$_mod.main("/panel-adsempiredirect$1.0.0/views/components/icon", "index.marko"); 13464$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/dashboard.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 13465"use strict"; 13466 13467var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13468 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13469 marko_registerComponent = components_helpers.rc, 13470 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/dashboard.marko", function () { 13471 return module.exports; 13472}), 13473 marko_renderer = components_helpers.r, 13474 marko_defineComponent = components_helpers.c, 13475 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13476 marko_createElement = marko_helpers.e, 13477 marko_const = marko_helpers.const, 13478 marko_const_nextId = marko_const("c86fef"), 13479 marko_node0 = marko_createElement("svg", { 13480 width: "20", 13481 height: "17", 13482 viewBox: "0 0 20 17", 13483 fill: "none", 13484 xmlns: "http://www.w3.org/2000/svg" 13485}, "0", null, 2, 1, { 13486 i: marko_const_nextId() 13487}).e("path", { 13488 "fill-rule": "evenodd", 13489 "clip-rule": "evenodd", 13490 d: "M8 17V11H12V17H17V9H20L10 0L0 9H3V17H8Z", 13491 fill: "url(#paint0_linear)" 13492}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 13493 id: "paint0_linear", 13494 x1: "0", 13495 y1: "8.5", 13496 x2: "20", 13497 y2: "8.5", 13498 gradientUnits: "userSpaceOnUse" 13499}, null, null, 2, 1).e("stop", { 13500 "stop-color": "#FF9000" 13501}, null, null, 0, 1).e("stop", { 13502 offset: "1", 13503 "stop-color": "#FFD33A" 13504}, null, null, 0, 1); 13505 13506function render(input, out, __component, component, state) { 13507 var data = input; 13508 13509 out.n(marko_node0, component); 13510} 13511 13512marko_template._ = marko_renderer(render, { 13513 am_: true, 13514 _l_: marko_componentType 13515}); 13516 13517marko_template.Component = marko_defineComponent({}, marko_template._); 13518}); 13519$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/credit.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
13519[email protected] - DO NOT EDIT 13520"use strict"; 13521 13522var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13523 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13524 marko_registerComponent = components_helpers.rc, 13525 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/credit.marko", function () { 13526 return module.exports; 13527}), 13528 marko_renderer = components_helpers.r, 13529 marko_defineComponent = components_helpers.c, 13530 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13531 marko_createElement = marko_helpers.e, 13532 marko_const = marko_helpers.const, 13533 marko_const_nextId = marko_const("968e39"), 13534 marko_node0 = marko_createElement("svg", { 13535 width: "20", 13536 height: "16", 13537 viewBox: "0 0 20 16", 13538 fill: "none", 13539 xmlns: "http://www.w3.org/2000/svg" 13540}, "0", null, 2, 1, { 13541 i: marko_const_nextId() 13542}).e("path", { 13543 "fill-rule": "evenodd", 13544 "clip-rule": "evenodd", 13545 d: "M18 0H2C0.89 0 0.01 0.89 0.01 2L0 14C0 15.11 0.89 16 2 16H18C19.11 16 20 15.11 20 14V2C20 0.89 19.11 0 18 0ZM20 4H0V8H20V4Z", 13546 fill: "url(#paint0_linear)" 13547}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 13548 id: "paint0_linear", 13549 x1: "0", 13550 y1: "8", 13551 x2: "20", 13552 y2: "8", 13553 gradientUnits: "userSpaceOnUse" 13554}, null, null, 2, 1).e("stop", { 13555 "stop-color": "#FF9000" 13556}, null, null, 0, 1).e("stop", { 13557 offset: "1", 13558 "stop-color": "#FFD33A" 13559}, null, null, 0, 1); 13560 13561function render(input, out, __component, component, state) { 13562 var data = input; 13563 13564 out.n(marko_node0, component); 13565} 13566 13567marko_template._ = marko_renderer(render, { 13568 am_: true, 13569 _l_: marko_componentType 13570}); 13571 13572marko_template.Component = marko_defineComponent({}, marko_template._); 13573}); 13574$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/faq.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 13575"use strict"; 13576 13577var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13578 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13579 marko_registerComponent = components_helpers.rc, 13580 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/faq.marko", function () { 13581 return module.exports; 13582}), 13583 marko_renderer = components_helpers.r, 13584 marko_defineComponent = components_helpers.c, 13585 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13586 marko_createElement = marko_helpers.e, 13587 marko_const = marko_helpers.const, 13588 marko_const_nextId = marko_const("a48995"), 13589 marko_node0 = marko_createElement("svg", { 13590 width: "20", 13591 height: "20", 13592 viewBox: "0 0 20 20", 13593 fill: "none", 13594 xmlns: "http://www.w3.org/2000/svg" 13595}, "0", null, 2, 1, { 13596 i: marko_const_nextId() 13597}).e("path", { 13598 "fill-rule": "evenodd", 13599 "clip-rule": "evenodd", 13600 d: "M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 17H9V15H11V17ZM13.07 9.25L12.17 10.17C11.45 10.9 11 11.5 11 13H9V12.5C9 11.4 9.45 10.4 10.17 9.67L11.41 8.41C11.78 8.05 12 7.55 12 7C12 5.9 11.1 5 10 5C8.9 5 8 5.9 8 7H6C6 4.79 7.79 3 10 3C12.21 3 14 4.79 14 7C14 7.88 13.64 8.68 13.07 9.25Z", 13601 fill: "url(#paint0_linear)" 13602}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 13603 id: "paint0_linear", 13604 x1: "0", 13605 y1: "10", 13606 x2: "20", 13607 y2: "10", 13608 gradientUnits: "userSpaceOnUse" 13609}, null, null, 2, 1).e("stop", { 13610 "stop-color": "#FF9000" 13611}, null, null, 0, 1).e("stop", { 13612 offset: "1", 13613 "stop-color": "#FFD33A" 13614}, null, null, 0, 1); 13615 13616function render(input, out, __component, component, state) { 13617 var data = input; 13618 13619 out.n(marko_node0, component); 13620} 13621 13622marko_template._ = marko_renderer(render, { 13623 am_: true, 13624 _l_: marko_componentType 13625}); 13626 13627marko_template.Component = marko_defineComponent({}, marko_template._); 13628}); 13629$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/news.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
13629[email protected] - DO NOT EDIT 13630"use strict"; 13631 13632var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13633 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13634 marko_registerComponent = components_helpers.rc, 13635 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/news.marko", function () { 13636 return module.exports; 13637}), 13638 marko_renderer = components_helpers.r, 13639 marko_defineComponent = components_helpers.c, 13640 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13641 marko_createElement = marko_helpers.e, 13642 marko_const = marko_helpers.const, 13643 marko_const_nextId = marko_const("f345ed"), 13644 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 13645 i: marko_const_nextId() 13646}).t("icon/news"), 13647 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 13648 i: marko_const_nextId() 13649}).t("Created with Sketch."), 13650 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 13651 i: marko_const_nextId() 13652}).e("path", { 13653 d: "M22,9 L22,7 L20,7 L20,5 C20,3.9 19.1,3 18,3 L4,3 C2.9,3 2,3.9 2,5 L2,19 C2,20.1 2.9,21 4,21 L18,21 C19.1,21 20,20.1 20,19 L20,17 L22,17 L22,15 L20,15 L20,13 L22,13 L22,11 L20,11 L20,9 L22,9 L22,9 Z M18,19 L4,19 L4,5 L18,5 L18,19 L18,19 Z M6,13 L11,13 L11,17 L6,17 L6,13 Z M12,7 L16,7 L16,10 L12,10 L12,7 Z M6,7 L11,7 L11,12 L6,12 L6,7 Z M12,11 L16,11 L16,17 L12,17 L12,11 Z", 13654 id: "news" 13655}, null, null, 0, 1), 13656 marko_node3 = marko_createElement("g", { 13657 id: "icon/news", 13658 stroke: "none", 13659 "stroke-width": "1", 13660 fill: "none", 13661 "fill-rule": "evenodd" 13662}, "4", null, 2, 1, { 13663 i: marko_const_nextId() 13664}).e("mask", { 13665 id: "mask-2", 13666 fill: "white" 13667}, null, null, 1, 1).e("use", { 13668 "xlink:href": "#news" 13669}, null, null, 0, 1).e("use", { 13670 id: "Mask", 13671 fill: "#000", 13672 "xlink:href": "#news" 13673}, null, null, 0, 1); 13674 13675function render(input, out, __component, component, state) { 13676 var data = input; 13677 13678 out.n(marko_node0, component); 13679 13680 out.n(marko_node1, component); 13681 13682 out.n(marko_node2, component); 13683 13684 out.n(marko_node3, component); 13685} 13686 13687marko_template._ = marko_renderer(render, { 13688 am_: true, 13689 _l_: marko_componentType 13690}); 13691 13692marko_template.Component = marko_defineComponent({}, marko_template._); 13693}); 13694$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/link.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 13695"use strict"; 13696 13697var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13698 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13699 marko_registerComponent = components_helpers.rc, 13700 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/link.marko", function () { 13701 return module.exports; 13702}), 13703 marko_renderer = components_helpers.r, 13704 marko_defineComponent = components_helpers.c, 13705 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13706 marko_createElement = marko_helpers.e, 13707 marko_const = marko_helpers.const, 13708 marko_const_nextId = marko_const("cf6a21"), 13709 marko_node0 = marko_createElement("svg", { 13710 width: "18", 13711 height: "18", 13712 viewBox: "0 0 18 18", 13713 fill: "none", 13714 xmlns: "http://www.w3.org/2000/svg" 13715}, "0", null, 2, 1, { 13716 i: marko_const_nextId() 13717}).e("path", { 13718 "fill-rule": "evenodd", 13719 "clip-rule": "evenodd", 13720 d: "M3.27242 14.7276C4.48158 15.9367 6.44733 15.9367 7.65649 14.7276L10.4849 11.8991L11.8284 13.2426L8.99999 16.0711C7.04837 18.0227 3.88054 18.0227 1.92892 16.0711C-0.0226938 14.1195 -0.0226938 10.9516 1.92892 9L4.75735 6.17157L6.10085 7.51508L3.27242 10.3435C2.06327 11.5527 2.06327 13.5184 3.27242 14.7276ZM6.87867 12.5355L5.46446 11.1213L11.1213 5.46447L12.5355 6.87868L6.87867 12.5355ZM8.99999 1.92893C10.9516 -0.0226823 14.1194 -0.0226823 16.0711 1.92893C18.0227 3.88055 18.0227 7.04839 16.0711 9L13.2426 11.8284L11.8991 10.4849L14.7276 7.6565C15.9367 6.44734 15.9367 4.48159 14.7276 3.27244C13.5184 2.06328 11.5526 2.06328 10.3435 3.27244L7.51506 6.10086L6.17156 4.75736L8.99999 1.92893Z", 13721 fill: "url(#paint0_linear)" 13722}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 13723 id: "paint0_linear", 13724 x1: "0.46521", 13725 y1: "9", 13726 x2: "17.5348", 13727 y2: "9", 13728 gradientUnits: "userSpaceOnUse" 13729}, null, null, 2, 1).e("stop", { 13730 "stop-color": "#FF9000" 13731}, null, null, 0, 1).e("stop", { 13732 offset: "1", 13733 "stop-color": "#FFD33A" 13734}, null, null, 0, 1); 13735 13736function render(input, out, __component, component, state) { 13737 var data = input; 13738 13739 out.n(marko_node0, component); 13740} 13741 13742marko_template._ = marko_renderer(render, { 13743 am_: true, 13744 _l_: marko_componentType 13745}); 13746 13747marko_template.Component = marko_defineComponent({}, marko_template._); 13748}); 13749$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/offer.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
13749[email protected] - DO NOT EDIT 13750"use strict"; 13751 13752var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13753 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13754 marko_registerComponent = components_helpers.rc, 13755 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/offer.marko", function () { 13756 return module.exports; 13757}), 13758 marko_renderer = components_helpers.r, 13759 marko_defineComponent = components_helpers.c, 13760 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13761 marko_createElement = marko_helpers.e, 13762 marko_const = marko_helpers.const, 13763 marko_const_nextId = marko_const("b88d31"), 13764 marko_node0 = marko_createElement("svg", { 13765 width: "24", 13766 height: "24", 13767 viewBox: "0 0 24 24", 13768 fill: "none", 13769 xmlns: "http://www.w3.org/2000/svg" 13770}, "0", null, 2, 1, { 13771 i: marko_const_nextId() 13772}).e("path", { 13773 "fill-rule": "evenodd", 13774 "clip-rule": "evenodd", 13775 d: "M4 6H2V20C2 21.1 2.9 22 4 22H18V20H4V6ZM20 2H8C6.9 2 6 2.9 6 4V16C6 17.1 6.9 18 8 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM19 11H9V9H19V11ZM15 15H9V13H15V15ZM19 7H9V5H19V7Z", 13776 fill: "url(#paint0_linear)" 13777}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 13778 id: "paint0_linear", 13779 x1: "2", 13780 y1: "12", 13781 x2: "22", 13782 y2: "12", 13783 gradientUnits: "userSpaceOnUse" 13784}, null, null, 2, 1).e("stop", { 13785 "stop-color": "#FF9000" 13786}, null, null, 0, 1).e("stop", { 13787 offset: "1", 13788 "stop-color": "#FFD33A" 13789}, null, null, 0, 1); 13790 13791function render(input, out, __component, component, state) { 13792 var data = input; 13793 13794 out.n(marko_node0, component); 13795} 13796 13797marko_template._ = marko_renderer(render, { 13798 am_: true, 13799 _l_: marko_componentType 13800}); 13801 13802marko_template.Component = marko_defineComponent({}, marko_template._); 13803}); 13804$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/postback.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 13805"use strict"; 13806 13807var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13808 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13809 marko_registerComponent = components_helpers.rc, 13810 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/postback.marko", function () { 13811 return module.exports; 13812}), 13813 marko_renderer = components_helpers.r, 13814 marko_defineComponent = components_helpers.c, 13815 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13816 marko_createElement = marko_helpers.e, 13817 marko_const = marko_helpers.const, 13818 marko_const_nextId = marko_const("9b5484"), 13819 marko_node0 = marko_createElement("svg", { 13820 width: "18", 13821 height: "18", 13822 viewBox: "0 0 18 18", 13823 fill: "none", 13824 xmlns: "http://www.w3.org/2000/svg" 13825}, "0", null, 6, 1, { 13826 i: marko_const_nextId() 13827}).e("path", { 13828 d: "M0 6V2C0 0.9 0.9 0 2 0H6V2H2V6H0Z", 13829 fill: "url(#paint0_linear)" 13830}, null, null, 0, 1).e("path", { 13831 d: "M12 16H16V12H18V16C18 17.1 17.1 18 16 18H12V16Z", 13832 fill: "url(#paint1_linear)" 13833}, null, null, 0, 1).e("path", { 13834 d: "M10.4849 11.8991L7.6565 14.7276C6.44734 15.9367 4.48159 15.9367 3.27244 14.7276C2.06328 13.5184 2.06328 11.5527 3.27244 10.3435L6.10086 7.51508L4.75736 6.17157L1.92893 9C-0.0226825 10.9516 -0.0226825 14.1195 1.92893 16.0711C3.88055 18.0227 7.04839 18.0227 9 16.0711L11.8284 13.2426L10.4849 11.8991Z", 13835 fill: "url(#paint2_linear)" 13836}, null, null, 0, 1).e("path", { 13837 d: "M11.1213 5.46447L5.46447 11.1213L6.87868 12.5355L12.5355 6.87868L11.1213 5.46447Z", 13838 fill: "url(#paint3_linear)" 13839}, null, null, 0, 1).e("path", {
13840 d: "M16.0711 1.92893C14.1195 -0.0226825 10.9516 -0.0226825 9 1.92893L6.17157 4.75736L7.51508 6.10086L10.3435 3.27244C11.5527 2.06328 13.5184 2.06328 14.7276 3.27244C15.9367 4.48159 15.9367 6.44734 14.7276 7.6565L11.8991 10.4849L13.2426 11.8284L16.0711 9C18.0227 7.04839 18.0227 3.88055 16.0711 1.92893Z", 13841 fill: "url(#paint4_linear)" 13842}, null, null, 0, 1).e("defs", null, null, null, 5, 1).e("linearGradient", { 13843 id: "paint0_linear", 13844 x1: "0", 13845 y1: "9", 13846 x2: "18", 13847 y2: "9", 13848 gradientUnits: "userSpaceOnUse" 13849}, null, null, 2, 1).e("stop", { 13850 "stop-color": "#FF9000" 13851}, null, null, 0, 1).e("stop", { 13852 offset: "1", 13853 "stop-color": "#FFD33A" 13854}, null, null, 0, 1).e("linearGradient", { 13855 id: "paint1_linear", 13856 x1: "0", 13857 y1: "9", 13858 x2: "18", 13859 y2: "9", 13860 gradientUnits: "userSpaceOnUse" 13861}, null, null, 2, 1).e("stop", { 13862 "stop-color": "#FF9000" 13863}, null, null, 0, 1).e("stop", { 13864 offset: "1", 13865 "stop-color": "#FFD33A" 13866}, null, null, 0, 1).e("linearGradient", { 13867 id: "paint2_linear", 13868 x1: "0", 13869 y1: "9", 13870 x2: "18", 13871 y2: "9", 13872 gradientUnits: "userSpaceOnUse" 13873}, null, null, 2, 1).e("stop", { 13874 "stop-color": "#FF9000" 13875}, null, null, 0, 1).e("stop", { 13876 offset: "1", 13877 "stop-color": "#FFD33A" 13878}, null, null, 0, 1).e("linearGradient", { 13879 id: "paint3_linear", 13880 x1: "0", 13881 y1: "9", 13882 x2: "18", 13883 y2: "9", 13884 gradientUnits: "userSpaceOnUse" 13885}, null, null, 2, 1).e("stop", { 13886 "stop-color": "#FF9000" 13887}, null, null, 0, 1).e("stop", { 13888 offset: "1", 13889 "stop-color": "#FFD33A" 13890}, null, null, 0, 1).e("linearGradient", { 13891 id: "paint4_linear", 13892 x1: "0", 13893 y1: "9", 13894 x2: "18", 13895 y2: "9", 13896 gradientUnits: "userSpaceOnUse" 13897}, null, null, 2, 1).e("stop", { 13898 "stop-color": "#FF9000" 13899}, null, null, 0, 1).e("stop", { 13900 offset: "1", 13901 "stop-color": "#FFD33A" 13902}, null, null, 0, 1); 13903 13904function render(input, out, __component, component, state) { 13905 var data = input; 13906 13907 out.n(marko_node0, component); 13908} 13909 13910marko_template._ = marko_renderer(render, { 13911 am_: true, 13912 _l_: marko_componentType 13913}); 13914 13915marko_template.Component = marko_defineComponent({}, marko_template._); 13916}); 13917$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/report.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 13918"use strict"; 13919 13920var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13921 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13922 marko_registerComponent = components_helpers.rc, 13923 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/report.marko", function () { 13924 return module.exports; 13925}), 13926 marko_renderer = components_helpers.r, 13927 marko_defineComponent = components_helpers.c, 13928 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13929 marko_createElement = marko_helpers.e, 13930 marko_const = marko_helpers.const, 13931 marko_const_nextId = marko_const("be088d"), 13932 marko_node0 = marko_createElement("svg", { 13933 width: "18", 13934 height: "18", 13935 viewBox: "0 0 18 18", 13936 fill: "none", 13937 xmlns: "http://www.w3.org/2000/svg" 13938}, "0", null, 2, 1, { 13939 i: marko_const_nextId() 13940}).e("path", { 13941 "fill-rule": "evenodd", 13942 "clip-rule": "evenodd", 13943 d: "M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0ZM6 14H4V7H6V14ZM10 14H8V4H10V14ZM14 14H12V10H14V14Z", 13944 fill: "url(#paint0_linear)" 13945}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 13946 id: "paint0_linear", 13947 x1: "0", 13948 y1: "9", 13949 x2: "18", 13950 y2: "9", 13951 gradientUnits: "userSpaceOnUse" 13952}, null, null, 2, 1).e("stop", { 13953 "stop-color": "#FF9000" 13954}, null, null, 0, 1).e("stop", { 13955 offset: "1", 13956 "stop-color": "#FFD33A" 13957}, null, null, 0, 1); 13958 13959function render(input, out, __component, component, state) { 13960 var data = input; 13961 13962 out.n(marko_node0, component); 13963} 13964 13965marko_template._ = marko_renderer(render, { 13966 am_: true, 13967 _l_: marko_componentType 13968}); 13969 13970marko_template.Component = marko_defineComponent({}, marko_template._); 13971}); 13972$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/support.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
13972[email protected] - DO NOT EDIT 13973"use strict"; 13974 13975var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 13976 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 13977 marko_registerComponent = components_helpers.rc, 13978 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/support.marko", function () { 13979 return module.exports; 13980}), 13981 marko_renderer = components_helpers.r, 13982 marko_defineComponent = components_helpers.c, 13983 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 13984 marko_createElement = marko_helpers.e, 13985 marko_const = marko_helpers.const, 13986 marko_const_nextId = marko_const("c1c520"), 13987 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 13988 i: marko_const_nextId() 13989}).t("icon/support"), 13990 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 13991 i: marko_const_nextId() 13992}).t("Created with Sketch."), 13993 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 13994 i: marko_const_nextId() 13995}).e("path", { 13996 d: "M16.5,12 C17.88,12 18.99,10.88 18.99,9.5 C18.99,8.12 17.88,7 16.5,7 C15.12,7 14,8.12 14,9.5 C14,10.88 15.12,12 16.5,12 L16.5,12 Z M9,11 C10.66,11 11.99,9.66 11.99,8 C11.99,6.34 10.66,5 9,5 C7.34,5 6,6.34 6,8 C6,9.66 7.34,11 9,11 L9,11 Z M16.5,14 C14.67,14 11,14.92 11,16.75 L11,19 L22,19 L22,16.75 C22,14.92 18.33,14 16.5,14 L16.5,14 Z M9,13 C6.67,13 2,14.17 2,16.5 L2,19 L9,19 L9,16.75 C9,15.9 9.33,14.41 11.37,13.28 C10.5,13.1 9.66,13 9,13 L9,13 Z",
13997 id: "support" 13998}, null, null, 0, 1), 13999 marko_node3 = marko_createElement("g", { 14000 id: "icon/support", 14001 stroke: "none", 14002 "stroke-width": "1", 14003 fill: "none", 14004 "fill-rule": "evenodd" 14005}, "4", null, 2, 1, { 14006 i: marko_const_nextId() 14007}).e("mask", { 14008 id: "mask-2", 14009 fill: "white" 14010}, null, null, 1, 1).e("use", { 14011 "xlink:href": "#support" 14012}, null, null, 0, 1).e("use", { 14013 id: "Mask", 14014 fill: "#000000", 14015 "xlink:href": "#support" 14016}, null, null, 0, 1); 14017 14018function render(input, out, __component, component, state) { 14019 var data = input; 14020 14021 out.n(marko_node0, component); 14022 14023 out.n(marko_node1, component); 14024 14025 out.n(marko_node2, component); 14026 14027 out.n(marko_node3, component); 14028} 14029 14030marko_template._ = marko_renderer(render, { 14031 am_: true, 14032 _l_: marko_componentType 14033}); 14034 14035marko_template.Component = marko_defineComponent({}, marko_template._); 14036}); 14037$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/profile.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14038"use strict"; 14039 14040var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14041 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14042 marko_registerComponent = components_helpers.rc, 14043 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/profile.marko", function () { 14044 return module.exports; 14045}), 14046 marko_renderer = components_helpers.r, 14047 marko_defineComponent = components_helpers.c, 14048 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14049 marko_createElement = marko_helpers.e, 14050 marko_const = marko_helpers.const, 14051 marko_const_nextId = marko_const("07a4c2"), 14052 marko_node0 = marko_createElement("svg", { 14053 width: "20", 14054 height: "20", 14055 viewBox: "0 0 20 20", 14056 fill: "none", 14057 xmlns: "http://www.w3.org/2000/svg" 14058}, "0", null, 2, 1, { 14059 i: marko_const_nextId() 14060}).e("path", { 14061 "fill-rule": "evenodd", 14062 "clip-rule": "evenodd", 14063 d: "M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 3C11.66 3 13 4.34 13 6C13 7.66 11.66 9 10 9C8.34 9 7 7.66 7 6C7 4.34 8.34 3 10 3ZM10 17.2C7.5 17.2 5.29 15.92 4 13.98C4.03 11.99 8 10.9 10 10.9C11.99 10.9 15.97 11.99 16 13.98C14.71 15.92 12.5 17.2 10 17.2Z", 14064 fill: "url(#paint0_linear)" 14065}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 14066 id: "paint0_linear", 14067 x1: "0", 14068 y1: "10", 14069 x2: "20", 14070 y2: "10", 14071 gradientUnits: "userSpaceOnUse" 14072}, null, null, 2, 1).e("stop", { 14073 "stop-color": "#FF9000" 14074}, null, null, 0, 1).e("stop", { 14075 offset: "1", 14076 "stop-color": "#FFD33A" 14077}, null, null, 0, 1); 14078 14079function render(input, out, __component, component, state) { 14080 var data = input; 14081 14082 out.n(marko_node0, component); 14083} 14084 14085marko_template._ = marko_renderer(render, { 14086 am_: true, 14087 _l_: marko_componentType 14088}); 14089 14090marko_template.Component = marko_defineComponent({}, marko_template._); 14091}); 14092$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/logout.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14093"use strict"; 14094 14095var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14096 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14097 marko_registerComponent = components_helpers.rc, 14098 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/logout.marko", function () { 14099 return module.exports; 14100}), 14101 marko_renderer = components_helpers.r, 14102 marko_defineComponent = components_helpers.c, 14103 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14104 marko_createElement = marko_helpers.e, 14105 marko_const = marko_helpers.const, 14106 marko_const_nextId = marko_const("0b549d"), 14107 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14108 i: marko_const_nextId() 14109}).t("icon/log out"), 14110 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14111 i: marko_const_nextId() 14112}).t("Created with Sketch."), 14113 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 14114 i: marko_const_nextId() 14115}).e("path", { 14116 d: "M13,3 L11,3 L11,13 L13,13 L13,3 L13,3 Z M17.83,5.17 L16.41,6.59 C1
141167.99,7.86 19,9.81 19,12 C19,15.87 15.87,19 12,19 C8.13,19 5,15.87 5,12 C5,9.81 6.01,7.86 7.58,6.58 L6.17,5.17 C4.23,6.82 3,9.26 3,12 C3,16.97 7.03,21 12,21 C16.97,21 21,16.97 21,12 C21,9.26 19.77,6.82 17.83,5.17 L17.83,5.17 Z", 14117 id: "logout" 14118}, null, null, 0, 1), 14119 marko_node3 = marko_createElement("g", { 14120 id: "icon/log-out", 14121 stroke: "none", 14122 "stroke-width": "1", 14123 fill: "none", 14124 "fill-rule": "evenodd" 14125}, "4", null, 2, 1, { 14126 i: marko_const_nextId() 14127}).e("mask", { 14128 id: "mask-2", 14129 fill: "white" 14130}, null, null, 1, 1).e("use", { 14131 "xlink:href": "#logout" 14132}, null, null, 0, 1).e("use", { 14133 id: "Mask", 14134 fill: "#000", 14135 "xlink:href": "#logout" 14136}, null, null, 0, 1); 14137 14138function render(input, out, __component, component, state) { 14139 var data = input; 14140 14141 out.n(marko_node0, component); 14142 14143 out.n(marko_node1, component); 14144 14145 out.n(marko_node2, component); 14146 14147 out.n(marko_node3, component); 14148} 14149 14150marko_template._ = marko_renderer(render, { 14151 am_: true, 14152 _l_: marko_componentType 14153}); 14154 14155marko_template.Component = marko_defineComponent({}, marko_template._); 14156}); 14157$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/right.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14158"use strict"; 14159 14160var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14161 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14162 marko_registerComponent = components_helpers.rc, 14163 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/right.marko", function () { 14164 return module.exports; 14165}), 14166 marko_renderer = components_helpers.r, 14167 marko_defineComponent = components_helpers.c, 14168 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14169 marko_createElement = marko_helpers.e, 14170 marko_const = marko_helpers.const, 14171 marko_const_nextId = marko_const("f12af9"), 14172 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14173 i: marko_const_nextId() 14174}).t("icon/right"), 14175 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14176 i: marko_const_nextId() 14177}).t("Created with Sketch."), 14178 marko_node2 = marko_createElement("svg", { 14179 width: "8", 14180 height: "12", 14181 viewBox: "0 0 8 12", 14182 xmlns: "http://www.w3.org/2000/svg" 14183}, "2", null, 1, 1, { 14184 i: marko_const_nextId() 14185}).e("path", { 14186 "fill-rule": "evenodd", 14187 "clip-rule": "evenodd", 14188 d: "M1.99984 0L0.589844 1.41L5.16984 6L0.589844 10.59L1.99984 12L7.99984 6L1.99984 0Z" 14189}, null, null, 0, 1); 14190 14191function render(input, out, __component, component, state) { 14192 var data = input; 14193 14194 out.n(marko_node0, component); 14195 14196 out.n(marko_node1, component); 14197 14198 out.n(marko_node2, component); 14199} 14200 14201marko_template._ = marko_renderer(render, { 14202 am_: true, 14203 _l_: marko_componentType 14204}); 14205 14206marko_template.Component = marko_defineComponent({}, marko_template._); 14207}); 14208$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/left.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14209"use strict"; 14210 14211var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14212 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14213 marko_registerComponent = components_helpers.rc, 14214 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/left.marko", function () { 14215 return module.exports; 14216}), 14217 marko_renderer = components_helpers.r, 14218 marko_defineComponent = components_helpers.c, 14219 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14220 marko_createElement = marko_helpers.e, 14221 marko_const = marko_helpers.const, 14222 marko_const_nextId = marko_const("01962e"), 14223 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14224 i: marko_const_nextId() 14225}).t("icon/left"), 14226 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14227 i: marko_const_nextId() 14228}).t("Created with Sketch."), 14229 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 14230 i: marko_const_nextId() 14231}).e("polygon", { 14232 id: "left", 14233 points: "15.41 7.41 14 6 8 12 14 18 15.41 16.59 10.83 12" 14234}, null, null, 0, 1), 14235 marko_attrs0 = { 14236 id: "icon/left", 14237 stroke: "none", 14238 "stroke-width": "1", 14239 fill: "none", 14240 "fill-rule": "evenodd" 14241}, 14242 marko_node3 = marko_createElement("mask", { 14243 id: "mask-2", 14244 fill: "white" 14245}, "5", null, 1, 1, { 14246 i: marko_const_nextId() 14247}).e("use", { 14248 "xlink:href": "#left" 14249}, null, null, 0, 1); 14250 14251function render(input, out, __component, component, state) { 14252 var data = input; 14253 14254 out.n(marko_node0, component); 14255 14256 out.n(marko_node1, component); 14257 14258 out.n(marko_node2, component); 14259 14260 out.e("g", marko_attrs0, "4", component, 2, 1).n(marko_node3, component).e("use", { 14261 id: "Mask", 14262 fill: input.fillColor, 14263 "xlink:href": "#left" 14264 }, "7", component, 0, 1); 14265} 14266 14267marko_template._ = marko_renderer(render, { 14268 am_: true, 14269 _l_: marko_componentType 14270}); 14271 14272marko_template.Component = marko_defineComponent({}, marko_template._); 14273}); 14274$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/up.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
14274[email protected] - DO NOT EDIT 14275"use strict"; 14276 14277var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14278 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14279 marko_registerComponent = components_helpers.rc, 14280 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/up.marko", function () { 14281 return module.exports; 14282}), 14283 marko_renderer = components_helpers.r, 14284 marko_defineComponent = components_helpers.c, 14285 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14286 marko_createElement = marko_helpers.e, 14287 marko_const = marko_helpers.const, 14288 marko_const_nextId = marko_const("10e657"), 14289 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14290 i: marko_const_nextId() 14291}).t("icon/up"), 14292 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14293 i: marko_const_nextId() 14294}).t("Created with Sketch."), 14295 marko_node2 = marko_createElement("svg", { 14296 width: "12", 14297 height: "8", 14298 fill: "none", 14299 xmlns: "http://www.w3.org/2000/svg" 14300}, "2", null, 1, 1, { 14301 i: marko_const_nextId() 14302}).e("path", { 14303 "fill-rule": "evenodd", 14304 "clip-rule": "evenodd", 14305 d: "M6 0L0 6L1.41 7.41L6 2.83L10.59 7.41L12 6L6 0Z", 14306 fill: "black" 14307}, null, null, 0, 1); 14308 14309function render(input, out, __component, component, state) { 14310 var data = input; 14311 14312 out.n(marko_node0, component); 14313 14314 out.n(marko_node1, component); 14315 14316 out.n(marko_node2, component); 14317} 14318 14319marko_template._ = marko_renderer(render, { 14320 am_: true, 14321 _l_: marko_componentType 14322}); 14323 14324marko_template.Component = marko_defineComponent({}, marko_template._); 14325}); 14326$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/down.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14327"use strict"; 14328 14329var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14330 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14331 marko_registerComponent = components_helpers.rc, 14332 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/down.marko", function () { 14333 return module.exports; 14334}), 14335 marko_renderer = components_helpers.r, 14336 marko_defineComponent = components_helpers.c, 14337 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14338 marko_createElement = marko_helpers.e, 14339 marko_const = marko_helpers.const, 14340 marko_const_nextId = marko_const("1cbc4f"), 14341 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14342 i: marko_const_nextId() 14343}).t("icon/up"), 14344 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14345 i: marko_const_nextId() 14346}).t("Created with Sketch."), 14347 marko_node2 = marko_createElement("svg", { 14348 width: "12", 14349 height: "8", 14350 fill: "none", 14351 xmlns: "http://www.w3.org/2000/svg" 14352}, "2", null, 1, 1, { 14353 i: marko_const_nextId() 14354}).e("path", { 14355 "fill-rule": "evenodd", 14356 "clip-rule": "evenodd", 14357 d: "M10.59 0.590088L6 5.17009L1.41 0.590088L0 2.00009L6 8.00009L12 2.00009L10.59 0.590088Z", 14358 fill: "black" 14359}, null, null, 0, 1); 14360 14361function render(input, out, __component, component, state) { 14362 var data = input; 14363 14364 out.n(marko_node0, component); 14365 14366 out.n(marko_node1, component); 14367 14368 out.n(marko_node2, component); 14369} 14370 14371marko_template._ = marko_renderer(render, { 14372 am_: true, 14373 _l_: marko_componentType 14374}); 14375 14376marko_template.Component = marko_defineComponent({}, marko_template._); 14377}); 14378$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/close.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14379"use strict"; 14380 14381var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14382 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14383 marko_registerComponent = components_helpers.rc, 14384 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/close.marko", function () { 14385 return module.exports; 14386}), 14387 marko_renderer = components_helpers.r, 14388 marko_defineComponent = components_helpers.c, 14389 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14390 marko_createElement = marko_helpers.e, 14391 marko_const = marko_helpers.const, 14392 marko_const_nextId = marko_const("c4d075"), 14393 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14394 i: marko_const_nextId() 14395}).t("icon/close"), 14396 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14397 i: marko_const_nextId() 14398}).t("Created with Sketch."), 14399 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 14400 i: marko_const_nextId() 14401}).e("polygon", { 14402 id: "close", 14403 points: "19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12" 14404}, null, null, 0, 1), 14405 marko_node3 = marko_createElement("g", { 14406 id: "icon/close", 14407 stroke: "none", 14408 "stroke-width": "1", 14409 fill: "none", 14410 "fill-rule": "evenodd" 14411}, "4", null, 2, 1, { 14412 i: marko_const_nextId() 14413}).e("mask", { 14414 id: "mask-2", 14415 fill: "white" 14416}, null, null, 1, 1).e("use", { 14417 "xlink:href": "#close" 14418}, null, null, 0, 1).e("use", { 14419 id: "Mask", 14420 fill: "#000", 14421 "xlink:href": "#close" 14422}, null, null, 0, 1); 14423 14424function render(input, out, __component, component, state) { 14425 var data = input; 14426 14427 out.n(marko_node0, component); 14428 14429 out.n(marko_node1, component); 14430 14431 out.n(marko_node2, component); 14432 14433 out.n(marko_node3, component); 14434} 14435 14436marko_template._ = marko_renderer(render, { 14437 am_: true, 14438 _l_: marko_componentType 14439}); 14440 14441marko_template.Component = marko_defineComponent({}, marko_template._); 14442}); 14443$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/info-outline.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
14443[email protected] - DO NOT EDIT 14444"use strict"; 14445 14446var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14447 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14448 marko_registerComponent = components_helpers.rc, 14449 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/info-outline.marko", function () { 14450 return module.exports; 14451}), 14452 marko_renderer = components_helpers.r, 14453 marko_defineComponent = components_helpers.c, 14454 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14455 marko_createElement = marko_helpers.e, 14456 marko_const = marko_helpers.const, 14457 marko_const_nextId = marko_const("3a3a26"), 14458 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14459 i: marko_const_nextId() 14460}).t("icon/info-outline"), 14461 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14462 i: marko_const_nextId() 14463}).t("Created with Sketch."), 14464 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 14465 i: marko_const_nextId() 14466}).e("path", { 14467 d: "M11,17 L13,17 L13,11 L11,11 L11,17 L11,17 Z M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 L12,2 Z M12,20 C7.59,20 4,16.41 4,12 C4,7.59 7.59,4 12,4 C16.41,4 20,7.59 20,12 C20,16.41 16.41,20 12,20 L12,20 Z M11,9 L13,9 L13,7 L11,7 L11,9 L11,9 Z", 14468 id: "info-outline" 14469}, null, null, 0, 1), 14470 marko_node3 = marko_createElement("g", { 14471 id: "icon/info-outline", 14472 stroke: "none", 14473 "stroke-width": "1", 14474 fill: "none", 14475 "fill-rule": "evenodd" 14476}, "4", null, 2, 1, { 14477 i: marko_const_nextId() 14478}).e("mask", { 14479 id: "mask-2", 14480 fill: "white" 14481}, null, null, 1, 1).e("use", { 14482 "xlink:href": "#info-outline" 14483}, null, null, 0, 1).e("use", { 14484 id: "Mask", 14485 fill: "#000", 14486 "xlink:href": "#info-outline" 14487}, null, null, 0, 1); 14488 14489function render(input, out, __component, component, state) { 14490 var data = input; 14491 14492 out.n(marko_node0, component); 14493 14494 out.n(marko_node1, component); 14495 14496 out.n(marko_node2, component); 14497 14498 out.n(marko_node3, component); 14499} 14500 14501marko_template._ = marko_renderer(render, { 14502 am_: true, 14503 _l_: marko_componentType 14504}); 14505 14506marko_template.Component = marko_defineComponent({}, marko_template._); 14507}); 14508$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/notification-blank.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14509"use strict"; 14510 14511var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14512 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14513 marko_registerComponent = components_helpers.rc, 14514 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/notification-blank.marko", function () { 14515 return module.exports; 14516}), 14517 marko_renderer = components_helpers.r, 14518 marko_defineComponent = components_helpers.c, 14519 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14520 marko_createElement = marko_helpers.e, 14521 marko_const = marko_helpers.const, 14522 marko_const_nextId = marko_const("21c51c"), 14523 marko_node0 = marko_createElement("path", { 14524 d: "M12,21.5 C13.1,21.5 14,20.6 14,19.5 L10,19.5 C10,20.6 10.89,21.5 12,21.5 L12,21.5 Z M18,15.5 L18,10.5 C18,7.43 16.36,4.86 13.5,4.18 L13.5,3.5 C13.5,2.67 12.83,2 12,2 C11.17,2 10.5,2.67 10.5,3.5 L10.5,4.18 C7.63,4.86 6,7.42 6,10.5 L6,15.5 L4,17.5 L4,18.5 L20,18.5 L20,17.5 L18,15.5 L18,15.5 Z", 14525 fill: "#000" 14526}, "0", null, 0, 1, { 14527 i: marko_const_nextId() 14528}); 14529 14530function render(input, out, __component, component, state) { 14531 var data = input; 14532 14533 out.n(marko_node0, component); 14534} 14535 14536marko_template._ = marko_renderer(render, { 14537 am_: true, 14538 _l_: marko_componentType 14539}); 14540 14541marko_template.Component = marko_defineComponent({}, marko_template._); 14542}); 14543$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/notification-new.mark
14543o", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14544"use strict"; 14545 14546var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14547 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14548 marko_registerComponent = components_helpers.rc, 14549 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/notification-new.marko", function () { 14550 return module.exports; 14551}), 14552 marko_renderer = components_helpers.r, 14553 marko_defineComponent = components_helpers.c, 14554 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14555 marko_createElement = marko_helpers.e, 14556 marko_const = marko_helpers.const, 14557 marko_const_nextId = marko_const("e28641"), 14558 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14559 i: marko_const_nextId() 14560}).t("icon/notification alarm"), 14561 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14562 i: marko_const_nextId() 14563}).t("Created with Sketch."), 14564 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 14565 i: marko_const_nextId() 14566}).e("path", { 14567 d: "M7.58,4.08 L6.15,2.65 C3.75,4.48 2.17,7.3 2.03,10.5 L4.03,10.5 C4.18,7.85 5.54,5.53 7.58,4.08 L7.58,4.08 Z M19.97,10.5 L21.97,10.5 C21.82,7.3 20.24,4.48 17.85,2.65 L16.43,4.08 C18.45,5.53 19.82,7.85 19.97,10.5 L19.97,10.5 Z M18,11 C18,7.93 16.36,5.36 13.5,4.68 L13.5,4 C13.5,3.17 12.83,2.5 12,2.5 C11.17,2.5 10.5,3.17 10.5,4 L10.5,4.68 C7.63,5.36 6,7.92 6,11 L6,16 L4,18 L4,19 L20,19 L20,18 L18,16 L18,11 L18,11 Z M12,22 C12.14,22 12.27,21.99 12.4,21.96 C13.05,21.82 13.58,21.38 13.84,20.78 C13.94,20.54 13.99,20.28 13.99,20 L9.99,20 C10,21.1 10.89,22 12,22 L12,22 Z", 14568 id: "notif-new" 14569}, null, null, 0, 1), 14570 marko_node3 = marko_createElement("g", { 14571 id: "icon/notification-alarm", 14572 stroke: "none", 14573 "stroke-width": "1", 14574 fill: "none", 14575 "fill-rule": "evenodd" 14576}, "4", null, 2, 1, { 14577 i: marko_const_nextId() 14578}).e("mask", { 14579 id: "mask-2", 14580 fill: "white" 14581}, null, null, 1, 1).e("use", { 14582 "xlink:href": "#notif-new" 14583}, null, null, 0, 1).e("use", { 14584 id: "Mask", 14585 fill: "#000", 14586 "xlink:href": "#notif-new" 14587}, null, null, 0, 1); 14588 14589function render(input, out, __component, component, state) { 14590 var data = input; 14591 14592 out.n(marko_node0, component); 14593 14594 out.n(marko_node1, component); 14595 14596 out.n(marko_node2, component); 14597 14598 out.n(marko_node3, component); 14599} 14600 14601marko_template._ = marko_renderer(render, { 14602 am_: true, 14603 _l_: marko_componentType 14604}); 14605 14606marko_template.Component = marko_defineComponent({}, marko_template._); 14607}); 14608$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/contact.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14609"use strict"; 14610 14611var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14612 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14613 marko_registerComponent = components_helpers.rc, 14614 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/contact.marko", function () { 14615 return module.exports; 14616}), 14617 marko_renderer = components_helpers.r, 14618 marko_defineComponent = components_helpers.c, 14619 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14620 marko_createElement = marko_helpers.e, 14621 marko_const = marko_helpers.const, 14622 marko_const_nextId = marko_const("a97336"), 14623 marko_node0 = marko_createElement("svg", { 14624 width: "24", 14625 height: "24", 14626 viewBox: "2 0 24 24", 14627 fill: "none", 14628 xmlns: "http://www.w3.org/2000/svg" 14629}, "0", null, 2, 1, { 14630 i: marko_const_nextId() 14631}).e("path", { 14632 "fill-rule": "evenodd", 14633 "clip-rule": "evenodd", 14634 d: "M20 0H4V2H20V0ZM4 24H20V22H4V24ZM20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4ZM12 6.75C13.24 6.75 14.25 7.76 14.25 9C14.25 10.24 13.24 11.25 12 11.25C10.76 11.25 9.75 10.24 9.75 9C9.75 7.76 10.76 6.75 12 6.75ZM17 17H7V15.5C7 13.83 10.33 13 12 13C13.67 13 17 13.83 17 15.5V17Z", 14635 fill: "url(#paint0_linear)" 14636}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 14637 id: "paint0_linear", 14638 x1: "2", 14639 y1: "12", 14640 x2: "22", 14641 y2: "12", 14642 gradientUnits: "userSpaceOnUse" 14643}, null, null, 2, 1).e("stop", { 14644 "stop-color": "#FF9000" 14645}, null, null, 0, 1).e("stop", { 14646 offset: "1", 14647 "stop-color": "#FFD33A" 14648}, null, null, 0, 1); 14649 14650function render(input, out, __component, component, state) { 14651 var data = input; 14652 14653 out.n(marko_node0, component); 14654} 14655 14656marko_template._ = marko_renderer(render, { 14657 am_: true, 14658 _l_: marko_componentType 14659}); 14660 14661marko_template.Component = marko_defineComponent({}, marko_template._); 14662}); 14663$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/delete.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
14663[email protected] - DO NOT EDIT 14664"use strict"; 14665 14666var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14667 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14668 marko_registerComponent = components_helpers.rc, 14669 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/delete.marko", function () { 14670 return module.exports; 14671}), 14672 marko_renderer = components_helpers.r, 14673 marko_defineComponent = components_helpers.c, 14674 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14675 marko_createElement = marko_helpers.e, 14676 marko_const = marko_helpers.const, 14677 marko_const_nextId = marko_const("18ec3c"), 14678 marko_node0 = marko_createElement("svg", { 14679 width: "24", 14680 height: "24", 14681 viewBox: "0 0 24 24", 14682 fill: "none", 14683 xmlns: "http://www.w3.org/2000/svg" 14684}, "0", null, 2, 1, { 14685 i: marko_const_nextId() 14686}).e("path", { 14687 "fill-rule": "evenodd", 14688 "clip-rule": "evenodd", 14689 d: "M6 19C6 20.1 6.9 21 8 21H16C17.1 21 18 20.1 18 19V7H6V19ZM19 4H15.5L14.5 3H9.5L8.5 4H5V6H19V4Z", 14690 fill: "url(#paint0_linear)" 14691}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 14692 id: "paint0_linear", 14693 x1: "5", 14694 y1: "12", 14695 x2: "19", 14696 y2: "12", 14697 gradientUnits: "userSpaceOnUse" 14698}, null, null, 2, 1).e("stop", { 14699 "stop-color": "#FF9000" 14700}, null, null, 0, 1).e("stop", { 14701 offset: "1", 14702 "stop-color": "#FFD33A" 14703}, null, null, 0, 1); 14704 14705function render(input, out, __component, component, state) { 14706 var data = input; 14707 14708 out.n(marko_node0, component); 14709} 14710 14711marko_template._ = marko_renderer(render, { 14712 am_: true, 14713 _l_: marko_componentType 14714}); 14715 14716marko_template.Component = marko_defineComponent({}, marko_template._); 14717}); 14718$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/sort.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14719"use strict"; 14720 14721var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14722 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14723 marko_registerComponent = components_helpers.rc, 14724 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/sort.marko", function () { 14725 return module.exports; 14726}), 14727 marko_renderer = components_helpers.r, 14728 marko_defineComponent = components_helpers.c, 14729 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14730 marko_createElement = marko_helpers.e, 14731 marko_const = marko_helpers.const, 14732 marko_const_nextId = marko_const("594055"), 14733 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14734 i: marko_const_nextId() 14735}).t("icon/max"), 14736 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14737 i: marko_const_nextId() 14738}).t("Created with Sketch."), 14739 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 14740 i: marko_const_nextId() 14741}).e("path", { 14742 d: "M11.59,5.83 L14.76,9 L16.17,7.59 L11.59,3 L7,7.59 L8.42,9 L11.59,5.83 L11.59,5.83 Z M11.59,18.17 L8.42,15 L7.01,16.41 L11.59,21 L16.18,16.41 L14.76,15 L11.59,18.17 L11.59,18.17 Z", 14743 id: "max" 14744}, null, null, 0, 1), 14745 marko_node3 = marko_createElement("g", { 14746 id: "icon/max", 14747 stroke: "none", 14748 "stroke-width": "1", 14749 fill: "none", 14750 "fill-rule": "evenodd" 14751}, "4", null, 2, 1, { 14752 i: marko_const_nextId() 14753}).e("mask", { 14754 id: "mask-2", 14755 fill: "white" 14756}, null, null, 1, 1).e("use", { 14757 "xlink:href": "#max" 14758}, null, null, 0, 1).e("use", { 14759 id: "Mask", 14760 fill: "#000", 14761 "xlink:href": "#max" 14762}, null, null, 0, 1); 14763 14764function render(input, out, __component, component, state) { 14765 var data = input; 14766 14767 out.n(marko_node0, component); 14768 14769 out.n(marko_node1, component); 14770 14771 out.n(marko_node2, component); 14772 14773 out.n(marko_node3, component); 14774} 14775 14776marko_template._ = marko_renderer(render, { 14777 am_: true, 14778 _l_: marko_componentType 14779}); 14780 14781marko_template.Component = marko_defineComponent({}, marko_template._); 14782}); 14783$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/download.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
14783[email protected] - DO NOT EDIT 14784"use strict"; 14785 14786var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14787 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14788 marko_registerComponent = components_helpers.rc, 14789 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/download.marko", function () { 14790 return module.exports; 14791}), 14792 marko_renderer = components_helpers.r, 14793 marko_defineComponent = components_helpers.c, 14794 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14795 marko_createElement = marko_helpers.e, 14796 marko_const = marko_helpers.const, 14797 marko_const_nextId = marko_const("2abf6b"), 14798 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14799 i: marko_const_nextId() 14800}).t("icon/download"), 14801 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14802 i: marko_const_nextId() 14803}).t("Created with Sketch."), 14804 marko_node2 = marko_createElement("svg", { 14805 width: "24", 14806 height: "24", 14807 xmlns: "http://www.w3.org/2000/svg" 14808}, "2", null, 1, 1, { 14809 i: marko_const_nextId() 14810}).e("path", { 14811 d: "M14,10 L16.9906311,10 C17.5566468,10 17.6812982,10.3187018 17.2881596,10.7118404 L12.7118404,15.2881596 C12.3225861,15.6774139 11.6812982,15.6812982 11.2881596,15.2881596 L6.71184039,10.7118404 C6.32258606,10.3225861 6.45190985,10 7.0093689,10 L10,10 L10,3 L14,3 L14,10 Z M5,18 L19,18 L19,20 L5,20 L5,18 Z", 14812 id: "download" 14813}, null, null, 0, 1); 14814 14815function render(input, out, __component, component, state) { 14816 var data = input; 14817 14818 out.n(marko_node0, component); 14819 14820 out.n(marko_node1, component); 14821 14822 out.n(marko_node2, component); 14823} 14824 14825marko_template._ = marko_renderer(render, { 14826 am_: true, 14827 _l_: marko_componentType 14828}); 14829 14830marko_template.Component = marko_defineComponent({}, marko_template._); 14831}); 14832$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/decline.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14833"use strict"; 14834 14835var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14836 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14837 marko_registerComponent = components_helpers.rc, 14838 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/decline.marko", function () { 14839 return module.exports; 14840}), 14841 marko_renderer = components_helpers.r, 14842 marko_defineComponent = components_helpers.c, 14843 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14844 marko_createElement = marko_helpers.e, 14845 marko_const = marko_helpers.const, 14846 marko_const_nextId = marko_const("db18c3"), 14847 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14848 i: marko_const_nextId() 14849}).t("icon/decline"), 14850 marko_node1 = marko_createElement("desc", null, "1", null, 1, 1, { 14851 i: marko_const_nextId() 14852}).t("Created with Sketch."), 14853 marko_node2 = marko_createElement("defs", null, "2", null, 1, 1, { 14854 i: marko_const_nextId() 14855}).e("path", { 14856 d: "M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 L12,2 Z M4,12 C4,7.58 7.58,4 12,4 C13.85,4 15.55,4.63 16.9,5.69 L5.69,16.9 C4.63,15.55 4,13.85 4,12 L4,12 Z M12,20 C10.15,20 8.45,19.37 7.1,18.31 L18.31,7.1 C19.37,8.45 20,10.15 20,12 C20,16.42 16.42,20 12,20 L12,20 Z", 14857 id: "decline" 14858}, null, null, 0, 1), 14859 marko_node3 = marko_createElement("g", { 14860 id: "icon/decline", 14861 stroke: "none", 14862 "stroke-width": "1", 14863 fill: "none", 14864 "fill-rule": "evenodd" 14865}, "4", null, 2, 1, { 14866 i: marko_const_nextId() 14867}).e("mask", { 14868 id: "mask-2", 14869 fill: "white" 14870}, null, null, 1, 1).e("use", { 14871 "xlink:href": "#decline" 14872}, null, null, 0, 1).e("use", { 14873 id: "Mask", 14874 fill: "#000", 14875 "xlink:href": "#decline" 14876}, null, null, 0, 1); 14877 14878function render(input, out, __component, component, state) { 14879 var data = input; 14880 14881 out.n(marko_node0, component); 14882 14883 out.n(marko_node1, component); 14884 14885 out.n(marko_node2, component); 14886 14887 out.n(marko_node3, component); 14888} 14889 14890marko_template._ = marko_renderer(render, { 14891 am_: true, 14892 _l_: marko_componentType 14893}); 14894 14895marko_template.Component = marko_defineComponent({}, marko_template._); 14896}); 14897$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/date.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
14897[email protected] - DO NOT EDIT 14898"use strict"; 14899 14900var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14901 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14902 marko_registerComponent = components_helpers.rc, 14903 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/date.marko", function () { 14904 return module.exports; 14905}), 14906 marko_renderer = components_helpers.r, 14907 marko_defineComponent = components_helpers.c, 14908 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14909 marko_createElement = marko_helpers.e, 14910 marko_const = marko_helpers.const, 14911 marko_const_nextId = marko_const("066f63"), 14912 marko_node0 = marko_createElement("svg", { 14913 width: "18", 14914 height: "20", 14915 viewBox: "0 0 18 20", 14916 fill: "none", 14917 xmlns: "http://www.w3.org/2000/svg" 14918}, "0", null, 2, 1, { 14919 i: marko_const_nextId() 14920}).e("path", { 14921 "fill-rule": "evenodd", 14922 "clip-rule": "evenodd", 14923 d: "M6 9H4V11H6V9ZM10 9H8V11H10V9ZM14 9H12V11H14V9ZM16 2H15V0H13V2H5V0H3V2H2C0.89 2 0.01 2.9 0.01 4L0 18C0 19.1 0.89 20 2 20H16C17.1 20 18 19.1 18 18V4C18 2.9 17.1 2 16 2ZM16 18H2V7H16V18Z", 14924 fill: "url(#paint0_linear)" 14925}, null, null, 0, 1).e("defs", null, null, null, 1, 1).e("linearGradient", { 14926 id: "paint0_linear", 14927 x1: "0", 14928 y1: "10", 14929 x2: "18", 14930 y2: "10", 14931 gradientUnits: "userSpaceOnUse" 14932}, null, null, 2, 1).e("stop", { 14933 "stop-color": "#FF9000" 14934}, null, null, 0, 1).e("stop", { 14935 offset: "1", 14936 "stop-color": "#FFD33A" 14937}, null, null, 0, 1); 14938 14939function render(input, out, __component, component, state) { 14940 var data = input; 14941 14942 out.n(marko_node0, component); 14943} 14944 14945marko_template._ = marko_renderer(render, { 14946 am_: true, 14947 _l_: marko_componentType 14948}); 14949 14950marko_template.Component = marko_defineComponent({}, marko_template._); 14951}); 14952$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/shield.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 14953"use strict"; 14954 14955var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 14956 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 14957 marko_registerComponent = components_helpers.rc, 14958 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/shield.marko", function () { 14959 return module.exports; 14960}), 14961 marko_renderer = components_helpers.r, 14962 marko_defineComponent = components_helpers.c, 14963 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 14964 marko_createElement = marko_helpers.e, 14965 marko_const = marko_helpers.const, 14966 marko_const_nextId = marko_const("a9a1d6"), 14967 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 14968 i: marko_const_nextId() 14969}).t("icon/shield"), 14970 marko_node1 = marko_createElement("svg", { 14971 width: "20", 14972 height: "20", 14973 viewBox: "0 0 24 24", 14974 xmlns: "http://www.w3.org/2000/svg" 14975}, "1", null, 1, 1, { 14976 i: marko_const_nextId() 14977}).e("path", { 14978 d: "M12.4472 22.8944C12.1657 23.0352 11.8343 23.0352 11.5528 22.8944C11.2759 22.756 10.8111 22.4987 10.22 22.1292C9.23988 21.5167 8.25994 20.8062 7.3415 20.0026C4.64576 17.6438 3 14.9694 3 12V4C3 3.54113 3.3123 3.14115 3.75746 3.02986L11.7575 1.02986C11.9167 0.990047 12.0833 0.990047 12.2425 1.02986L20.2425 3.02986C20.6877 3.14115 21 3.54113 21 4V12C21 14.9694 19.3542 17.6438 16.6585 20.0026C15.7401 20.8062 14.7601 21.5167 13.78 22.1292C13.1889 22.4987 12.7241 22.756 12.4472 22.8944ZM12.72 20.4333C13.6149 19.874 14.5099 19.225 15.3415 18.4974C17.6458 16.4812 19 14.2806 19 12V4.78078L12 3.03078L5 4.78078V12C5 14.2806 6.35424 16.4812 8.6585 18.4974C9.49006 19.225 10.3851 19.874 11.28 20.4333C11.5371 20.594 11.7786 20.7373 12 20.8628C12.2214 20.7373 12.4629 20.594 12.72 20.4333Z", 14979 fill: "black", 14980 "fill-opacity": "1" 14981}, null, null, 0, 1); 14982 14983function render(input, out, __component, component, state) { 14984 var data = input; 14985 14986 out.n(marko_node0, component); 14987 14988 out.n(marko_node1, component); 14989} 14990 14991marko_template._ = marko_renderer(render, { 14992 am_: true, 14993 _l_: marko_componentType 14994}); 14995 14996marko_template.Component = marko_defineComponent({}, marko_template._); 14997}); 14998$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/mail.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
14998[email protected] - DO NOT EDIT 14999"use strict"; 15000 15001var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15002 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15003 marko_registerComponent = components_helpers.rc, 15004 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/mail.marko", function () { 15005 return module.exports; 15006}), 15007 marko_renderer = components_helpers.r, 15008 marko_defineComponent = components_helpers.c, 15009 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15010 marko_createElement = marko_helpers.e, 15011 marko_const = marko_helpers.const, 15012 marko_const_nextId = marko_const("a2c00a"), 15013 marko_node0 = marko_createElement("TITLE", null, "0", null, 1, 0, { 15014 i: marko_const_nextId() 15015}).t("icon/shield"), 15016 marko_node1 = marko_createElement("svg", { 15017 width: "20", 15018 height: "20", 15019 viewBox: "0 0 24 24", 15020 fill: "none", 15021 xmlns: "http://www.w3.org/2000/svg" 15022}, "1", null, 1, 1, { 15023 i: marko_const_nextId() 15024}).e("path", { 15025 d: "M20.0001 3C21.6524 3 23.0001 4.34772 23.0001 6V18C23.0001 19.6523 21.6524 21 20.0001 21H4.00008C2.3478 21 1.00008 19.6523 1.00008 18V6C1.00008 4.34772 2.3478 3 4.00008 3H20.0001ZM21 7.92L12.5735 13.8192C12.2292 14.0603 11.7709 14.0603 11.4266 13.8192L3 7.921L3.00008 18C3.00008 18.5477 3.45237 19 4.00008 19H20.0001C20.5478 19 21.0001 18.5477 21.0001 18L21 7.92ZM20.0001 5H4.00008C3.61209 5 3.27198 5.22697 3.10661 5.55404L12.0001 11.7793L20.8936 5.55404C20.7282 5.22697 20.3881 5 20.0001 5Z", 15026 fill: "black", 15027 "fill-opacity": "1" 15028}, null, null, 0, 1); 15029 15030function render(input, out, __component, component, state) { 15031 var data = input; 15032 15033 out.n(marko_node0, component); 15034 15035 out.n(marko_node1, component); 15036} 15037 15038marko_template._ = marko_renderer(render, { 15039 am_: true, 15040 _l_: marko_componentType 15041}); 15042 15043marko_template.Component = marko_defineComponent({}, marko_template._); 15044}); 15045$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/web.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15046"use strict"; 15047 15048var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15049 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15050 marko_registerComponent = components_helpers.rc, 15051 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/web.marko", function () { 15052 return module.exports; 15053}), 15054 marko_renderer = components_helpers.r, 15055 marko_defineComponent = components_helpers.c, 15056 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15057 marko_createElement = marko_helpers.e, 15058 marko_const = marko_helpers.const, 15059 marko_const_nextId = marko_const("6f5969"), 15060 marko_node0 = marko_createElement("path", { 15061 "class": "icon-web", 15062 "fill-rule": "evenodd", 15063 "clip-rule": "evenodd", 15064 d: "M19 5H5C3.89543 5 3 5.89543 3 7V16H1V17C1 18.1046 1.89543 19 3 19H21C22.1046 19 23 18.1046 23 17V16H21V7C21 5.89543 20.1046 5 19 5ZM19 16H5V7H19V16Z", 15065 fill: "black", 15066 "fill-opacity": "0.5" 15067}, "0", null, 0, 1, { 15068 i: marko_const_nextId() 15069}); 15070 15071function render(input, out, __component, component, state) { 15072 var data = input; 15073 15074 out.n(marko_node0, component); 15075} 15076 15077marko_template._ = marko_renderer(render, { 15078 am_: true, 15079 _l_: marko_componentType 15080}); 15081 15082marko_template.Component = marko_defineComponent({}, marko_template._); 15083}); 15084$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/mobile.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15085"use strict"; 15086 15087var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15088 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15089 marko_registerComponent = components_helpers.rc, 15090 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/mobile.marko", function () { 15091 return module.exports; 15092}), 15093 marko_renderer = components_helpers.r, 15094 marko_defineComponent = components_helpers.c, 15095 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15096 marko_createElement = marko_helpers.e, 15097 marko_const = marko_helpers.const, 15098 marko_const_nextId = marko_const("c203cc"), 15099 marko_node0 = marko_createElement("path", { 15100 "class": "icon-mobile", 15101 "fill-rule": "evenodd", 15102 "clip-rule": "evenodd", 15103 d: "M6.75 1C5.647 1 4.75 1.897 4.75 3V21C4.75 22.103 5.647 23 6.75 23H16.75C17.853 23 18.75 22.103 18.75 21V3C18.75 1.897 17.853 1 16.75 1H6.75ZM6.75 3H16.75L16.752 21H6.75V3ZM12.75 19C12.75 18.4477 12.3023 18 11.75 18C11.1977 18 10.75 18.4477 10.75 19C10.75 19.5523 11.1977 20 11.75 20C12.3023 20 12.75 19.5523 12.75 19Z", 15104 fill: "black", 15105 "fill-opacity": "0.5" 15106}, "0", null, 0, 1, { 15107 i: marko_const_nextId() 15108}); 15109 15110function render(input, out, __component, component, state) { 15111 var data = input; 15112 15113 out.n(marko_node0, component); 15114} 15115 15116marko_template._ = marko_renderer(render, { 15117 am_: true, 15118 _l_: marko_componentType 15119}); 15120 15121marko_template.Component = marko_defineComponent({}, marko_template._); 15122}); 15123$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/icons/mobile-web.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
15123[email protected] - DO NOT EDIT 15124"use strict"; 15125 15126var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15127 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15128 marko_registerComponent = components_helpers.rc, 15129 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/icons/mobile-web.marko", function () { 15130 return module.exports; 15131}), 15132 marko_renderer = components_helpers.r, 15133 marko_defineComponent = components_helpers.c, 15134 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15135 marko_createElement = marko_helpers.e, 15136 marko_const = marko_helpers.const, 15137 marko_const_nextId = marko_const("de8e43"), 15138 marko_node0 = marko_createElement("path", { 15139 "class": "icon-mobile-web", 15140 "fill-rule": "evenodd", 15141 "clip-rule": "evenodd", 15142 d: "M20 5V16H12V18H20C21.1046 18 22 17.1046 22 16V5C22 3.89543 21.1046 3 20 3H7C5.89543 3 5 3.89543 5 5V7H7V5H20ZM10 9H4L4 19H10V9ZM4 7C2.89543 7 2 7.89543 2 9V19C2 20.1046 2.89543 21 4 21H10C11.1046 21 12 20.1046 12 19V9C12 7.89543 11.1046 7 10 7H4C4 7 2.89543 7 4 7Z", 15143 fill: "black", 15144 "fill-opacity": "0.5" 15145}, "0", null, 0, 1, { 15146 i: marko_const_nextId() 15147}); 15148 15149function render(input, out, __component, component, state) { 15150 var data = input; 15151 15152 out.n(marko_node0, component); 15153} 15154 15155marko_template._ = marko_renderer(render, { 15156 am_: true, 15157 _l_: marko_componentType 15158}); 15159 15160marko_template.Component = marko_defineComponent({}, marko_template._); 15161}); 15162$_mod.def("/panel-adsempiredirect$1.0.0/views/components/icon/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15163"use strict"; 15164 15165var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15166 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15167 marko_registerComponent = components_helpers.rc, 15168 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/icon/index.marko", function () { 15169 return module.exports; 15170}), 15171 marko_renderer = components_helpers.r, 15172 marko_defineComponent = components_helpers.c, 15173 module_dashboard = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/dashboard.marko'/*"./icons/dashboard.marko"*/), 15174 dashboard = module_dashboard.default || module_dashboard, 15175 module_card = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/credit.marko'/*"./icons/credit.marko"*/), 15176 card = module_card.default || module_card, 15177 module_faq = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/faq.marko'/*"./icons/faq.marko"*/), 15178 faq = module_faq.default || module_faq, 15179 module_news = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/news.marko'/*"./icons/news.marko"*/), 15180 news = module_news.default || module_news, 15181 module_link = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/link.marko'/*"./icons/link.marko"*/), 15182 link = module_link.default || module_link, 15183 module_offer = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/offer.marko'/*"./icons/offer.marko"*/), 15184 offer = module_offer.default || module_offer, 15185 module_postback = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/postback.marko'/*"./icons/postback.marko"*/), 15186 postback = module_postback.default || module_postback, 15187 module_report = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/report.marko'/*"./icons/report.marko"*/), 15188 report = module_report.default || module_report, 15189 module_support = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/support.marko'/*"./icons/support.marko"*/), 15190 support = module_support.default || module_support, 15191 module_profile = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/profile.marko'/*"./icons/profile.marko"*/), 15192 profile = module_profile.default || module_profile, 15193 module_logout = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/logout.marko'/*"./icons/logout.marko"*/), 15194 logout = module_logout.default || module_logout, 15195 module_right = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/right.marko'/*"./icons/right.marko"*/), 15196 right = module_right.default || module_right, 15197 module_left = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/left.marko'/*"./icons/left.marko"*/), 15198 left = module_left.default || module_left, 15199 module_up = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/up.marko'/*"./icons/up.marko"*/), 15200 up = module_up.default || module_up, 15201 module_down = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/down.marko'/*"./icons/down.marko"*/), 15202 down = module_down.default || module_down, 15203 module_close = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/close.marko'/*"./icons/close.marko"*/), 15204 close = module_close.default || module_close, 15205 module_infoOutline = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/info-outline.marko'/*"./icons/info-outline.marko"*/), 15206 infoOutline = module_infoOutline.default || module_infoOutline, 15207 module_notifBlank = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/notification-blank.marko'/*"./icons/notification-blank.marko"*/), 15208 notifBlank = module_notifBlank.default || module_notifBlank, 15209 module_notifNew = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/notification-new.mark
15209o'/*"./icons/notification-new.marko"*/), 15210 notifNew = module_notifNew.default || module_notifNew, 15211 module_contact = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/contact.marko'/*"./icons/contact.marko"*/), 15212 contact = module_contact.default || module_contact, 15213 module_trash = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/delete.marko'/*"./icons/delete.marko"*/), 15214 trash = module_trash.default || module_trash, 15215 module_sort = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/sort.marko'/*"./icons/sort.marko"*/), 15216 sort = module_sort.default || module_sort, 15217 module_download = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/download.marko'/*"./icons/download.marko"*/), 15218 download = module_download.default || module_download, 15219 module_decline = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/decline.marko'/*"./icons/decline.marko"*/), 15220 decline = module_decline.default || module_decline, 15221 module_date = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/date.marko'/*"./icons/date.marko"*/), 15222 date = module_date.default || module_date, 15223 module_shield = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/shield.marko'/*"./icons/shield.marko"*/), 15224 shield = module_shield.default || module_shield, 15225 module_mail = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/mail.marko'/*"./icons/mail.marko"*/), 15226 mail = module_mail.default || module_mail, 15227 module_web = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/web.marko'/*"./icons/web.marko"*/), 15228 web = module_web.default || module_web, 15229 module_mobile = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/mobile.marko'/*"./icons/mobile.marko"*/), 15230 mobile = module_mobile.default || module_mobile, 15231 module_mobileWeb = require('/panel-adsempiredirect$1.0.0/views/components/icon/icons/mobile-web.marko'/*"./icons/mobile-web.marko"*/), 15232 mobileWeb = module_mobileWeb.default || module_mobileWeb, 15233 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15234 marko_loadTag = marko_helpers.t, 15235 include_tag = marko_loadTag(require('/marko$4.14.8/dist/taglibs/core/include-tag'/*"marko/dist/taglibs/core/include-tag"*/)), 15236 marko_classAttr = marko_helpers.ca; 15237 15238function render(input, out, __component, component, state) { 15239 var data = input; 15240 15241 var icons = { 15242 dashboard: dashboard, 15243 card: card, 15244 link: link, 15245 faq: faq, 15246 news: news, 15247 offer: offer, 15248 postback: postback, 15249 support: support, 15250 report: report, 15251 profile: profile, 15252 logout: logout, 15253 right: right, 15254 left: left, 15255 infoOutline: infoOutline, 15256 close: close, 15257 up: up, 15258 down: down, 15259 notifBlank: notifBlank, 15260 notifNew: notifNew, 15261 contact: contact, 15262 trash: trash, 15263 sort: sort, 15264 download: download, 15265 decline: decline, 15266 date: date, 15267 shield: shield, 15268 web: web, 15269 mobile: mobile, 15270 "mobile-web": mobileWeb, 15271 mail: mail 15272 }; 15273 15274 var icon = icons[input.icon]; 15275 15276 out.be("svg", { 15277 height: input.height, 15278 width: input.width, 15279 "class": marko_classAttr(input.class), 15280 viewBox: input.viewBox 15281 }, "0", component, null, 1); 15282 15283 include_tag({ 15284 _target: icon, 15285 fillColor: input.fillColor 15286 }, out, __component, "1"); 15287 15288 out.ee(); 15289} 15290 15291marko_template._ = marko_renderer(render, { 15292 am_: true, 15293 _l_: marko_componentType 15294}); 15295 15296marko_template.Component = marko_defineComponent({}, marko_template._); 15297}); 15298$_mod.def("/marko$4.14.8/dist/runtime/helper-merge", function(require, exports, module, __filename, __dirname) { /** 15299 * Merges object properties 15300 * @param {[type]} object [description] 15301 * @param {[type]} source [description] 15302 * @return {[type]} [description] 15303 */ 15304function merge(into, source) { 15305 for (var k in source) { 15306 if (source.hasOwnProperty(k) && !into.hasOwnProperty(k)) { 15307 into[k] = source[k]; 15308 } 15309 } 15310 return into; 15311} 15312 15313module.exports = merge; 15314}); 15315$_mod.def("/panel-adsempiredirect$1.0.0/views/components/date-picker/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using mark
15315[email protected] - DO NOT EDIT 15316"use strict"; 15317 15318var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15319 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15320 marko_registerComponent = components_helpers.rc, 15321 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/date-picker/index.marko", function () { 15322 return module.exports; 15323}), 15324 marko_component = require('/panel-adsempiredirect$1.0.0/views/components/date-picker/component'/*"./component"*/), 15325 marko_renderer = components_helpers.r, 15326 marko_defineComponent = components_helpers.c, 15327 icon_template = require('/panel-adsempiredirect$1.0.0/views/components/icon/index.marko'/*"../icon"*/), 15328 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15329 marko_forEach = marko_helpers.f, 15330 marko_classAttr = marko_helpers.ca, 15331 marko_merge = require('/marko$4.14.8/dist/runtime/helper-merge'/*"marko/dist/runtime/helper-merge"*/), 15332 marko_loadTag = marko_helpers.t, 15333 include_tag = marko_loadTag(require('/marko$4.14.8/dist/taglibs/core/include-tag'/*"marko/dist/taglibs/core/include-tag"*/)), 15334 marko_attrs0 = { 15335 "class": "datepicker--icon--close" 15336}, 15337 marko_attrs1 = { 15338 "class": "datepicker--control-panel" 15339}, 15340 marko_attrs2 = { 15341 "class": "datepicker--control-panel--title" 15342}, 15343 marko_attrs3 = { 15344 "class": "datepicker--calendar--items" 15345}, 15346 marko_attrs4 = { 15347 "class": "datepicker--calendar--table" 15348}, 15349 marko_createElement = marko_helpers.e, 15350 marko_const = marko_helpers.const, 15351 marko_const_nextId = marko_const("0189c3"), 15352 marko_node0 = marko_createElement("TR", { 15353 "class": "datepicker--calendar--day-week" 15354}, "13", null, 8, 0, { 15355 i: marko_const_nextId() 15356}).e("TD", null, null, null, 1).t("#").e("TD", null, null, null, 1).t("Mo").e("TD", null, null, null, 1).t("Tu").e("TD", null, null, null, 1).t("We").e("TD", null, null, null, 1).t("Th").e("TD", null, null, null, 1).t("Fr").e("TD", null, null, null, 1).t("Sa").e("TD", null, null, null, 1).t("Su"), 15357 marko_attrs5 = { 15358 "class": "datepicker--form-group--input" 15359}, 15360 marko_attrs6 = { 15361 "class": "fa fa-times" 15362}, 15363 marko_attrs7 = { 15364 "class": "datepicker--control-panel--navigate-button" 15365}, 15366 marko_attrs8 = { 15367 "class": "fa fa-angle-left" 15368}, 15369 marko_attrs9 = { 15370 "class": "datepicker--control-panel--navigate-button" 15371}, 15372 marko_attrs10 = { 15373 "class": "fa fa-angle-right" 15374}, 15375 marko_attrs11 = { 15376 "class": "datepicker--calendar--days" 15377}, 15378 marko_attrs12 = { 15379 "class": "fa fa-calendar" 15380}, 15381 marko_attrs13 = { 15382 style: "position:fixed; height: 100vh; width: 100vw; top: 0; left: 0; background:transparent; z-index:2" 15383}; 15384 15385function render(input, out, __component, component, state) { 15386 var data = input; 15387 15388 out.be("DIV", { 15389 id: input.elementId 15390 }, "0", component, null, 4); 15391 15392 out.be("DIV", { 15393 "class": marko_classAttr("" + (state.isOpenCalendar ? "show" : "hide") + " datepicker--form--open") 15394 }, "1", component, null, 4); 15395 15396 out.e("DIV", marko_attrs0, "2", component, 1).e("SPAN", marko_attrs6, "3", component, 0, 0, { 15397 onclick: __component.d("click", "close", false) 15398 }); 15399 15400 out.be("DIV", marko_attrs1, "4", component); 15401 15402 out.be("UL", null, "5", component); 15403 15404 if (input.params.minYear <= state.date.year) { 15405 out.e("LI", marko_attrs7, "6", component, 1).e("SPAN", marko_attrs8, "7", component, 0, 0, { 15406 onclick: __component.d("click", "prevMonth", false, [state.date]) 15407 }); 15408 } 15409 15410 out.e("LI", marko_attrs2, "8", component, 3).t(component.getMonth(state.date)).t(" ").t(state.date.year); 15411 15412 if (input.params.maxYear >= state.date.year) { 15413 out.e("LI", marko_attrs9, "9", component, 1).e("SPAN", marko_attrs10, "10", component, 0, 0, { 15414 onclick: __component.d("click", "nextMonth", false, [state.date]) 15415 }); 15416 } 15417 15418 out.ee(); 15419 15420 out.ee(); 15421 15422 out.be("DIV", marko_attrs3, "11", component); 15423 15424 out.be("TABLE", marko_attrs4, "12", component); 15425 15426 out.n(marko_node0, component); 15427 15428 var for__22 = 0; 15429 15430 marko_forEach(state.daysInMonth, function (week) { 15431 var keyscope__23 = "[" + (for__22++ + "]"); 15432 15433 out.be("TR", marko_attrs11, "24" + keyscope__23, component); 15434 15435 out.e("TD", { 15436 "class": marko_classAttr("" + (input.params.numberOfWeekClass ? input.params.numberOfWeekClass : "datepicker--calendar--number-of-week")) 15437 }, "25" + keyscope__23, component, 1, 4, { 15438 onclick: __component.d("click", "setWeek", false, [week.numberOfWeek, week.date]) 15439 }).t(week.numberOfWeek); 15440 15441 var for__26 = 0; 15442 15443 marko_forEach(week.days, function (item) { 15444 var keyscope__27 = "[" + (for__26++ + keyscope__23 + "]"); 15445 15446 out.e("TD", { 15447 "class": marko_classAttr("\n " + (component.checkDateInRange(item.day, item.month, item.isDayFromThisMonth) ? "" + (input.params.chosedDayClass || "choose-day") : "") + " \n " + (item.isDayFromThisMonth && component.checkStartEndDate(item.day) ? "" + (input.params.hoverDayClass || "datepicker--calendar--days-default") : "datepicker--calendar--not-active-day")) 15448 }, "28" + keyscope__27, component, 1, 4, { 15449 onclick: __component.d("click", "setDate", false, [item.day, item.isDayFromThisMonth, item.date]) 15450 }).t(item.day); 15451 }); 15452 15453 out.ee(); 15454 }); 15455 15456 out.ee(); 15457 15458 out.ee(); 15459 15460 out.ee(); 15461 15462 out.be("DIV", marko_attrs5, "29", component); 15463 15464 out.be("DIV", null, "30", component); 15465 15466 if (input.icon) { 15467 out.be("SPAN", null, "31", component, null, 0, { 15468 onclick: __component.d("click", "open", false) 15469 }); 15470 15471 include_tag(marko_merge(input.icon, { 15472 _target: icon_template 15473 }), out, __component, "32"); 15474 15475 out.ee(); 15476 } else { 15477 out.e("SPAN", marko_attrs12, "33", component, 0, 0, { 15478 onclick: __component.d("click", "open", false) 15479 }); 15480 } 15481 15482 out.e("INPUT", { 15483 type: "text", 15484 "class": "", 15485 "data-test-id": input.dataTestId, 15486 value: "" + state.date.titleDate, 15487 disabled: input.disabled 15488 }, "34", component, 0, 0, { 15489 onchange: __component.d("change", "changeDateInput", false) 15490 }); 15491 15492 out.ee(); 15493 15494 out.ee(); 15495 15496 out.ee(); 15497 15498 if (state.isOpenCalendar) { 15499 out.e("DIV", marko_attrs13, "35", component, 0, 0, { 15500 onclick: __component.d("click", "close", false) 15501 }); 15502 } 15503} 15504 15505marko_template._ = marko_renderer(render, { 15506 _l_: marko_componentType 15507}
15507, marko_component); 15508 15509marko_template.Component = marko_defineComponent(marko_component, marko_template._); 15510}); 15511$_mod.main("/panel-adsempiredirect$1.0.0/views/components/range-picker", "index.marko"); 15512$_mod.def("/panel-adsempiredirect$1.0.0/views/components/range-picker/component", function(require, exports, module, __filename, __dirname) { module.exports = { 15513 change: function change(event) { 15514 var dates = JSON.parse(event.target.value); 15515 15516 var start = dates[0]; 15517 var end = dates[1]; 15518 15519 return this.emit("change", start, end); 15520 } 15521}; 15522}); 15523$_mod.def("/panel-adsempiredirect$1.0.0/views/components/range-picker/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15524"use strict"; 15525 15526var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15527 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15528 marko_registerComponent = components_helpers.rc, 15529 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/range-picker/index.marko", function () { 15530 return module.exports; 15531}), 15532 marko_component = require('/panel-adsempiredirect$1.0.0/views/components/range-picker/component'/*"./component"*/), 15533 marko_renderer = components_helpers.r, 15534 marko_defineComponent = components_helpers.c, 15535 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15536 marko_forEach = marko_helpers.f, 15537 marko_attrs0 = { 15538 "class": "custom-range" 15539}, 15540 marko_createElement = marko_helpers.e, 15541 marko_const = marko_helpers.const, 15542 marko_const_nextId = marko_const("5efbb8"), 15543 marko_node0 = marko_createElement("OPTION", { 15544 value: "", 15545 disabled: true, 15546 selected: true 15547}, "2", null, 1, 0, { 15548 i: marko_const_nextId() 15549}).t("custom"); 15550 15551function render(input, out, __component, component, state) { 15552 var data = input; 15553 15554 out.be("DIV", marko_attrs0, "0", component); 15555 15556 out.be("SELECT", { 15557 "class": "", 15558 placeholder: "custom", 15559 "data-test-id": input.dataTestId 15560 }, "1", component, null, 0, { 15561 onchange: __component.d("change", "change", false) 15562 }); 15563 15564 out.n(marko_node0, component); 15565 15566 var for__3 = 0; 15567 15568 marko_forEach(input.customRange, function (item) { 15569 var keyscope__4 = "[" + (for__3++ + "]"); 15570 15571 out.e("OPTION", { 15572 value: item.value, 15573 selected: input.value.join(" - ") == item.title 15574 }, "5" + keyscope__4, component, 1).t(item.label); 15575 }); 15576 15577 out.ee(); 15578 15579 out.ee(); 15580} 15581 15582marko_template._ = marko_renderer(render, { 15583 _l_: marko_componentType 15584}, marko_component); 15585 15586marko_template.Component = marko_defineComponent(marko_component, marko_template._); 15587}); 15588$_mod.main("/panel-adsempiredirect$1.0.0/views/components/aui-checkbox", "index.marko"); 15589$_mod.main("/panel-adsempiredirect$1.0.0/views/components/multi-checkbox", "index.marko"); 15590$_mod.def("/panel-adsempiredirect$1.0.0/views/components/multi-checkbox/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15591"use strict"; 15592 15593var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15594 marko_component = { 15595 onCreate: function onCreate(input) { 15596 this.click = input.click; 15597 }, 15598 onInput: function onInput(input) { 15599 this.click = input.click; 15600 } 15601}, 15602 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15603 marko_registerComponent = components_helpers.rc, 15604 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/multi-checkbox/index.marko", function () { 15605 return module.exports; 15606}), 15607 marko_renderer = components_helpers.r, 15608 marko_defineComponent = components_helpers.c, 15609 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15610 marko_classAttr = marko_helpers.ca; 15611 15612function render(input, out, __component, component, state) { 15613 var data = input; 15614 15615 out.e("DIV", { 15616 "class": marko_classAttr(input.wrapperClass) 15617 }, "0", component, 2, 4).e("INPUT", { 15618 "class": marko_classAttr(input.inputClass), 15619 type: "checkbox", 15620 name: input.name, 15621 id: input.id || input.name, 15622 value: input.value || 1, 15623 checked: input.checked, 15624 "data-group": input.group, 15625 "data-test-id": input.name 15626 }, "1", component, 0, 0, { 15627 onclick: __component.d("click", "click", false) 15628 }).e("LABEL", { 15629 "class": marko_classAttr(input.labelClass), 15630 "for": input.id || input.name 15631 }, "2", component, 1).e("SMALL", null, "3", component, 1).t(input.label); 15632} 15633 15634marko_template._ = marko_renderer(render, { 15635 _l_: marko_componentType 15636}
15636, marko_component); 15637 15638marko_template.Component = marko_defineComponent(marko_component, marko_template._); 15639}); 15640$_mod.def("/panel-adsempiredirect$1.0.0/views/components/aui-checkbox/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15641"use strict"; 15642 15643var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15644 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15645 marko_registerComponent = components_helpers.rc, 15646 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/aui-checkbox/index.marko", function () { 15647 return module.exports; 15648}), 15649 marko_renderer = components_helpers.r, 15650 marko_defineComponent = components_helpers.c, 15651 multi_checkbox_template = require('/panel-adsempiredirect$1.0.0/views/components/multi-checkbox/index.marko'/*"../multi-checkbox"*/), 15652 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15653 marko_loadTag = marko_helpers.t, 15654 multi_checkbox_tag = marko_loadTag(multi_checkbox_template); 15655 15656function render(input, out, __component, component, state) { 15657 var data = input; 15658 15659 multi_checkbox_tag({ 15660 wrapperClass: input.wrapperClass || "system--display--flex system--flexbox--align-items-center", 15661 inputClass: input.inputClass, 15662 label: input.label, 15663 name: input.name, 15664 click: input.click || function () {}, 15665 checked: input.checked, 15666 group: input.group 15667 }, out, __component, "0"); 15668} 15669 15670marko_template._ = marko_renderer(render, { 15671 am_: true, 15672 _l_: marko_componentType 15673}); 15674 15675marko_template.Component = marko_defineComponent({}, marko_template._); 15676}); 15677$_mod.def("/panel-adsempiredirect$1.0.0/views/types/components/reportHeadersDr.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15678"use strict"; 15679 15680var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15681 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15682 marko_classList = marko_helpers.cl, 15683 marko_component = { 15684 changeLpSelect: function changeLpSelect(e) { 15685 this.emit("changeLpSelect", e); 15686 }, 15687 removeLpSelect: function removeLpSelect(e) { 15688 this.emit("removeLpSelect", e); 15689 }, 15690 changeDate: function changeDate(start, end) { 15691 this.emit("changeDate", start, end); 15692 }, 15693 apply: function apply() { 15694 this.emit("apply"); 15695 } 15696}, 15697 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15698 marko_registerComponent = components_helpers.rc, 15699 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/types/components/reportHeadersDr.marko", function () { 15700 return module.exports; 15701}), 15702 marko_renderer = components_helpers.r, 15703 marko_defineComponent = components_helpers.c, 15704 module_multiselect = require('/panel-adsempiredirect$1.0.0/views/components/multiselect/index.marko'/*"../../components/multiselect"*/), 15705 multiselect = module_multiselect.default || module_multiselect, 15706 aui_select_template = require('/panel-adsempiredirect$1.0.0/views/components/aui-select/index.marko'/*"../../components/aui-select"*/), 15707 marko_loadTag = marko_helpers.t, 15708 aui_select_tag = marko_loadTag(aui_select_template), 15709 include_tag = marko_loadTag(require('/marko$4.14.8/dist/taglibs/core/include-tag'/*"marko/dist/taglibs/core/include-tag"*/)), 15710 date_picker_template = require('/panel-adsempiredirect$1.0.0/views/components/date-picker/index.marko'/*"../../components/date-picker"*/), 15711 date_picker_tag = marko_loadTag(date_picker_template), 15712 range_picker_template = require('/panel-adsempiredirect$1.0.0/views/components/range-picker/index.marko'/*"../../components/range-picker"*/), 15713 range_picker_tag = marko_loadTag(range_picker_template), 15714 marko_classAttr = marko_helpers.ca, 15715 aui_checkbox_template = require('/panel-adsempiredirect$1.0.0/views/components/
15715aui-checkbox/index.marko'/*"../../components/aui-checkbox"*/), 15716 aui_checkbox_tag = marko_loadTag(aui_checkbox_template), 15717 marko_attrs0 = { 15718 "class": "system--display--flex system--flexbox--direction-row system--flexbox--justify-space-between system--margin-top--20px system--flexbox--align-items-end" 15719}, 15720 marko_attrs1 = { 15721 "class": "repot--input-container-to" 15722}, 15723 marko_attrs2 = { 15724 "class": "repot--input-container-landing" 15725}, 15726 marko_createElement = marko_helpers.e, 15727 marko_const = marko_helpers.const, 15728 marko_const_nextId = marko_const("30f313"), 15729 marko_node0 = marko_createElement("LABEL", { 15730 "class": "basic-input--label" 15731}, "4", null, 1, 0, { 15732 i: marko_const_nextId() 15733}).t("Landing Pages"), 15734 marko_attrs3 = { 15735 "class": "repot--input-container-to" 15736}, 15737 marko_attrs4 = { 15738 "class": "repot--input-container--datepicker" 15739}, 15740 marko_node1 = marko_createElement("LABEL", null, "8", null, 1, 0, { 15741 i: marko_const_nextId() 15742}).t("Time period"), 15743 marko_attrs5 = { 15744 "class": "repot--input-container--rangepicker" 15745}, 15746 marko_node2 = marko_createElement("LABEL", null, "12", null, 1, 0, { 15747 i: marko_const_nextId() 15748}).t("Date range"), 15749 marko_attrs6 = { 15750 "class": "system--margin-top--10px" 15751}, 15752 marko_node3 = marko_createElement("DIV", { 15753 "class": "system--margin-bottom--10px" 15754}, "17", null, 1, 0, { 15755 i: marko_const_nextId() 15756}).t("Show columns"), 15757 marko_attrs7 = { 15758 "class": "system--display--flex" 15759}, 15760 marko_attrs8 = { 15761 "class": "system--display--flex" 15762}, 15763 marko_attrs9 = { 15764 "class": "system--margin-left--10px" 15765}, 15766 marko_attrs10 = { 15767 "class": "system--margin-left--10px" 15768}; 15769 15770function render(input, out, __component, component, state) { 15771 var data = input; 15772 15773 out.be("DIV", marko_attrs0, "0", component); 15774 15775 out.be("DIV", marko_attrs1, "1", component); 15776 15777 aui_select_tag({ 15778 label: "Offers", 15779 name: "offer", 15780 options: input.offers, 15781 value: input.form.offer, 15782 change: input.handlers.changeFilter, 15783 dataTestId: "offers" 15784 }, out, __component, "2"); 15785 15786 out.ee(); 15787 15788 out.be("DIV", marko_attrs2, "3", component); 15789 15790 out.n(marko_node0, component); 15791 15792 include_tag({ 15793 _target: multiselect, 15794 _arg: { 15795 multiple: true, 15796 elementId: "landingPage", 15797 name: "landingPage", 15798 options: { 15799 disableSearch: true 15800 }, 15801 config: { 15802 choices: input.options.landingPages, 15803 removeItems: true, 15804 removeItemButton: true, 15805 shouldSortItems: false, 15806 shouldSort: false 15807 } 15808 } 15809 }, out, __component, "lpSelect", [["changeItem", "changeLpSelect", false], ["removeItem", "removeLpSelect", false]]); 15810 15811 out.ee(); 15812 15813 out.be("DIV", marko_attrs3, "5", component); 15814 15815 aui_select_tag({ 15816 label: "Country", 15817 name: "country", 15818 options: input.countries, 15819 value: input.form.country, 15820 change: input.handlers.changeFilter, 15821 dataTestId: "country" 15822 }, out, __component, "6"); 15823 15824 out.ee(); 15825 15826 out.be("DIV", marko_attrs4, "7", component); 15827 15828 out.n(marko_node1, component); 15829 15830 date_picker_tag({ 15831 params: input.datePickerParams, 15832 dateFrom: input.form.dateFrom, 15833 dateTo: input.form.dateTo, 15834 workWithDate: "dateFrom", 15835 elementId: "custome-datepicker-start", 15836 weekDay: "Monday", 15837 disabled: false, 15838 icon: { 15839 icon: "date", 15840 fillColor: "rgba(0,0,0,0.15)", 15841 width: 21, 15842 height: 22 15843 } 15844 }, out, __component, "9", [["change", "changeDate", false]]); 15845 15846 date_picker_tag({ 15847 params: input.datePickerParams, 15848 dateFrom: input.form.dateFrom, 15849 dateTo: input.form.dateTo, 15850 workWithDate: "dateTo", 15851 elementId: "custome-datepicker-end", 15852 weekDay: "Sunday", 15853 disabled: false, 15854 icon: { 15855 icon: "date", 15856 fillColor: "rgba(0,0,0,0.15)", 15857 width: 21, 15858 height: 22 15859 } 15860 }, out, __component, "10", [["change", "changeDate", false]]); 15861 15862 out.ee(); 15863 15864 out.be("DIV", marko_attrs5, "11", component); 15865 15866 out.n(marko_node2, component); 15867 15868 range_picker_tag({ 15869 customRange: input.customRange, 15870 value: [input.form.dateFrom, input.form.dateTo], 15871 dataTestId: "dateRange" 15872 }, out, __component, "13", [["change", "changeDate", false]]); 15873 15874 out.ee(); 15875 15876 out.e("DIV", null, "14", component, 1).e("BUTTON", { 15877 "class": marko_classAttr(marko_classList(["button--main repot--accept-button", input.queryRunning ? "button--disabled" : ""])), 15878 "data-test-id": "apply" 15879 }, "15", component, 1, 0, { 15880 onclick: __component.d("click", "apply", false) 15881 }).t("Apply Filter"); 15882 15883 out.ee(); 15884 15885 out.be("DIV", marko_attrs6, "16", component); 15886 15887 out.n(marko_node3, component); 15888 15889 out.be("DIV", marko_attrs7, "18", component); 15890 15891 out.be("DIV", marko_attrs8, "19", component); 15892 15893 aui_checkbox_tag({ 15894 label: "subid", 15895 inputClass: "checkbox--input--to", 15896 name: "showUtmContent", 15897 click: input.handlers.changeCheckbox, 15898 checked: input.form.showUtmContent 15899 }, out, __component, "20"); 15900 15901 out.be("DIV", marko_attrs9, "21", component); 15902 15903 aui_checkbox_tag({ 15904 label: "Landing", 15905 inputClass: "checkbox--input--to", 15906 name: "showLandingPage", 15907 click: input.handlers.changeCheckbox, 15908 checked: input.form.showLandingPage 15909 }, out, __component, "22"); 15910 15911 out.ee(); 15912 15913 out.be("DIV", marko_attrs10, "23", component); 15914 15915 aui_checkbox_tag({ 15916 label: "subid2", 15917 inputClass: "checkbox--input--to", 15918 name: "showS3", 15919 click: input.handlers.changeCheckbox, 15920 checked: input.form.showS3 15921 }, out, __component, "24"); 15922 15923 out.ee(); 15924 15925 out.ee(); 15926 15927 out.ee(); 15928 15929 out.ee(); 15930} 15931 15932marko_template._ = marko_renderer(render, { 15933 _l_: marko_componentType 15934}
15934, marko_component); 15935 15936marko_template.Component = marko_defineComponent(marko_component, marko_template._); 15937}); 15938$_mod.def("/panel-adsempiredirect$1.0.0/views/types/components/drBasic.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 15939"use strict"; 15940 15941var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 15942 marko_component = { 15943 onCreate: function onCreate(input) { 15944 this.changeDate = input.handlers.changeDate; 15945 } 15946}, 15947 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 15948 marko_registerComponent = components_helpers.rc, 15949 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/types/components/drBasic.marko", function () { 15950 return module.exports; 15951}), 15952 marko_renderer = components_helpers.r, 15953 marko_defineComponent = components_helpers.c, 15954 aui_select_template = require('/panel-adsempiredirect$1.0.0/views/components/aui-select/index.marko'/*"../../components/aui-select"*/), 15955 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 15956 marko_loadTag = marko_helpers.t, 15957 aui_select_tag = marko_loadTag(aui_select_template), 15958 date_picker_template = require('/panel-adsempiredirect$1.0.0/views/components/date-picker/index.marko'/*"../../components/date-picker"*/), 15959 date_picker_tag = marko_loadTag(date_picker_template), 15960 marko_attrs0 = { 15961 "class": "system--display--flex system--flexbox--align-items-start" 15962}, 15963 marko_attrs1 = { 15964 "class": "transaction-report--filter-group" 15965}, 15966 marko_attrs2 = { 15967 "class": "transaction-report--filter-group" 15968}, 15969 marko_attrs3 = { 15970 "class": "transaction-report--filter-group" 15971}, 15972 marko_attrs4 = { 15973 "class": "transaction-report--filter-group transaction-report--datepickers" 15974}, 15975 marko_createElement = marko_helpers.e, 15976 marko_const = marko_helpers.const, 15977 marko_const_nextId = marko_const("5520f4"), 15978 marko_node0 = marko_createElement("DIV", { 15979 "class": "system--margin-bottom--5px" 15980}, "8", null, 1, 0, { 15981 i: marko_const_nextId() 15982}).t("Time period"), 15983 marko_attrs5 = { 15984 "class": "system--display--flex system--flexbox--justify-space-between" 15985}; 15986 15987function render(input, out, __component, component, state) { 15988 var data = input; 15989 15990 out.be("DIV", marko_attrs0, "0", component); 15991 15992 out.be("DIV", marko_attrs1, "1", component); 15993 15994 aui_select_tag({ 15995 label: "СPA Offer", 15996 options: input.offers, 15997 wrapperClass: "transaction-report--select", 15998 name: "cpaOffer", 15999 value: input.filters.cpaOffer, 16000 change: input.handlers.change, 16001 dataTestId: "cpaOfferFilter" 16002 }, out, __component, "2"); 16003 16004 out.ee(); 16005 16006 out.be("DIV", marko_attrs2, "3", component); 16007 16008 aui_select_tag({ 16009 label: "Country", 16010 options: input.countries, 16011 name: "country", 16012 value: input.filters.country, 16013 change: input.handlers.change, 16014 wrapperClass: "transaction-report--select", 16015 dataTestId: "countryFilter" 16016 }, out, __component, "4"); 16017 16018 out.ee(); 16019 16020 out.be("DIV", marko_attrs3, "5", component); 16021 16022 aui_select_tag({ 16023 label: "Platform", 16024 options: input.platforms, 16025 name: "platform", 16026 value: input.filters.platform, 16027 change: input.handlers.change, 16028 wrapperClass: "transaction-report--select", 16029 dataTestId: "platformFilter" 16030 }, out, __component, "6"); 16031 16032 out.ee(); 16033 16034 out.be("DIV", marko_attrs4, "7", component); 16035 16036 out.n(marko_node0, component); 16037 16038 out.be("DIV", marko_attrs5, "9", component); 16039 16040 out.be("DIV", null, "10", component); 16041 16042 date_picker_tag({ 16043 params: input.datePickerParams, 16044 dateFrom: input.date.dateFrom, 16045 dateTo: input.date.dateTo, 16046 workWithDate: "dateFrom", 16047 elementId: "custome-datepicker-start", 16048 weekDay: "Monday", 16049 icon: { 16050 icon: "date", 16051 fillColor: "rgba(0,0,0,0.15)", 16052 width: 21, 16053 height: 22 16054 }, 16055 dataTestId: "dateFromFilter" 16056 }, out, __component, "11", [["change", "changeDate", false]]); 16057 16058 out.ee(); 16059 16060 out.be("DIV", null, "12", component); 16061 16062 date_picker_tag({ 16063 params: input.datePickerParams, 16064 dateFrom: input.date.dateFrom, 16065 dateTo: input.date.dateTo, 16066 workWithDate: "dateTo", 16067 elementId: "custome-datepicker-end", 16068 weekDay: "Sunday", 16069 icon: { 16070 icon: "date", 16071 fillColor: "rgba(0,0,0,0.15)", 16072 width: 21, 16073 height: 22 16074 }, 16075 dataTestId: "dateToFilter" 16076 }, out, __component, "13", [["change", "changeDate", false]]); 16077 16078 out.ee(); 16079 16080 out.ee(); 16081 16082 out.ee(); 16083 16084 out.ee(); 16085} 16086 16087marko_template._ = marko_renderer(render, { 16088 _l_: marko_componentType 16089}
16089, marko_component); 16090 16091marko_template.Component = marko_defineComponent(marko_component, marko_template._); 16092}); 16093$_mod.main("/panel-adsempiredirect$1.0.0/views/components/aui-input", "index.marko"); 16094$_mod.main("/panel-adsempiredirect$1.0.0/views/components/multi-input", "index.marko"); 16095$_mod.def("/panel-adsempiredirect$1.0.0/views/components/multi-input/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 16096"use strict"; 16097 16098var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 16099 marko_component = { 16100 onCreate: function onCreate(input) { 16101 this.change = input.change; 16102 16103 this.blur = input.blur; 16104 16105 this.inputHandler = input.inputHandler; 16106 16107 this.click = input.click; 16108 16109 this.focusHandler = input.focusHandler; 16110 } 16111}, 16112 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 16113 marko_registerComponent = components_helpers.rc, 16114 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/multi-input/index.marko", function () { 16115 return module.exports; 16116}), 16117 marko_renderer = components_helpers.r, 16118 marko_defineComponent = components_helpers.c, 16119 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 16120 marko_classAttr = marko_helpers.ca, 16121 marko_forEach = marko_helpers.f; 16122 16123function render(input, out, __component, component, state) { 16124 var data = input; 16125 16126 out.be("DIV", { 16127 "class": marko_classAttr(input.wrapperClass) 16128 }, "0", component, null, 4); 16129 16130 out.e("DIV", { 16131 "class": marko_classAttr(input.labelWrapperClass) 16132 }, "1", component, 1, 4).e("LABEL", { 16133 "class": marko_classAttr(input.labelClass), 16134 "for": input.name 16135 }, "2", component, 1).t(input.label); 16136 16137 out.be("DIV", { 16138 "class": marko_classAttr(input.inputWrapperClass) 16139 }, "3", component, null, 4); 16140 16141 out.e("INPUT", { 16142 id: input.id, 16143 "class": marko_classAttr("" + input.inputClass + " " + (input.errors && input.errors[input.name] ? input.inputErrorClass : "")), 16144 placeholder: input.placeholder, 16145 disabled: input.disabled, 16146 type: input.type, 16147 value: input.value, 16148 name: input.name, 16149 "data-test-id": input.dataTestId, 16150 autocomplete: "off" 16151 }, "@" + input.key, component, 0, 0, { 16152 onchange: __component.d("change", "change", false), 16153 onclick: __component.d("click", "click", false), 16154 onblur: __component.d("blur", "blur", false), 16155 oninput: __component.d("input", "inputHandler", false), 16156 onfocus: __component.d("focus", "focusHandler", false) 16157 }); 16158 16159 if (input.errors && input.errors[input.name]) { 16160 var for__4 = 0; 16161 16162 marko_forEach(input.errors[input.name], function (error) { 16163 var keyscope__5 = "[" + (for__4++ + "]"); 16164 16165 out.e("DIV", { 16166 "class": marko_classAttr(input.errorClass) 16167 }, "6" + keyscope__5, component, 1, 4).t(error.message); 16168 }); 16169 } 16170 16171 out.ee(); 16172 16173 out.ee(); 16174} 16175 16176marko_template._ = marko_renderer(render, { 16177 _l_: marko_componentType 16178}, marko_component); 16179 16180marko_template.Component = marko_defineComponent(marko_component, marko_template._); 16181}); 16182$_mod.def("/panel-adsempiredirect$1.0.0/views/components/aui-input/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 16183"use strict"; 16184 16185var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 16186 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 16187 marko_registerComponent = components_helpers.rc, 16188 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/components/aui-input/index.marko", function () { 16189 return module.exports; 16190}), 16191 marko_renderer = components_helpers.r, 16192 marko_defineComponent = components_helpers.c, 16193 multi_input_template = require('/panel-adsempiredirect$1.0.0/views/components/multi-input/index.marko'/*"../multi-input"*/), 16194 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 16195 marko_loadTag = marko_helpers.t, 16196 multi_input_tag = marko_loadTag(multi_input_template); 16197 16198function render(input, out, __component, component, state) { 16199 var data = input; 16200 16201 multi_input_tag({ 16202 id: input.id, 16203 name: input.name, 16204 label: input.label, 16205 change: input.change || function () {}, 16206 blur: input.blur || function () {}, 16207 placeholder: input.placeholder, 16208 disabled: input.disabled, 16209 inputHandler: input.inputHandler || function () {}, 16210 focusHandler: input.focusHandler || function () {}, 16211 click: input.click || function () {}, 16212 value: input.value, 16213 type: input.type, 16214 wrapperClass: input.halfWidth ? "basic-input--wrapper--half basic-input--wrapper" : "basic-input--wrapper", 16215 labelWrapperClass: "basic-input--label-wrapper", 16216 labelClass: "basic-input--label", 16217 inputWrapperClass: "basic-input--input-wrapper", 16218 inputClass: input.inputClass || "basic-input--input", 16219 inputErrorClass: "basic-input--input--error", 16220 errorClass: "basic-input--subtext--error", 16221 errors: input.errors, 16222 dataTestId: input.dataTestId 16223 }
16223, out, __component, input.key); 16224} 16225 16226marko_template._ = marko_renderer(render, { 16227 am_: true, 16228 _l_: marko_componentType 16229}); 16230 16231marko_template.Component = marko_defineComponent({}, marko_template._); 16232}); 16233$_mod.def("/panel-adsempiredirect$1.0.0/views/types/components/drAdvanced.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 16234"use strict"; 16235 16236var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 16237 marko_component = { 16238 onCreate: function onCreate(input) { 16239 this.toggle = input.handlers.toggleCheckboxes; 16240 }, 16241 toggleCheckboxes: function toggleCheckboxes(group, direction) { 16242 this.toggle(group, direction); 16243 } 16244}, 16245 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 16246 marko_registerComponent = components_helpers.rc, 16247 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/types/components/drAdvanced.marko", function () { 16248 return module.exports; 16249}), 16250 marko_renderer = components_helpers.r, 16251 marko_defineComponent = components_helpers.c, 16252 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 16253 marko_forEach = marko_helpers.f, 16254 aui_checkbox_template = require('/panel-adsempiredirect$1.0.0/views/components/aui-checkbox/index.marko'/*"../../components/aui-checkbox"*/), 16255 marko_loadTag = marko_helpers.t, 16256 aui_checkbox_tag = marko_loadTag(aui_checkbox_template), 16257 aui_input_template = require('/panel-adsempiredirect$1.0.0/views/components/aui-input/index.marko'/*"../../components/aui-input"*/), 16258 aui_input_tag = marko_loadTag(aui_input_template), 16259 marko_attrs0 = { 16260 "data-test-id": "transactionTypeBlock", 16261 "class": "system--margin-bottom--20px" 16262}, 16263 marko_createElement = marko_helpers.e, 16264 marko_const = marko_helpers.const, 16265 marko_const_nextId = marko_const("259996"), 16266 marko_node0 = marko_createElement("DIV", { 16267 "class": "system--margin-bottom--10px" 16268}, "1", null, 1, 0, { 16269 i: marko_const_nextId() 16270}).t("Transaction type"), 16271 marko_attrs1 = { 16272 "class": "system--display--flex" 16273}, 16274 marko_attrs2 = { 16275 "class": "system--display--flex transaction-report--all-checkboxes" 16276}, 16277 marko_attrs3 = { 16278 "class": "system--margin-bottom--20px system--display--flex" 16279}, 16280 marko_attrs4 = { 16281 "class": "content--block--fifth transaction-report--filter-group" 16282}, 16283 marko_attrs5 = { 16284 "class": "content--block--fifth transaction-report--filter-group" 16285}, 16286 marko_attrs6 = { 16287 "data-test-id": "conversionCurrencyBlock", 16288 "class": "system--margin-bottom--20px" 16289}, 16290 marko_node1 = marko_createElement("DIV", { 16291 "class": "system--margin-bottom--10px" 16292}, "16", null, 1, 0, { 16293 i: marko_const_nextId() 16294}).t("Conversion currency"), 16295 marko_attrs7 = { 16296 "class": "system--display--flex" 16297}, 16298 marko_attrs8 = { 16299 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16300}, 16301 marko_attrs9 = { 16302 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16303}, 16304 marko_attrs10 = { 16305 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16306}, 16307 marko_attrs11 = { 16308 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16309}, 16310 marko_attrs12 = { 16311 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16312}, 16313 marko_attrs13 = { 16314 "data-test-id": "statusBlock", 16315 "class": "system--margin-bottom--20px" 16316}, 16317 marko_node2 = marko_createElement("DIV", { 16318 "class": "system--margin-bottom--10px" 16319}, "29", null, 1, 0, { 16320 i: marko_const_nextId() 16321}).t("Status"), 16322 marko_attrs14 = { 16323 "class": "system--display--flex" 16324}, 16325 marko_attrs15 = { 16326 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16327}, 16328 marko_attrs16 = { 16329 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16330}, 16331 marko_attrs17 = { 16332 "class": "system--display--flex transaction-report--all-checkboxes" 16333}, 16334 marko_attrs18 = { 16335 "data-test-id": "showColumnsBlock" 16336}, 16337 marko_node3 = marko_createElement("DIV", { 16338 "class": "system--margin-bottom--10px" 16339}, "39", null, 1, 0, { 16340 i: marko_const_nextId() 16341}).t("Show columns"), 16342 marko_attrs19 = { 16343 "class": "system--display--flex system--flexbox--justify-space-between" 16344}, 16345 marko_attrs20 = { 16346 "class": "system--display--flex transaction-report--all-checkboxes" 16347}, 16348 marko_attrs21 = { 16349 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16350}, 16351 marko_attrs22 = { 16352 "data-test-id": "all" 16353}, 16354 marko_attrs23 = { 16355 "data-test-id": "clear" 16356}, 16357 marko_attrs24 = { 16358 "data-test-id": "all" 16359}, 16360 marko_attrs25 = { 16361 "data-test-id": "clear" 16362}, 16363 marko_attrs26 = { 16364 "class": "system--display--flex transaction-report--filter-group system--flexbox--justify-space-between system--flexbox--align-items-center" 16365}, 16366 marko_attrs27 = { 16367 "data-test-id": "all" 16368}, 16369 marko_attrs28 = { 16370 "data-test-id": "clear" 16371}; 16372 16373function render(input, out, __component, component, state) { 16374 var data = input; 16375 16376 out.be("DIV", marko_attrs0, "0", component); 16377 16378 out.n(marko_node0, component); 16379 16380 out.be("DIV", marko_attrs1, "2", component); 16381 16382 var for__3 = 0; 16383 16384 marko_forEach(input.checkboxes.conversionTypes, function (checkbox) {
16385 var keyscope__4 = "[" + (for__3++ + "]"); 16386 16387 out.be("DIV", marko_attrs21, "5" + keyscope__4, component); 16388 16389 aui_checkbox_tag({ 16390 label: checkbox.label, 16391 inputClass: "basic-checkbox--input", 16392 click: input.handlers.check, 16393 name: checkbox.name, 16394 checked: input.filters.types[checkbox.name], 16395 group: "types" 16396 }, out, __component, "6" + keyscope__4); 16397 16398 out.ee(); 16399 }); 16400 16401 out.ee(); 16402 16403 out.e("DIV", marko_attrs2, "7", component, 2).e("DIV", marko_attrs22, "8", component, 1, 0, { 16404 onclick: __component.d("click", "toggleCheckboxes", false, ["types", "all"]) 16405 }).t("all").e("DIV", marko_attrs23, "9", component, 1, 0, { 16406 onclick: __component.d("click", "toggleCheckboxes", false, ["types", "clear"]) 16407 }).t("clear"); 16408 16409 out.ee(); 16410 16411 out.be("DIV", marko_attrs3, "10", component); 16412 16413 out.be("DIV", marko_attrs4, "11", component); 16414 16415 aui_input_tag({ 16416 label: "subid", 16417 name: "utmContent", 16418 change: input.handlers.change, 16419 value: input.filters.utmContent, 16420 dataTestId: "utmContent" 16421 }, out, __component, "12"); 16422 16423 out.ee(); 16424 16425 out.be("DIV", marko_attrs5, "13", component); 16426 16427 aui_input_tag({ 16428 label: "clickid", 16429 name: "data2", 16430 change: input.handlers.change, 16431 value: input.filters.data2, 16432 dataTestId: "data2" 16433 }, out, __component, "14"); 16434 16435 out.ee(); 16436 16437 out.ee(); 16438 16439 out.be("DIV", marko_attrs6, "15", component); 16440 16441 out.n(marko_node1, component); 16442 16443 out.be("DIV", marko_attrs7, "17", component); 16444 16445 out.be("DIV", marko_attrs8, "18", component); 16446 16447 aui_checkbox_tag({ 16448 label: "Only in $", 16449 inputClass: "basic-checkbox--input", 16450 name: "USD", 16451 click: input.handlers.changeCurrency, 16452 checked: input.filters.currency === "USD" 16453 }, out, __component, "19"); 16454 16455 out.ee(); 16456 16457 out.be("DIV", marko_attrs9, "20", component); 16458 16459 aui_checkbox_tag({ 16460 label: "Only in â¬", 16461 inputClass: "basic-checkbox--input", 16462 name: "EUR", 16463 click: input.handlers.changeCurrency, 16464 checked: input.filters.currency === "EUR" 16465 }, out, __component, "21"); 16466 16467 out.ee(); 16468 16469 out.be("DIV", marko_attrs10, "22", component); 16470 16471 aui_checkbox_tag({ 16472 label: "Only in £", 16473 inputClass: "basic-checkbox--input", 16474 name: "GBP", 16475 click: input.handlers.changeCurrency, 16476 checked: input.filters.currency === "GBP" 16477 }, out, __component, "23"); 16478 16479 out.ee(); 16480 16481 out.be("DIV", marko_attrs11, "24", component); 16482 16483 aui_checkbox_tag({ 16484 label: "Only in â½", 16485 inputClass: "basic-checkbox--input", 16486 name: "RUB", 16487 click: input.handlers.changeCurrency, 16488 checked: input.filters.currency === "RUB" 16489 }, out, __component, "25"); 16490 16491 out.ee(); 16492 16493 out.be("DIV", marko_attrs12, "26", component); 16494 16495 aui_checkbox_tag({ 16496 label: "Show all conversions", 16497 inputClass: "basic-checkbox--input", 16498 name: "ALL", 16499 click: input.handlers.changeCurrency, 16500 checked: input.filters.currency === "ALL" 16501 }, out, __component, "27"); 16502 16503 out.ee(); 16504 16505 out.ee(); 16506 16507 out.ee(); 16508 16509 out.be("DIV", marko_attrs13, "28", component); 16510 16511 out.n(marko_node2, component); 16512 16513 out.be("DIV", marko_attrs14, "30", component); 16514 16515 out.be("DIV", marko_attrs15, "31", component); 16516 16517 aui_checkbox_tag({ 16518 label: "Approved", 16519 inputClass: "basic-checkbox--input", 16520 name: "approved", 16521 checked: input.filters.status.approved, 16522 group: "status", 16523 click: input.handlers.check 16524 }, out, __component, "32"); 16525 16526 out.ee(); 16527 16528 out.be("DIV", marko_attrs16, "33", component); 16529 16530 aui_checkbox_tag({ 16531 label: "Declined", 16532 inputClass: "basic-checkbox--input", 16533 name: "declined", 16534 checked: input.filters.status.declined, 16535 group: "status", 16536 click: input.handlers.check 16537 }, out, __component, "34"); 16538 16539 out.ee(); 16540 16541 out.ee(); 16542 16543 out.e("DIV", marko_attrs17, "35", component, 2).e("DIV", marko_attrs24, "36", component, 1, 0, { 16544 onclick: __component.d("click", "toggleCheckboxes", false, ["status", "all"]) 16545 }).t("all").e("DIV", marko_attrs25, "37", component, 1, 0, { 16546 onclick: __component.d("click", "toggleCheckboxes", false, ["status", "clear"]) 16547 }).t("clear"); 16548 16549 out.ee(); 16550 16551 out.be("DIV", marko_attrs18, "38", component); 16552 16553 out.n(marko_node3, component); 16554 16555 out.be("DIV", marko_attrs19, "40", component); 16556 16557 var for__41 = 0; 16558 16559 marko_forEach(input.checkboxes.columns, function (checkbox) { 16560 var keyscope__42 = "[" + (for__41++ + "]"); 16561 16562 out.be("DIV", marko_attrs26, "43" + keyscope__42, component); 16563 16564 aui_checkbox_tag({ 16565 label: checkbox.label, 16566 inputClass: "basic-checkbox--input", 16567 click: input.handlers.check, 16568 name: checkbox.name, 16569 checked: input.filters.columns[checkbox.name], 16570 group: "columns" 16571 }, out, __component, "44" + keyscope__42); 16572 16573 out.ee(); 16574 }); 16575 16576 out.ee(); 16577 16578 out.e("DIV", marko_attrs20, "45", component, 2).e("DIV", marko_attrs27, "46", component, 1, 0, { 16579 onclick: __component.d("click", "toggleCheckboxes", false, ["columns", "all"]) 16580 }).t("all").e("DIV", marko_attrs28, "47", component, 1, 0, { 16581 onclick: __component.d("click", "toggleCheckboxes", false, ["columns", "clear"]) 16582 }).t("clear"); 16583 16584 out.ee(); 16585} 16586 16587marko_template._ = marko_renderer(render, { 16588 _l_: marko_componentType 16589}
16589, marko_component); 16590 16591marko_template.Component = marko_defineComponent(marko_component, marko_template._); 16592}); 16593$_mod.def("/panel-adsempiredirect$1.0.0/views/types/index", function(require, exports, module, __filename, __dirname) { var Direct = require('/panel-adsempiredirect$1.0.0/views/types/Direct'/*"./Direct"*/); 16594var drScores = require('/panel-adsempiredirect$1.0.0/views/types/components/drScores.marko'/*"./components/drScores.marko"*/); 16595var defaultLogin = require('/panel-adsempiredirect$1.0.0/views/types/components/defaultLogin.marko'/*"./components/defaultLogin.marko"*/); 16596var defaultRestore = require('/panel-adsempiredirect$1.0.0/views/types/components/defaultRestore.marko'/*"./components/defaultRestore.marko"*/); 16597var drOfferwallHeader = require('/panel-adsempiredirect$1.0.0/views/types/components/offerwallHeaderDr.marko'/*"./components/offerwallHeaderDr.marko"*/); 16598var drReportHeaders = require('/panel-adsempiredirect$1.0.0/views/types/components/reportHeadersDr.marko'/*"./components/reportHeadersDr.marko"*/); 16599var drBasic = require('/panel-adsempiredirect$1.0.0/views/types/components/drBasic.marko'/*"./components/drBasic.marko"*/); 16600var drAdvanced = require('/panel-adsempiredirect$1.0.0/views/types/components/drAdvanced.marko'/*"./components/drAdvanced.marko"*/); 16601 16602function getModelNetwork(type) { 16603 return new Direct(); 16604} 16605 16606function getScores(type) { 16607 return drScores; 16608} 16609 16610function getLogin(type) { 16611 return defaultLogin; 16612} 16613 16614function getRestore(type) { 16615 return defaultRestore; 16616} 16617 16618function getOfferWallHeader(type) { 16619 return drOfferwallHeader; 16620} 16621 16622function getReportHeader(type) { 16623 return drReportHeaders; 16624} 16625 16626function getTransactionReportBasic(type) { 16627 return drBasic; 16628} 16629 16630function getTransactionReportAdvanced(type) { 16631 return drAdvanced; 16632} 16633 16634module.exports = { 16635 getModelNetwork: getModelNetwork, 16636 getScores: getScores, 16637 getLogin: getLogin, 16638 getRestore: getRestore, 16639 getOfferWallHeader: getOfferWallHeader, 16640 getReportHeader: getReportHeader, 16641 getTransactionReportBasic: getTransactionReportBasic, 16642 getTransactionReportAdvanced: getTransactionReportAdvanced 16643}; 16644}); 16645$_mod.def("/panel-adsempiredirect$1.0.0/views/pages/login/components/page-state/index.marko", function(require, exports, module, __filename, __dirname) { // Compiled using [email protected] - DO NOT EDIT 16646"use strict"; 16647 16648var marko_template = module.exports = require('/marko$4.14.8/dist/vdom'/*"marko/dist/vdom"*/).t(), 16649 marko_helpers = require('/marko$4.14.8/dist/runtime/vdom/helpers'/*"marko/dist/runtime/vdom/helpers"*/), 16650 marko_classList = marko_helpers.cl, 16651 components_helpers = require('/marko$4.14.8/dist/components/helpers-browser'/*"marko/dist/components/helpers"*/), 16652 marko_registerComponent = components_helpers.rc, 16653 marko_componentType = marko_registerComponent("/panel-adsempiredirect$1.0.0/views/pages/login/components/page-state/index.marko", function () { 16654 return module.exports; 16655}), 16656 marko_component = require('/panel-adsempiredirect$1.0.0/views/pages/login/components/page-state/component'/*"./component"*/), 16657 marko_renderer = components_helpers.r, 16658 marko_defineComponent = components_helpers.c, 16659 module_index_module = require('/panel-adsempiredirect$1.0.0/views/types/index'/*"../../../../types/index.js"*/), 16660 index_module = module_index_module.default || module_index_module, 16661 getLogin = module_index_module.getLogin, 16662 getRestore = module_index_module.getRestore, 16663 marko_loadTag = marko_helpers.t, 16664 include_tag = marko_loadTag(require('/marko$4.14.8/dist/taglibs/core/include-tag'/*"marko/dist/taglibs/core/include-tag"*/)), 16665 marko_classAttr = marko_helpers.ca; 16666 16667function render(input, out, __component, component, state) { 16668 var data = input; 16669 16670 out.be("DIV", { 16671 "class": marko_classAttr(marko_classList(["login-page--outer-container", { 16672 "system--display--none": state.isRestoreForm 16673 }])) 16674 }, "0", component, null, 4); 16675 16676 include_tag({ 16677 _target: getLogin("direct"), 16678 form: state.form, 16679 isShowGoogleRecaptcha: state.isShowGoogleRecaptcha, 16680 googleCaptchaClient: state.googleCaptchaClient, 16681 errorMessage: state.errorMessage, 16682 successMessage: state.successMessage 16683 }, out, __component, "1", [["change", "change", false], ["submit", "submit", false], ["showRestore", "showRestore", false]]); 16684 16685 out.ee(); 16686 16687 out.be("DIV", { 16688 "class": marko_classAttr(marko_classList(["login-page--outer-container", { 16689 "system--display--none": state.isLoginForm 16690 }])) 16691 }, "2", component, null, 4); 16692 16693 include_tag({ 16694 _target: getRestore("direct"), 16695 restoreForm: state.restoreForm, 16696 errorMessage: state.errorMessage, 16697 successMessage: state.successMessage 16698 }, out, __component, "3", [["change", "changeRestoreForm", false], ["submitRestore", "submitRestore", false], ["showLogin", "showLogin", false]]); 16699 16700 out.ee(); 16701} 16702 16703marko_template._ = marko_renderer(render, { 16704 _l_: marko_componentType 16705}
16705, marko_component); 16706 16707marko_template.Component = marko_defineComponent(marko_component, marko_template._); 16708});
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.