text
stringlengths
2
1.05M
(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{nI0H:function(e,t,r){"use strict";r.r(t),r.d(t,"ion_spinner",(function(){return o}));var s=r("ePDZ"),n=r("ws0j"),i=r("hcCc"),a=r("6i10");const o=class{constructor(e){Object(s.q)(this,e),this.paused=!1}getName(){const e=this.name||n.c.get("spinner"),t=Object(n.b)(this);return e||("ios"===t?"lines":"circular")}render(){const e=Object(n.b)(this),t=this.getName(),r=a.a[t]||a.a.lines,o="number"==typeof this.duration&&this.duration>10?this.duration:r.dur,p=[];if(void 0!==r.circles)for(let s=0;s<r.circles;s++)p.push(l(r,o,s,r.circles));else if(void 0!==r.lines)for(let s=0;s<r.lines;s++)p.push(c(r,o,s,r.lines));return Object(s.l)(s.c,{class:Object.assign(Object.assign({},Object(i.a)(this.color)),{[e]:!0,["spinner-"+t]:!0,"spinner-paused":!!this.paused||n.c.getBoolean("_testing")}),role:"progressbar",style:r.elmDuration?{animationDuration:o+"ms"}:{}},p)}},l=(e,t,r,n)=>{const i=e.fn(t,r,n);return i.style["animation-duration"]=t+"ms",Object(s.l)("svg",{viewBox:i.viewBox||"0 0 64 64",style:i.style},Object(s.l)("circle",{transform:i.transform||"translate(32,32)",cx:i.cx,cy:i.cy,r:i.r,style:e.elmDuration?{animationDuration:t+"ms"}:{}}))},c=(e,t,r,n)=>{const i=e.fn(t,r,n);return i.style["animation-duration"]=t+"ms",Object(s.l)("svg",{viewBox:i.viewBox||"0 0 64 64",style:i.style},Object(s.l)("line",{transform:"translate(32,32)",y1:i.y1,y2:i.y2}))};o.style=":host{display:inline-block;position:relative;width:28px;height:28px;color:var(--color);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.ion-color){color:var(--ion-color-base)}svg{left:0;top:0;-webkit-transform-origin:center;transform-origin:center;position:absolute;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0)}[dir=rtl] svg,:host-context([dir=rtl]) svg{left:unset;right:unset;right:0}[dir=rtl] svg,:host-context([dir=rtl]) svg{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}:host(.spinner-lines) line,:host(.spinner-lines-small) line{stroke-width:4px;stroke-linecap:round;stroke:currentColor}:host(.spinner-lines) svg,:host(.spinner-lines-small) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite}:host(.spinner-bubbles) svg{-webkit-animation:spinner-scale-out 1s linear infinite;animation:spinner-scale-out 1s linear infinite;fill:currentColor}:host(.spinner-circles) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite;fill:currentColor}:host(.spinner-crescent) circle{fill:transparent;stroke-width:4px;stroke-dasharray:128px;stroke-dashoffset:82px;stroke:currentColor}:host(.spinner-crescent) svg{-webkit-animation:spinner-rotate 1s linear infinite;animation:spinner-rotate 1s linear infinite}:host(.spinner-dots) circle{stroke-width:0;fill:currentColor}:host(.spinner-dots) svg{-webkit-animation:spinner-dots 1s linear infinite;animation:spinner-dots 1s linear infinite}:host(.spinner-circular){-webkit-animation:spinner-circular linear infinite;animation:spinner-circular linear infinite}:host(.spinner-circular) circle{-webkit-animation:spinner-circular-inner ease-in-out infinite;animation:spinner-circular-inner ease-in-out infinite;stroke:currentColor;stroke-dasharray:80px, 200px;stroke-dashoffset:0px;stroke-width:5.6;fill:none}:host(.spinner-paused),:host(.spinner-paused) svg,:host(.spinner-paused) circle{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@-webkit-keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@-webkit-keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}@keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}"}}]);
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "fb15"); /******/ }) /************************************************************************/ /******/ ({ /***/ "00ee": /***/ (function(module, exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ "06cf": /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__("83ab"); var call = __webpack_require__("c65b"); var propertyIsEnumerableModule = __webpack_require__("d1e7"); var createPropertyDescriptor = __webpack_require__("5c6c"); var toIndexedObject = __webpack_require__("fc6a"); var toPropertyKey = __webpack_require__("a04b"); var hasOwn = __webpack_require__("1a2d"); var IE8_DOM_DEFINE = __webpack_require__("0cfb"); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); }; /***/ }), /***/ "07fa": /***/ (function(module, exports, __webpack_require__) { var toLength = __webpack_require__("50c4"); // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike module.exports = function (obj) { return toLength(obj.length); }; /***/ }), /***/ "0b42": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isArray = __webpack_require__("e8b5"); var isConstructor = __webpack_require__("68ee"); var isObject = __webpack_require__("861d"); var wellKnownSymbol = __webpack_require__("b622"); var SPECIES = wellKnownSymbol('species'); var Array = global.Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? Array : C; }; /***/ }), /***/ "0cfb": /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__("83ab"); var fails = __webpack_require__("d039"); var createElement = __webpack_require__("cc12"); // Thank's IE8 for his funny defineProperty module.exports = !DESCRIPTORS && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- requied for testing return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "0d51": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var String = global.String; module.exports = function (argument) { try { return String(argument); } catch (error) { return 'Object'; } }; /***/ }), /***/ "1157": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * jQuery JavaScript Library v3.6.0 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2021-03-02T17:08Z */ ( function( global, factory ) { "use strict"; if ( true && typeof module.exports === "object" ) { // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get jQuery. // For environments that do not have a `window` with a `document` // (such as Node.js), expose a factory as module.exports. // This accentuates the need for the creation of a real `window`. // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info. module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common // enough that all such attempts are guarded in a try block. "use strict"; var arr = []; var getProto = Object.getPrototypeOf; var slice = arr.slice; var flat = arr.flat ? function( array ) { return arr.flat.call( array ); } : function( array ) { return arr.concat.apply( [], array ); }; var push = arr.push; var indexOf = arr.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var fnToString = hasOwn.toString; var ObjectFunctionString = fnToString.call( Object ); var support = {}; var isFunction = function isFunction( obj ) { // Support: Chrome <=57, Firefox <=52 // In some browsers, typeof returns "function" for HTML <object> elements // (i.e., `typeof document.createElement( "object" ) === "function"`). // We don't want to classify *any* DOM node as a function. // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 // Plus for old WebKit, typeof returns "function" for HTML collections // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function"; }; var isWindow = function isWindow( obj ) { return obj != null && obj === obj.window; }; var document = window.document; var preservedScriptAttributes = { type: true, src: true, nonce: true, noModule: true }; function DOMEval( code, node, doc ) { doc = doc || document; var i, val, script = doc.createElement( "script" ); script.text = code; if ( node ) { for ( i in preservedScriptAttributes ) { // Support: Firefox 64+, Edge 18+ // Some browsers don't support the "nonce" property on scripts. // On the other hand, just using `getAttribute` is not enough as // the `nonce` attribute is reset to an empty string whenever it // becomes browsing-context connected. // See https://github.com/whatwg/html/issues/2369 // See https://html.spec.whatwg.org/#nonce-attributes // The `node.getAttribute` check was added for the sake of // `jQuery.globalEval` so that it can fake a nonce-containing node // via an object. val = node[ i ] || node.getAttribute && node.getAttribute( i ); if ( val ) { script.setAttribute( i, val ); } } } doc.head.appendChild( script ).parentNode.removeChild( script ); } function toType( obj ) { if ( obj == null ) { return obj + ""; } // Support: Android <=2.3 only (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call( obj ) ] || "object" : typeof obj; } /* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global // unguarded in another place, it seems safer to define global only for this module var version = "3.6.0", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { // Return all the elements in a clean array if ( num == null ) { return slice.call( this ); } // Return just the one element from the set return num < 0 ? this[ num + this.length ] : this[ num ]; }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. each: function( callback ) { return jQuery.each( this, callback ); }, map: function( callback ) { return this.pushStack( jQuery.map( this, function( elem, i ) { return callback.call( elem, i, elem ); } ) ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, even: function() { return this.pushStack( jQuery.grep( this, function( _elem, i ) { return ( i + 1 ) % 2; } ) ); }, odd: function() { return this.pushStack( jQuery.grep( this, function( _elem, i ) { return i % 2; } ) ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: arr.sort, splice: arr.splice }; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // Skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !isFunction( target ) ) { target = {}; } // Extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( ( options = arguments[ i ] ) != null ) { // Extend the base object for ( name in options ) { copy = options[ name ]; // Prevent Object.prototype pollution // Prevent never-ending loop if ( name === "__proto__" || target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = Array.isArray( copy ) ) ) ) { src = target[ name ]; // Ensure proper type for the source value if ( copyIsArray && !Array.isArray( src ) ) { clone = []; } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { clone = {}; } else { clone = src; } copyIsArray = false; // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend( { // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, noop: function() {}, isPlainObject: function( obj ) { var proto, Ctor; // Detect obvious negatives // Use toString instead of jQuery.type to catch host objects if ( !obj || toString.call( obj ) !== "[object Object]" ) { return false; } proto = getProto( obj ); // Objects with no prototype (e.g., `Object.create( null )`) are plain if ( !proto ) { return true; } // Objects with prototype are plain iff they were constructed by a global Object function Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; }, isEmptyObject: function( obj ) { var name; for ( name in obj ) { return false; } return true; }, // Evaluates a script in a provided context; falls back to the global one // if not specified. globalEval: function( code, options, doc ) { DOMEval( code, { nonce: options && options.nonce }, doc ); }, each: function( obj, callback ) { var length, i = 0; if ( isArrayLike( obj ) ) { length = obj.length; for ( ; i < length; i++ ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } else { for ( i in obj ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } return obj; }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { return arr == null ? -1 : indexOf.call( arr, elem, i ); }, // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { var len = +second.length, j = 0, i = first.length; for ( ; j < len; j++ ) { first[ i++ ] = second[ j ]; } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var length, value, i = 0, ret = []; // Go through the array, translating each of the items to their new values if ( isArrayLike( elems ) ) { length = elems.length; for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return flat( ret ); }, // A global GUID counter for objects guid: 1, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support } ); if ( typeof Symbol === "function" ) { jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; } // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), function( _i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); function isArrayLike( obj ) { // Support: real iOS 8.2 only (not reproducible in simulator) // `in` check used to prevent JIT error (gh-2145) // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE var length = !!obj && "length" in obj && obj.length, type = toType( obj ); if ( isFunction( obj ) || isWindow( obj ) ) { return false; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v2.3.6 * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://js.foundation/ * * Date: 2021-02-16 */ ( function( window ) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // Instance methods hasOwn = ( {} ).hasOwnProperty, arr = [], pop = arr.pop, pushNative = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf as it's faster than native // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; for ( ; i < len; i++ ) { if ( list[ i ] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + "ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] // or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rdescend = new RegExp( whitespace + "|>" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + identifier + ")" ), "CLASS": new RegExp( "^\\.(" + identifier + ")" ), "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rhtml = /HTML$/i, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, // CSS escapes // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), funescape = function( escape, nonHex ) { var high = "0x" + escape.slice( 1 ) - 0x10000; return nonHex ? // Strip the backslash prefix from a non-hex escape sequence nonHex : // Replace a hexadecimal escape sequence with the encoded Unicode code point // Support: IE <=11+ // For values outside the Basic Multilingual Plane (BMP), manually construct a // surrogate pair high < 0 ? String.fromCharCode( high + 0x10000 ) : String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, // CSS string/identifier serialization // https://drafts.csswg.org/cssom/#common-serializing-idioms rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, fcssescape = function( ch, asCodePoint ) { if ( asCodePoint ) { // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER if ( ch === "\0" ) { return "\uFFFD"; } // Control characters and (dependent upon position) numbers get escaped as code points return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; } // Other potentially-special ASCII characters get backslash-escaped return "\\" + ch; }, // Used for iframes // See setDocument() // Removing the function wrapper causes a "Permission Denied" // error in IE unloadHandler = function() { setDocument(); }, inDisabledFieldset = addCombinator( function( elem ) { return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; }, { dir: "parentNode", next: "legend" } ); // Optimize for push.apply( _, NodeList ) try { push.apply( ( arr = slice.call( preferredDoc.childNodes ) ), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply // eslint-disable-next-line no-unused-expressions arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { pushNative.apply( target, slice.call( els ) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( ( target[ j++ ] = els[ i++ ] ) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var m, i, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, // nodeType defaults to 9, since context defaults to document nodeType = context ? context.nodeType : 9; results = results || []; // Return early from calls with invalid selector or context if ( typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { return results; } // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { setDocument( context ); context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { // ID selector if ( ( m = match[ 1 ] ) ) { // Document context if ( nodeType === 9 ) { if ( ( elem = context.getElementById( m ) ) ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } // Element context } else { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( newContext && ( elem = newContext.getElementById( m ) ) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Type selector } else if ( match[ 2 ] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // Take advantage of querySelectorAll if ( support.qsa && !nonnativeSelectorCache[ selector + " " ] && ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && // Support: IE 8 only // Exclude object elements ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { newSelector = selector; newContext = context; // qSA considers elements outside a scoping root when evaluating child or // descendant combinators, which is not what we want. // In such cases, we work around the behavior by prefixing every selector in the // list with an ID selector referencing the scope context. // The technique has to be used as well when a leading combinator is used // as such selectors are not recognized by querySelectorAll. // Thanks to Andrew Dupont for this technique. if ( nodeType === 1 && ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { // Expand context for sibling selectors newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; // We can use :scope instead of the ID hack if the browser // supports it & if we're not changing the context. if ( newContext !== context || !support.scope ) { // Capture the context ID, setting it first if necessary if ( ( nid = context.getAttribute( "id" ) ) ) { nid = nid.replace( rcssescape, fcssescape ); } else { context.setAttribute( "id", ( nid = expando ) ); } } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; while ( i-- ) { groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + toSelector( groups[ i ] ); } newSelector = groups.join( "," ); } try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch ( qsaError ) { nonnativeSelectorCache( selector, true ); } finally { if ( nid === expando ) { context.removeAttribute( "id" ); } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return ( cache[ key + " " ] = value ); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { var el = document.createElement( "fieldset" ); try { return !!fn( el ); } catch ( e ) { return false; } finally { // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } // release memory in IE el = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split( "|" ), i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[ i ] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( ( cur = cur.nextSibling ) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return ( name === "input" || name === "button" ) && elem.type === type; }; } /** * Returns a function to use in pseudos for :enabled/:disabled * @param {Boolean} disabled true for :disabled; false for :enabled */ function createDisabledPseudo( disabled ) { // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable return function( elem ) { // Only certain elements can match :enabled or :disabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled if ( "form" in elem ) { // Check for inherited disabledness on relevant non-disabled elements: // * listed form-associated elements in a disabled fieldset // https://html.spec.whatwg.org/multipage/forms.html#category-listed // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled // * option elements in a disabled optgroup // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled // All such elements have a "form" property. if ( elem.parentNode && elem.disabled === false ) { // Option elements defer to a parent optgroup if present if ( "label" in elem ) { if ( "label" in elem.parentNode ) { return elem.parentNode.disabled === disabled; } else { return elem.disabled === disabled; } } // Support: IE 6 - 11 // Use the isDisabled shortcut property to check for disabled fieldset ancestors return elem.isDisabled === disabled || // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && inDisabledFieldset( elem ) === disabled; } return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't // even exist on them, let alone have a boolean value. } else if ( "label" in elem ) { return elem.disabled === disabled; } // Remaining elements are neither :enabled nor :disabled return false; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction( function( argument ) { argument = +argument; return markFunction( function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ ( j = matchIndexes[ i ] ) ] ) { seed[ j ] = !( matches[ j ] = seed[ j ] ); } } } ); } ); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { var namespace = elem && elem.namespaceURI, docElem = elem && ( elem.ownerDocument || elem ).documentElement; // Support: IE <=8 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes // https://bugs.jquery.com/ticket/4833 return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Update global variables document = doc; docElem = document.documentElement; documentIsHTML = !isXML( document ); // Support: IE 9 - 11+, Edge 12 - 18+ // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq if ( preferredDoc != document && ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { // Support: IE 11, Edge if ( subWindow.addEventListener ) { subWindow.addEventListener( "unload", unloadHandler, false ); // Support: IE 9 - 10 only } else if ( subWindow.attachEvent ) { subWindow.attachEvent( "onunload", unloadHandler ); } } // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, // Safari 4 - 5 only, Opera <=11.6 - 12.x only // IE/Edge & older browsers don't support the :scope pseudo-class. // Support: Safari 6.0 only // Safari 6.0 supports :scope but it's an alias of :root there. support.scope = assert( function( el ) { docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); return typeof el.querySelectorAll !== "undefined" && !el.querySelectorAll( ":scope fieldset div" ).length; } ); /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) support.attributes = assert( function( el ) { el.className = "i"; return !el.getAttribute( "className" ); } ); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert( function( el ) { el.appendChild( document.createComment( "" ) ); return !el.getElementsByTagName( "*" ).length; } ); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test support.getById = assert( function( el ) { docElem.appendChild( el ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; } ); // ID filter and find if ( support.getById ) { Expr.filter[ "ID" ] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute( "id" ) === attrId; }; }; Expr.find[ "ID" ] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { Expr.filter[ "ID" ] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode( "id" ); return node && node.value === attrId; }; }; // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut Expr.find[ "ID" ] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); if ( elem ) { // Verify the id attribute node = elem.getAttributeNode( "id" ); if ( node && node.value === id ) { return [ elem ]; } // Fall back on getElementsByName elems = context.getElementsByName( id ); i = 0; while ( ( elem = elems[ i++ ] ) ) { node = elem.getAttributeNode( "id" ); if ( node && node.value === id ) { return [ elem ]; } } } return []; } }; } // Tag Expr.find[ "TAG" ] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); // DocumentFragment nodes don't have gEBTN } else if ( support.qsa ) { return context.querySelectorAll( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( ( elem = results[ i++ ] ) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert( function( el ) { var input; // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // https://bugs.jquery.com/ticket/12359 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>"; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !el.querySelectorAll( "[selected]" ).length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { rbuggyQSA.push( "~=" ); } // Support: IE 11+, Edge 15 - 18+ // IE 11/Edge don't find elements on a `[name='']` query in some cases. // Adding a temporary attribute to the document before the selection works // around the issue. // Interestingly, IE 10 & older don't seem to have the issue. input = document.createElement( "input" ); input.setAttribute( "name", "" ); el.appendChild( input ); if ( !el.querySelectorAll( "[name='']" ).length ) { rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + "*(?:''|\"\")" ); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !el.querySelectorAll( ":checked" ).length ) { rbuggyQSA.push( ":checked" ); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibling-combinator selector` fails if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { rbuggyQSA.push( ".#.+[+~]" ); } // Support: Firefox <=3.6 - 5 only // Old Firefox doesn't throw on a badly-escaped identifier. el.querySelectorAll( "\\\f" ); rbuggyQSA.push( "[\\r\\n\\f]" ); } ); assert( function( el ) { el.innerHTML = "<a href='' disabled='disabled'></a>" + "<select disabled='disabled'><option/></select>"; // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = document.createElement( "input" ); input.setAttribute( "type", "hidden" ); el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( el.querySelectorAll( "[name=d]" ).length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: IE9-11+ // IE's :disabled selector does not pick up the children of disabled fieldsets docElem.appendChild( el ).disabled = true; if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: Opera 10 - 11 only // Opera 10-11 does not throw on post-comma invalid pseudos el.querySelectorAll( "*,:x" ); rbuggyQSA.push( ",.*:" ); } ); } if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector ) ) ) ) { assert( function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( el, "*" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); } ); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 ) ); } : function( a, b ) { if ( b ) { while ( ( b = b.parentNode ) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { // Choose the first element that is related to our preferred document // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq if ( a == document || a.ownerDocument == preferredDoc && contains( preferredDoc, a ) ) { return -1; } // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq if ( b == document || b.ownerDocument == preferredDoc && contains( preferredDoc, b ) ) { return 1; } // Maintain original order return sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. /* eslint-disable eqeqeq */ return a == document ? -1 : b == document ? 1 : /* eslint-enable eqeqeq */ aup ? -1 : bup ? 1 : sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( ( cur = cur.parentNode ) ) { ap.unshift( cur ); } cur = b; while ( ( cur = cur.parentNode ) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[ i ] === bp[ i ] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[ i ], bp[ i ] ) : // Otherwise nodes in our document sort first // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. /* eslint-disable eqeqeq */ ap[ i ] == preferredDoc ? -1 : bp[ i ] == preferredDoc ? 1 : /* eslint-enable eqeqeq */ 0; }; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { setDocument( elem ); if ( support.matchesSelector && documentIsHTML && !nonnativeSelectorCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch ( e ) { nonnativeSelectorCache( expr, true ); } } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq if ( ( context.ownerDocument || context ) != document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq if ( ( elem.ownerDocument || elem ) != document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : ( val = elem.getAttributeNode( name ) ) && val.specified ? val.value : null; }; Sizzle.escape = function( sel ) { return ( sel + "" ).replace( rcssescape, fcssescape ); }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( ( elem = results[ i++ ] ) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( ( node = elem[ i++ ] ) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[ 1 ] = match[ 1 ].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" ).replace( runescape, funescape ); if ( match[ 2 ] === "~=" ) { match[ 3 ] = " " + match[ 3 ] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[ 1 ] = match[ 1 ].toLowerCase(); if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[ 3 ] ) { Sizzle.error( match[ 0 ] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[ 4 ] = +( match[ 4 ] ? match[ 5 ] + ( match[ 6 ] || 1 ) : 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); // other types prohibit arguments } else if ( match[ 3 ] ) { Sizzle.error( match[ 0 ] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[ 6 ] && match[ 2 ]; if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { return null; } // Accept quoted arguments as-is if ( match[ 3 ] ) { match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) ( excess = tokenize( unquoted, true ) ) && // advance to the next closing parenthesis ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { // excess is a negative index match[ 0 ] = match[ 0 ].slice( 0, excess ); match[ 2 ] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || ( pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute( "class" ) || "" ); } ); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; /* eslint-disable max-len */ return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; /* eslint-enable max-len */ }; }, "CHILD": function( type, what, _argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, _context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( ( node = node[ dir ] ) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index // ...in a gzip-friendly way node = parent; outerCache = node[ expando ] || ( node[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || ( outerCache[ node.uniqueID ] = {} ); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( ( node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start ( diff = nodeIndex = 0 ) || start.pop() ) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } } else { // Use previously-cached element index if available if ( useCache ) { // ...in a gzip-friendly way node = elem; outerCache = node[ expando ] || ( node[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || ( outerCache[ node.uniqueID ] = {} ); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex; } // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { // Use the same loop as above to seek `elem` from the start while ( ( node = ++nodeIndex && node && node[ dir ] || ( diff = nodeIndex = 0 ) || start.pop() ) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { outerCache = node[ expando ] || ( node[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || ( outerCache[ node.uniqueID ] = {} ); uniqueCache[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction( function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf( seed, matched[ i ] ); seed[ idx ] = !( matches[ idx ] = matched[ i ] ); } } ) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction( function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction( function( seed, matches, _context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( ( elem = unmatched[ i ] ) ) { seed[ i ] = !( matches[ i ] = elem ); } } } ) : function( elem, _context, xml ) { input[ 0 ] = elem; matcher( input, null, xml, results ); // Don't keep the element (issue #299) input[ 0 ] = null; return !results.pop(); }; } ), "has": markFunction( function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; } ), "contains": markFunction( function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; }; } ), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test( lang || "" ) ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( ( elemLang = documentIsHTML ? elem.lang : elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); return false; }; } ), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && ( !document.hasFocus || document.hasFocus() ) && !!( elem.type || elem.href || ~elem.tabIndex ); }, // Boolean properties "enabled": createDisabledPseudo( false ), "disabled": createDisabledPseudo( true ), "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return ( nodeName === "input" && !!elem.checked ) || ( nodeName === "option" && !!elem.selected ); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { // eslint-disable-next-line no-unused-expressions elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos[ "empty" ]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( ( attr = elem.getAttribute( "type" ) ) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo( function() { return [ 0 ]; } ), "last": createPositionalPseudo( function( _matchIndexes, length ) { return [ length - 1 ]; } ), "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; } ), "even": createPositionalPseudo( function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; } ), "odd": createPositionalPseudo( function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; } ), "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument > length ? length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; } ), "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; } ) } }; Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || ( match = rcomma.exec( soFar ) ) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[ 0 ].length ) || soFar; } groups.push( ( tokens = [] ) ); } matched = false; // Combinators if ( ( match = rcombinators.exec( soFar ) ) ) { matched = match.shift(); tokens.push( { value: matched, // Cast descendant combinators to space type: match[ 0 ].replace( rtrim, " " ) } ); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || ( match = preFilters[ type ]( match ) ) ) ) { matched = match.shift(); tokens.push( { value: matched, type: type, matches: match } ); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[ i ].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, skip = combinator.next, key = skip || dir, checkNonElements = base && key === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( ( elem = elem[ dir ] ) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } return false; } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, uniqueCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { while ( ( elem = elem[ dir ] ) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( ( elem = elem[ dir ] ) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || ( elem[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ elem.uniqueID ] || ( outerCache[ elem.uniqueID ] = {} ); if ( skip && skip === elem.nodeName.toLowerCase() ) { elem = elem[ dir ] || elem; } else if ( ( oldCache = uniqueCache[ key ] ) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return ( newCache[ 2 ] = oldCache[ 2 ] ); } else { // Reuse newcache so results back-propagate to previous elements uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { return true; } } } } } return false; }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[ i ]( elem, context, xml ) ) { return false; } } return true; } : matchers[ 0 ]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[ i ], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( ( elem = unmatched[ i ] ) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction( function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( ( elem = temp[ i ] ) ) { matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( ( elem = matcherOut[ i ] ) ) { // Restore matcherIn since elem is not yet a final match temp.push( ( matcherIn[ i ] = elem ) ); } } postFinder( null, ( matcherOut = [] ), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( ( elem = matcherOut[ i ] ) && ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { seed[ temp ] = !( results[ temp ] = elem ); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } } ); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[ 0 ].type ], implicitRelative = leadingRelative || Expr.relative[ " " ], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( ( checkContext = context ).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; } else { matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[ j ].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens .slice( 0, i - 1 ) .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), len = elems.length; if ( outermost ) { // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq outermostContext = context == document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { if ( byElement && elem ) { j = 0; // Support: IE 11+, Edge 17 - 18+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing // two documents; shallow comparisons work. // eslint-disable-next-line eqeqeq if ( !context && elem.ownerDocument != document ) { setDocument( elem ); xml = !documentIsHTML; } while ( ( matcher = elementMatchers[ j++ ] ) ) { if ( matcher( elem, context || document, xml ) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( ( elem = !matcher && elem ) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // `i` is now the count of elements visited above, and adding it to `matchedCount` // makes the latter nonnegative. matchedCount += i; // Apply set filters to unmatched elements // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` // equals `i`), unless we didn't visit _any_ elements in the above loop because we have // no element matchers and no seed. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that // case, which will result in a "00" `matchedCount` that differs from `i` but is also // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; while ( ( matcher = setMatchers[ j++ ] ) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !( unmatched[ i ] || setMatched[ i ] ) ) { setMatched[ i ] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[ i ] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( ( selector = compiled.selector || selector ) ); results = results || []; // Try to minimize operations if there is only one selector in the list and no seed // (the latter of which guarantees us context) if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID tokens = match[ 0 ] = match[ 0 ].slice( 0 ); if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { context = ( Expr.find[ "ID" ]( token.matches[ 0 ] .replace( runescape, funescape ), context ) || [] )[ 0 ]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[ i ]; // Abort if we hit a combinator if ( Expr.relative[ ( type = token.type ) ] ) { break; } if ( ( find = Expr.find[ type ] ) ) { // Search, expanding context for leading sibling combinators if ( ( seed = find( token.matches[ 0 ].replace( runescape, funescape ), rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || context ) ) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, !context || rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert( function( el ) { // Should return 1, but returns 4 (following) return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; } ); // Support: IE<8 // Prevent attribute/property "interpolation" // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert( function( el ) { el.innerHTML = "<a href='#'></a>"; return el.firstChild.getAttribute( "href" ) === "#"; } ) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } } ); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert( function( el ) { el.innerHTML = "<input/>"; el.firstChild.setAttribute( "value", "" ); return el.firstChild.getAttribute( "value" ) === ""; } ) ) { addHandle( "value", function( elem, _name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } } ); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert( function( el ) { return el.getAttribute( "disabled" ) == null; } ) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : ( val = elem.getAttributeNode( name ) ) && val.specified ? val.value : null; } } ); } return Sizzle; } )( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; // Deprecated jQuery.expr[ ":" ] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; jQuery.escapeSelector = Sizzle.escape; var dir = function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }; var siblings = function( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; }; var rneedsContext = jQuery.expr.match.needsContext; function nodeName( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); } var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } // Arraylike of elements (jQuery, arguments, Array) if ( typeof qualifier !== "string" ) { return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not; } ); } // Filtered directly for both simple and complex selectors return jQuery.filter( qualifier, elements, not ); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } if ( elems.length === 1 && elem.nodeType === 1 ) { return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; } return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; } ) ); }; jQuery.fn.extend( { find: function( selector ) { var i, ret, len = this.length, self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } } ) ); } ret = this.pushStack( [] ); for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } return len > 1 ? jQuery.uniqueSort( ret ) : ret; }, filter: function( selector ) { return this.pushStack( winnow( this, selector || [], false ) ); }, not: function( selector ) { return this.pushStack( winnow( this, selector || [], true ) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } } ); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) // Shortcut simple #id case for speed rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function( selector, context, root ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Method init() accepts an alternate rootjQuery // so migrate can support jQuery.sub (gh-2101) root = root || rootjQuery; // Handle HTML strings if ( typeof selector === "string" ) { if ( selector[ 0 ] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && ( match[ 1 ] || !context ) ) { // HANDLE: $(html) -> $(array) if ( match[ 1 ] ) { context = context instanceof jQuery ? context[ 0 ] : context; // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[ 1 ], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[ 2 ] ); if ( elem ) { // Inject the element directly into the jQuery object this[ 0 ] = elem; this.length = 1; } return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || root ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this[ 0 ] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( isFunction( selector ) ) { return root.ready !== undefined ? root.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend( { has: function( target ) { var targets = jQuery( target, this ), l = targets.length; return this.filter( function() { var i = 0; for ( ; i < l; i++ ) { if ( jQuery.contains( this, targets[ i ] ) ) { return true; } } } ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery( selectors ); // Positional selectors never match, since there's no _selection_ context if ( !rneedsContext.test( selectors ) ) { for ( ; i < l; i++ ) { for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && ( targets ? targets.index( cur ) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector( cur, selectors ) ) ) { matched.push( cur ); break; } } } } return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); }, // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } // Index in selector if ( typeof elem === "string" ) { return indexOf.call( jQuery( elem ), this[ 0 ] ); } // Locate the position of the desired element return indexOf.call( this, // If it receives a jQuery object, the first element is used elem.jquery ? elem[ 0 ] : elem ); }, add: function( selector, context ) { return this.pushStack( jQuery.uniqueSort( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter( selector ) ); } } ); function sibling( cur, dir ) { while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} return cur; } jQuery.each( { parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return dir( elem, "parentNode" ); }, parentsUntil: function( elem, _i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, nextUntil: function( elem, _i, until ) { return dir( elem, "nextSibling", until ); }, prevUntil: function( elem, _i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return siblings( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return siblings( elem.firstChild ); }, contents: function( elem ) { if ( elem.contentDocument != null && // Support: IE 11+ // <object> elements with no `data` attribute has an object // `contentDocument` with a `null` prototype. getProto( elem.contentDocument ) ) { return elem.contentDocument; } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only // Treat the template element as a regular one in browsers that // don't support it. if ( nodeName( elem, "template" ) ) { elem = elem.content || elem; } return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var matched = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { matched = jQuery.filter( selector, matched ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { jQuery.uniqueSort( matched ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { matched.reverse(); } } return this.pushStack( matched ); }; } ); var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); // Convert String-formatted options into Object-formatted ones function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? createOptions( options ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value for non-forgettable lists memory, // Flag to know if list was already fired fired, // Flag to prevent firing locked, // Actual callback list list = [], // Queue of execution data for repeatable lists queue = [], // Index of currently firing callback (modified by add/remove as needed) firingIndex = -1, // Fire callbacks fire = function() { // Enforce single-firing locked = locked || options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for ( ; queue.length; firingIndex = -1 ) { memory = queue.shift(); while ( ++firingIndex < list.length ) { // Run callback and check for early termination if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && options.stopOnFalse ) { // Jump to end and forget the data so .add doesn't re-fire firingIndex = list.length; memory = false; } } } // Forget the data if we're done with it if ( !options.memory ) { memory = false; } firing = false; // Clean up if we're done firing for good if ( locked ) { // Keep an empty list if we have data for future add calls if ( memory ) { list = []; // Otherwise, this object is spent } else { list = ""; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // If we have memory from a past run, we should fire after adding if ( memory && !firing ) { firingIndex = list.length - 1; queue.push( memory ); } ( function add( args ) { jQuery.each( args, function( _, arg ) { if ( isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && toType( arg ) !== "string" ) { // Inspect recursively add( arg ); } } ); } )( arguments ); if ( memory && !firing ) { fire(); } } return this; }, // Remove a callback from the list remove: function() { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( index <= firingIndex ) { firingIndex--; } } } ); return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { if ( list ) { list = []; } return this; }, // Disable .fire and .add // Abort any current/pending executions // Clear all callbacks and values disable: function() { locked = queue = []; list = memory = ""; return this; }, disabled: function() { return !list; }, // Disable .fire // Also disable .add unless we have memory (since it would have no effect) // Abort any pending executions lock: function() { locked = queue = []; if ( !memory && !firing ) { list = memory = ""; } return this; }, locked: function() { return !!locked; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( !locked ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; queue.push( args ); if ( !firing ) { fire(); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; function Identity( v ) { return v; } function Thrower( ex ) { throw ex; } function adoptValue( value, resolve, reject, noValue ) { var method; try { // Check for promise aspect first to privilege synchronous behavior if ( value && isFunction( ( method = value.promise ) ) ) { method.call( value ).done( resolve ).fail( reject ); // Other thenables } else if ( value && isFunction( ( method = value.then ) ) ) { method.call( value, resolve, reject ); // Other non-thenables } else { // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: // * false: [ value ].slice( 0 ) => resolve( value ) // * true: [ value ].slice( 1 ) => resolve() resolve.apply( undefined, [ value ].slice( noValue ) ); } // For Promises/A+, convert exceptions into rejections // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in // Deferred#then to conditionally suppress rejection. } catch ( value ) { // Support: Android 4.0 only // Strict mode functions invoked without .call/.apply get global-object context reject.apply( undefined, [ value ] ); } } jQuery.extend( { Deferred: function( func ) { var tuples = [ // action, add listener, callbacks, // ... .then handlers, argument index, [final state] [ "notify", "progress", jQuery.Callbacks( "memory" ), jQuery.Callbacks( "memory" ), 2 ], [ "resolve", "done", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 0, "resolved" ], [ "reject", "fail", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 1, "rejected" ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, "catch": function( fn ) { return promise.then( null, fn ); }, // Keep pipe for back-compat pipe: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred( function( newDefer ) { jQuery.each( tuples, function( _i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; // deferred.progress(function() { bind to newDefer or newDefer.notify }) // deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); if ( returned && isFunction( returned.promise ) ) { returned.promise() .progress( newDefer.notify ) .done( newDefer.resolve ) .fail( newDefer.reject ); } else { newDefer[ tuple[ 0 ] + "With" ]( this, fn ? [ returned ] : arguments ); } } ); } ); fns = null; } ).promise(); }, then: function( onFulfilled, onRejected, onProgress ) { var maxDepth = 0; function resolve( depth, deferred, handler, special ) { return function() { var that = this, args = arguments, mightThrow = function() { var returned, then; // Support: Promises/A+ section 2.3.3.3.3 // https://promisesaplus.com/#point-59 // Ignore double-resolution attempts if ( depth < maxDepth ) { return; } returned = handler.apply( that, args ); // Support: Promises/A+ section 2.3.1 // https://promisesaplus.com/#point-48 if ( returned === deferred.promise() ) { throw new TypeError( "Thenable self-resolution" ); } // Support: Promises/A+ sections 2.3.3.1, 3.5 // https://promisesaplus.com/#point-54 // https://promisesaplus.com/#point-75 // Retrieve `then` only once then = returned && // Support: Promises/A+ section 2.3.4 // https://promisesaplus.com/#point-64 // Only check objects and functions for thenability ( typeof returned === "object" || typeof returned === "function" ) && returned.then; // Handle a returned thenable if ( isFunction( then ) ) { // Special processors (notify) just wait for resolution if ( special ) { then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ) ); // Normal processors (resolve) also hook into progress } else { // ...and disregard older resolution values maxDepth++; then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ), resolve( maxDepth, deferred, Identity, deferred.notifyWith ) ); } // Handle all other returned values } else { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Identity ) { that = undefined; args = [ returned ]; } // Process the value(s) // Default process is resolve ( special || deferred.resolveWith )( that, args ); } }, // Only normal processors (resolve) catch and reject exceptions process = special ? mightThrow : function() { try { mightThrow(); } catch ( e ) { if ( jQuery.Deferred.exceptionHook ) { jQuery.Deferred.exceptionHook( e, process.stackTrace ); } // Support: Promises/A+ section 2.3.3.3.4.1 // https://promisesaplus.com/#point-61 // Ignore post-resolution exceptions if ( depth + 1 >= maxDepth ) { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Thrower ) { that = undefined; args = [ e ]; } deferred.rejectWith( that, args ); } } }; // Support: Promises/A+ section 2.3.3.3.1 // https://promisesaplus.com/#point-57 // Re-resolve promises immediately to dodge false rejection from // subsequent errors if ( depth ) { process(); } else { // Call an optional hook to record the stack, in case of exception // since it's otherwise lost when execution goes async if ( jQuery.Deferred.getStackHook ) { process.stackTrace = jQuery.Deferred.getStackHook(); } window.setTimeout( process ); } }; } return jQuery.Deferred( function( newDefer ) { // progress_handlers.add( ... ) tuples[ 0 ][ 3 ].add( resolve( 0, newDefer, isFunction( onProgress ) ? onProgress : Identity, newDefer.notifyWith ) ); // fulfilled_handlers.add( ... ) tuples[ 1 ][ 3 ].add( resolve( 0, newDefer, isFunction( onFulfilled ) ? onFulfilled : Identity ) ); // rejected_handlers.add( ... ) tuples[ 2 ][ 3 ].add( resolve( 0, newDefer, isFunction( onRejected ) ? onRejected : Thrower ) ); } ).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 5 ]; // promise.progress = list.add // promise.done = list.add // promise.fail = list.add promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { list.add( function() { // state = "resolved" (i.e., fulfilled) // state = "rejected" state = stateString; }, // rejected_callbacks.disable // fulfilled_callbacks.disable tuples[ 3 - i ][ 2 ].disable, // rejected_handlers.disable // fulfilled_handlers.disable tuples[ 3 - i ][ 3 ].disable, // progress_callbacks.lock tuples[ 0 ][ 2 ].lock, // progress_handlers.lock tuples[ 0 ][ 3 ].lock ); } // progress_handlers.fire // fulfilled_handlers.fire // rejected_handlers.fire list.add( tuple[ 3 ].fire ); // deferred.notify = function() { deferred.notifyWith(...) } // deferred.resolve = function() { deferred.resolveWith(...) } // deferred.reject = function() { deferred.rejectWith(...) } deferred[ tuple[ 0 ] ] = function() { deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); return this; }; // deferred.notifyWith = list.fireWith // deferred.resolveWith = list.fireWith // deferred.rejectWith = list.fireWith deferred[ tuple[ 0 ] + "With" ] = list.fireWith; } ); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( singleValue ) { var // count of uncompleted subordinates remaining = arguments.length, // count of unprocessed arguments i = remaining, // subordinate fulfillment data resolveContexts = Array( i ), resolveValues = slice.call( arguments ), // the primary Deferred primary = jQuery.Deferred(), // subordinate callback factory updateFunc = function( i ) { return function( value ) { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { primary.resolveWith( resolveContexts, resolveValues ); } }; }; // Single- and empty arguments are adopted like Promise.resolve if ( remaining <= 1 ) { adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, !remaining ); // Use .then() to unwrap secondary thenables (cf. gh-3000) if ( primary.state() === "pending" || isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { return primary.then(); } } // Multiple arguments are aggregated like Promise.all array elements while ( i-- ) { adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); } return primary.promise(); } } ); // These usually indicate a programmer mistake during development, // warn about them ASAP rather than swallowing them by default. var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; jQuery.Deferred.exceptionHook = function( error, stack ) { // Support: IE 8 - 9 only // Console exists when dev tools are open, which can happen at any time if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); } }; jQuery.readyException = function( error ) { window.setTimeout( function() { throw error; } ); }; // The deferred used on DOM ready var readyList = jQuery.Deferred(); jQuery.fn.ready = function( fn ) { readyList .then( fn ) // Wrap jQuery.readyException in a function so that the lookup // happens at the time of error handling instead of callback // registration. .catch( function( error ) { jQuery.readyException( error ); } ); return this; }; jQuery.extend( { // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); } } ); jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); } // Catch cases where $(document).ready() is called // after the browser event has already occurred. // Support: IE <=9 - 10 only // Older IE sometimes signals "interactive" too soon if ( document.readyState === "complete" || ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { // Handle it asynchronously to allow scripts the opportunity to delay ready window.setTimeout( jQuery.ready ); } else { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed ); } // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values if ( toType( key ) === "object" ) { chainable = true; for ( i in key ) { access( elems, fn, i, key[ i ], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, _key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < len; i++ ) { fn( elems[ i ], key, raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) ); } } } if ( chainable ) { return elems; } // Gets if ( bulk ) { return fn.call( elems ); } return len ? fn( elems[ 0 ], key ) : emptyGet; }; // Matches dashed string for camelizing var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace() function fcamelCase( _all, letter ) { return letter.toUpperCase(); } // Convert dashed to camelCase; used by the css and data modules // Support: IE <=9 - 11, Edge 12 - 15 // Microsoft forgot to hump their vendor prefix (#9572) function camelCase( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); } var acceptData = function( owner ) { // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; function Data() { this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; Data.prototype = { cache: function( owner ) { // Check if the owner object already has a cache var value = owner[ this.expando ]; // If not, create one if ( !value ) { value = {}; // We can accept data for non-element nodes in modern browsers, // but we should not, see #8335. // Always return an empty object. if ( acceptData( owner ) ) { // If it is a node unlikely to be stringify-ed or looped over // use plain assignment if ( owner.nodeType ) { owner[ this.expando ] = value; // Otherwise secure it in a non-enumerable property // configurable must be true to allow the property to be // deleted when data is removed } else { Object.defineProperty( owner, this.expando, { value: value, configurable: true } ); } } } return value; }, set: function( owner, data, value ) { var prop, cache = this.cache( owner ); // Handle: [ owner, key, value ] args // Always use camelCase key (gh-2257) if ( typeof data === "string" ) { cache[ camelCase( data ) ] = value; // Handle: [ owner, { properties } ] args } else { // Copy the properties one-by-one to the cache object for ( prop in data ) { cache[ camelCase( prop ) ] = data[ prop ]; } } return cache; }, get: function( owner, key ) { return key === undefined ? this.cache( owner ) : // Always use camelCase key (gh-2257) owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; }, access: function( owner, key, value ) { // In cases where either: // // 1. No key was specified // 2. A string key was specified, but no value provided // // Take the "read" path and allow the get method to determine // which value to return, respectively either: // // 1. The entire cache object // 2. The data stored at the key // if ( key === undefined || ( ( key && typeof key === "string" ) && value === undefined ) ) { return this.get( owner, key ); } // When the key is not a string, or both a key and value // are specified, set or extend (existing objects) with either: // // 1. An object of properties // 2. A key and value // this.set( owner, key, value ); // Since the "set" path can have two possible entry points // return the expected data based on which path was taken[*] return value !== undefined ? value : key; }, remove: function( owner, key ) { var i, cache = owner[ this.expando ]; if ( cache === undefined ) { return; } if ( key !== undefined ) { // Support array or space separated string of keys if ( Array.isArray( key ) ) { // If key is an array of keys... // We always set camelCase keys, so remove that. key = key.map( camelCase ); } else { key = camelCase( key ); // If a key with the spaces exists, use it. // Otherwise, create an array by matching non-whitespace key = key in cache ? [ key ] : ( key.match( rnothtmlwhite ) || [] ); } i = key.length; while ( i-- ) { delete cache[ key[ i ] ]; } } // Remove the expando if there's no more data if ( key === undefined || jQuery.isEmptyObject( cache ) ) { // Support: Chrome <=35 - 45 // Webkit & Blink performance suffers when deleting properties // from DOM nodes, so set to undefined instead // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) if ( owner.nodeType ) { owner[ this.expando ] = undefined; } else { delete owner[ this.expando ]; } } }, hasData: function( owner ) { var cache = owner[ this.expando ]; return cache !== undefined && !jQuery.isEmptyObject( cache ); } }; var dataPriv = new Data(); var dataUser = new Data(); // Implementation Summary // // 1. Enforce API surface and semantic compatibility with 1.9.x branch // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; function getData( data ) { if ( data === "true" ) { return true; } if ( data === "false" ) { return false; } if ( data === "null" ) { return null; } // Only convert to a number if it doesn't change the string if ( data === +data + "" ) { return +data; } if ( rbrace.test( data ) ) { return JSON.parse( data ); } return data; } function dataAttr( elem, key, data ) { var name; // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = getData( data ); } catch ( e ) {} // Make sure we set the data so it isn't changed later dataUser.set( elem, key, data ); } else { data = undefined; } } return data; } jQuery.extend( { hasData: function( elem ) { return dataUser.hasData( elem ) || dataPriv.hasData( elem ); }, data: function( elem, name, data ) { return dataUser.access( elem, name, data ); }, removeData: function( elem, name ) { dataUser.remove( elem, name ); }, // TODO: Now that all calls to _data and _removeData have been replaced // with direct calls to dataPriv methods, these can be deprecated. _data: function( elem, name, data ) { return dataPriv.access( elem, name, data ); }, _removeData: function( elem, name ) { dataPriv.remove( elem, name ); } } ); jQuery.fn.extend( { data: function( key, value ) { var i, name, data, elem = this[ 0 ], attrs = elem && elem.attributes; // Gets all values if ( key === undefined ) { if ( this.length ) { data = dataUser.get( elem ); if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE 11 only // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } } dataPriv.set( elem, "hasDataAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each( function() { dataUser.set( this, key ); } ); } return access( this, function( value ) { var data; // The calling jQuery object (element matches) is not empty // (and therefore has an element appears at this[ 0 ]) and the // `value` parameter was not undefined. An empty jQuery object // will result in `undefined` for elem = this[ 0 ] which will // throw an exception if an attempt to read a data cache is made. if ( elem && value === undefined ) { // Attempt to get data from the cache // The key will always be camelCased in Data data = dataUser.get( elem, key ); if ( data !== undefined ) { return data; } // Attempt to "discover" the data in // HTML5 custom data-* attrs data = dataAttr( elem, key ); if ( data !== undefined ) { return data; } // We tried really hard, but the data doesn't exist. return; } // Set the data... this.each( function() { // We always store the camelCased key dataUser.set( this, key, value ); } ); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each( function() { dataUser.remove( this, key ); } ); } } ); jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = dataPriv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || Array.isArray( data ) ) { queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { empty: jQuery.Callbacks( "once memory" ).add( function() { dataPriv.remove( elem, [ type + "queue", key ] ); } ) } ); } } ); jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : this.each( function() { var queue = jQuery.queue( this, type, data ); // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } } ); }, dequeue: function( type ) { return this.each( function() { jQuery.dequeue( this, type ); } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } } ); var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var documentElement = document.documentElement; var isAttached = function( elem ) { return jQuery.contains( elem.ownerDocument, elem ); }, composed = { composed: true }; // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only // Check attachment across shadow DOM boundaries when possible (gh-3504) // Support: iOS 10.0-10.2 only // Early iOS 10 versions support `attachShadow` but not `getRootNode`, // leading to errors. We need to check for `getRootNode`. if ( documentElement.getRootNode ) { isAttached = function( elem ) { return jQuery.contains( elem.ownerDocument, elem ) || elem.getRootNode( composed ) === elem.ownerDocument; }; } var isHiddenWithinTree = function( elem, el ) { // isHiddenWithinTree might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; // Inline style trumps all return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. isAttached( elem ) && jQuery.css( elem, "display" ) === "none"; }; function adjustCSS( elem, prop, valueParts, tween ) { var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { return jQuery.css( elem, prop, "" ); }, initial = currentValue(), unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches initialInUnit = elem.nodeType && ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { // Support: Firefox <=54 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) initial = initial / 2; // Trust units reported by jQuery.css unit = unit || initialInUnit[ 3 ]; // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; while ( maxIterations-- ) { // Evaluate and update our best guess (doubling guesses that zero out). // Finish if the scale equals or crosses 1 (making the old*new product non-positive). jQuery.style( elem, prop, initialInUnit + unit ); if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { maxIterations = 0; } initialInUnit = initialInUnit / scale; } initialInUnit = initialInUnit * 2; jQuery.style( elem, prop, initialInUnit + unit ); // Make sure we update the tween properties later on valueParts = valueParts || []; } if ( valueParts ) { initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified adjusted = valueParts[ 1 ] ? initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : +valueParts[ 2 ]; if ( tween ) { tween.unit = unit; tween.start = initialInUnit; tween.end = adjusted; } } return adjusted; } var defaultDisplayMap = {}; function getDefaultDisplay( elem ) { var temp, doc = elem.ownerDocument, nodeName = elem.nodeName, display = defaultDisplayMap[ nodeName ]; if ( display ) { return display; } temp = doc.body.appendChild( doc.createElement( nodeName ) ); display = jQuery.css( temp, "display" ); temp.parentNode.removeChild( temp ); if ( display === "none" ) { display = "block"; } defaultDisplayMap[ nodeName ] = display; return display; } function showHide( elements, show ) { var display, elem, values = [], index = 0, length = elements.length; // Determine new display value for elements that need to change for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } display = elem.style.display; if ( show ) { // Since we force visibility upon cascade-hidden elements, an immediate (and slow) // check is required in this first loop unless we have a nonempty display value (either // inline or about-to-be-restored) if ( display === "none" ) { values[ index ] = dataPriv.get( elem, "display" ) || null; if ( !values[ index ] ) { elem.style.display = ""; } } if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { values[ index ] = getDefaultDisplay( elem ); } } else { if ( display !== "none" ) { values[ index ] = "none"; // Remember what we're overwriting dataPriv.set( elem, "display", display ); } } } // Set the display of the elements in a second loop to avoid constant reflow for ( index = 0; index < length; index++ ) { if ( values[ index ] != null ) { elements[ index ].style.display = values[ index ]; } } return elements; } jQuery.fn.extend( { show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each( function() { if ( isHiddenWithinTree( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } } ); } } ); var rcheckableType = ( /^(?:checkbox|radio)$/i ); var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); ( function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); // Support: Android 4.0 - 4.3 only // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); // Support: Android <=4.1 only // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE <=11 only // Make sure textarea (and checkbox) defaultValue is properly cloned div.innerHTML = "<textarea>x</textarea>"; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; // Support: IE <=9 only // IE <=9 replaces <option> tags with their contents when inserted outside of // the select element. div.innerHTML = "<option></option>"; support.option = !!div.lastChild; } )(); // We have to close these tags to support XHTML (#13200) var wrapMap = { // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten // this by omitting <tbody> or other required elements. thead: [ 1, "<table>", "</table>" ], col: [ 2, "<table><colgroup>", "</colgroup></table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], _default: [ 0, "", "" ] }; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; // Support: IE <=9 only if ( !support.option ) { wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ]; } function getAll( context, tag ) { // Support: IE <=9 - 11 only // Use typeof to avoid zero-argument method invocation on host objects (#15151) var ret; if ( typeof context.getElementsByTagName !== "undefined" ) { ret = context.getElementsByTagName( tag || "*" ); } else if ( typeof context.querySelectorAll !== "undefined" ) { ret = context.querySelectorAll( tag || "*" ); } else { ret = []; } if ( tag === undefined || tag && nodeName( context, tag ) ) { return jQuery.merge( [ context ], ret ); } return ret; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } } var rhtml = /<|&#?\w+;/; function buildFragment( elems, context, scripts, selection, ignored ) { var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( toType( elem ) === "object" ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; // Descend through wrappers to the right content j = wrap[ 0 ]; while ( j-- ) { tmp = tmp.lastChild; } // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); // Remember the top-level container tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) tmp.textContent = ""; } } } // Remove wrapper from fragment fragment.textContent = ""; i = 0; while ( ( elem = nodes[ i++ ] ) ) { // Skip elements already in the context collection (trac-4087) if ( selection && jQuery.inArray( elem, selection ) > -1 ) { if ( ignored ) { ignored.push( elem ); } continue; } attached = isAttached( elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history if ( attached ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( ( elem = tmp[ j++ ] ) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } return fragment; } var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; } function returnFalse() { return false; } // Support: IE <=9 - 11+ // focus() and blur() are asynchronous, except when they are no-op. // So expect focus to be synchronous when the element is already active, // and blur to be synchronous when the element is not already active. // (focus and blur are always synchronous in other supported browsers, // this just defines when we can count on it). function expectSync( elem, type ) { return ( elem === safeActiveElement() ) === ( type === "focus" ); } // Support: IE <=9 only // Accessing document.activeElement can throw unexpectedly // https://bugs.jquery.com/ticket/13393 function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } function on( elem, types, selector, data, fn, one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { on( elem, type, selector, data, types[ type ], one ); } return elem; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return elem; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return elem.each( function() { jQuery.event.add( this, types, fn, data, selector ); } ); } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get( elem ); // Only attach events to objects that accept data if ( !acceptData( elem ) ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Ensure that invalid selectors throw exceptions at attach time // Evaluate against documentElement in case elem is a non-element node (e.g., document) if ( selector ) { jQuery.find.matchesSelector( documentElement, selector ); } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { events = elemData.events = Object.create( null ); } if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; } // Handle multiple events separated by a space types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend( { type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[ 2 ] && new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { dataPriv.remove( elem, "handle events" ); } }, dispatch: function( nativeEvent ) { var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( nativeEvent ), handlers = ( dataPriv.get( this, "events" ) || Object.create( null ) )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[ 0 ] = event; for ( i = 1; i < arguments.length; i++ ) { args[ i ] = arguments[ i ]; } event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( ( handleObj = matched.handlers[ j++ ] ) && !event.isImmediatePropagationStopped() ) { // If the event is namespaced, then each handler is only invoked if it is // specially universal or its namespaces are a superset of the event's. if ( !event.rnamespace || handleObj.namespace === false || event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers if ( delegateCount && // Support: IE <=9 // Black-hole SVG <use> instance trees (trac-13180) cur.nodeType && // Support: Firefox <=42 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click // Support: IE 11 only // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) !( event.type === "click" && event.button >= 1 ) ) { for ( ; cur !== this; cur = cur.parentNode || this ) { // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { matchedHandlers = []; matchedSelectors = {}; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matchedSelectors[ sel ] === undefined ) { matchedSelectors[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matchedSelectors[ sel ] ) { matchedHandlers.push( handleObj ); } } if ( matchedHandlers.length ) { handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); } } } } // Add the remaining (directly-bound) handlers cur = this; if ( delegateCount < handlers.length ) { handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); } return handlerQueue; }, addProp: function( name, hook ) { Object.defineProperty( jQuery.Event.prototype, name, { enumerable: true, configurable: true, get: isFunction( hook ) ? function() { if ( this.originalEvent ) { return hook( this.originalEvent ); } } : function() { if ( this.originalEvent ) { return this.originalEvent[ name ]; } }, set: function( value ) { Object.defineProperty( this, name, { enumerable: true, configurable: true, writable: true, value: value } ); } } ); }, fix: function( originalEvent ) { return originalEvent[ jQuery.expando ] ? originalEvent : new jQuery.Event( originalEvent ); }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, click: { // Utilize native event to ensure correct state for checkable inputs setup: function( data ) { // For mutual compressibility with _default, replace `this` access with a local var. // `|| data` is dead code meant only to preserve the variable through minification. var el = this || data; // Claim the first handler if ( rcheckableType.test( el.type ) && el.click && nodeName( el, "input" ) ) { // dataPriv.set( el, "click", ... ) leverageNative( el, "click", returnTrue ); } // Return false to allow normal processing in the caller return false; }, trigger: function( data ) { // For mutual compressibility with _default, replace `this` access with a local var. // `|| data` is dead code meant only to preserve the variable through minification. var el = this || data; // Force setup before triggering a click if ( rcheckableType.test( el.type ) && el.click && nodeName( el, "input" ) ) { leverageNative( el, "click" ); } // Return non-false to allow normal event-path propagation return true; }, // For cross-browser consistency, suppress native .click() on links // Also prevent it if we're currently inside a leveraged native-event stack _default: function( event ) { var target = event.target; return rcheckableType.test( target.type ) && target.click && nodeName( target, "input" ) && dataPriv.get( target, "click" ) || nodeName( target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } } }; // Ensure the presence of an event listener that handles manually-triggered // synthetic events by interrupting progress until reinvoked in response to // *native* events that it fires directly, ensuring that state changes have // already occurred before other listeners are invoked. function leverageNative( el, type, expectSync ) { // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add if ( !expectSync ) { if ( dataPriv.get( el, type ) === undefined ) { jQuery.event.add( el, type, returnTrue ); } return; } // Register the controller as a special universal handler for all event namespaces dataPriv.set( el, type, false ); jQuery.event.add( el, type, { namespace: false, handler: function( event ) { var notAsync, result, saved = dataPriv.get( this, type ); if ( ( event.isTrigger & 1 ) && this[ type ] ) { // Interrupt processing of the outer synthetic .trigger()ed event // Saved data should be false in such cases, but might be a leftover capture object // from an async native handler (gh-4350) if ( !saved.length ) { // Store arguments for use when handling the inner native event // There will always be at least one argument (an event object), so this array // will not be confused with a leftover capture object. saved = slice.call( arguments ); dataPriv.set( this, type, saved ); // Trigger the native event and capture its result // Support: IE <=9 - 11+ // focus() and blur() are asynchronous notAsync = expectSync( this, type ); this[ type ](); result = dataPriv.get( this, type ); if ( saved !== result || notAsync ) { dataPriv.set( this, type, false ); } else { result = {}; } if ( saved !== result ) { // Cancel the outer synthetic event event.stopImmediatePropagation(); event.preventDefault(); // Support: Chrome 86+ // In Chrome, if an element having a focusout handler is blurred by // clicking outside of it, it invokes the handler synchronously. If // that handler calls `.remove()` on the element, the data is cleared, // leaving `result` undefined. We need to guard against this. return result && result.value; } // If this is an inner synthetic event for an event with a bubbling surrogate // (focus or blur), assume that the surrogate already propagated from triggering the // native event and prevent that from happening again here. // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the // bubbling surrogate propagates *after* the non-bubbling base), but that seems // less bad than duplication. } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { event.stopPropagation(); } // If this is a native event triggered above, everything is now in order // Fire an inner synthetic event with the original arguments } else if ( saved.length ) { // ...and capture the result dataPriv.set( this, type, { value: jQuery.event.trigger( // Support: IE <=9 - 11+ // Extend with the prototype to reset the above stopImmediatePropagation() jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), saved.slice( 1 ), this ) } ); // Abort handling of the native event event.stopImmediatePropagation(); } } } ); } jQuery.removeEvent = function( elem, type, handle ) { // This "if" is needed for plain objects if ( elem.removeEventListener ) { elem.removeEventListener( type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only src.returnValue === false ? returnTrue : returnFalse; // Create target properties // Support: Safari <=6 - 7 only // Target should not be a text node (#504, #13143) this.target = ( src.target && src.target.nodeType === 3 ) ? src.target.parentNode : src.target; this.currentTarget = src.currentTarget; this.relatedTarget = src.relatedTarget; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, isSimulated: false, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( e && !this.isSimulated ) { e.preventDefault(); } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopPropagation(); } }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Includes all common event props including KeyEvent and MouseEvent specific props jQuery.each( { altKey: true, bubbles: true, cancelable: true, changedTouches: true, ctrlKey: true, detail: true, eventPhase: true, metaKey: true, pageX: true, pageY: true, shiftKey: true, view: true, "char": true, code: true, charCode: true, key: true, keyCode: true, button: true, buttons: true, clientX: true, clientY: true, offsetX: true, offsetY: true, pointerId: true, pointerType: true, screenX: true, screenY: true, targetTouches: true, toElement: true, touches: true, which: true }, jQuery.event.addProp ); jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { jQuery.event.special[ type ] = { // Utilize native event if possible so blur/focus sequence is correct setup: function() { // Claim the first handler // dataPriv.set( this, "focus", ... ) // dataPriv.set( this, "blur", ... ) leverageNative( this, type, expectSync ); // Return false to allow normal processing in the caller return false; }, trigger: function() { // Force setup before trigger leverageNative( this, type ); // Return non-false to allow normal event-path propagation return true; }, // Suppress native focus or blur as it's already being fired // in leverageNative. _default: function() { return true; }, delegateType: delegateType }; } ); // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout // // Support: Safari 7 only // Safari sends mouseenter too often; see: // https://bugs.chromium.org/p/chromium/issues/detail?id=470258 // for the description of the bug (it existed in older Chrome versions as well). jQuery.each( { mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; } ); jQuery.fn.extend( { on: function( types, selector, data, fn ) { return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each( function() { jQuery.event.remove( this, types, fn, selector ); } ); } } ); var // Support: IE <=10 - 11, Edge 12 - 13 only // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /<script|<style|<link/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; // Prefer a tbody over its parent table for containing new rows function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( elem ).children( "tbody" )[ 0 ] || elem; } return elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; } function restoreScript( elem ) { if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { elem.type = elem.type.slice( 5 ); } else { elem.removeAttribute( "type" ); } return elem; } function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; } // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { pdataOld = dataPriv.get( src ); events = pdataOld.events; if ( events ) { dataPriv.remove( dest, "handle events" ); for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } } // 2. Copy user data if ( dataUser.hasData( src ) ) { udataOld = dataUser.access( src ); udataCur = jQuery.extend( {}, udataOld ); dataUser.set( dest, udataCur ); } } // Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays args = flat( args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[ 0 ], valueIsFunction = isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( valueIsFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return collection.each( function( index ) { var self = collection.eq( index ); if ( valueIsFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } domManip( self, args, callback, ignored ); } ); } if ( l ) { fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } // Require either new content or an interest in ignored elements to invoke the callback if ( first || ignored ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item // instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( collection[ i ], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !dataPriv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl && !node.noModule ) { jQuery._evalUrl( node.src, { nonce: node.nonce || node.getAttribute( "nonce" ) }, doc ); } } else { DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); } } } } } } return collection; } function remove( elem, selector, keepData ) { var node, nodes = selector ? jQuery.filter( selector, elem ) : elem, i = 0; for ( ; ( node = nodes[ i ] ) != null; i++ ) { if ( !keepData && node.nodeType === 1 ) { jQuery.cleanData( getAll( node ) ); } if ( node.parentNode ) { if ( keepData && isAttached( node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); } } return elem; } jQuery.extend( { htmlPrefilter: function( html ) { return html; }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), inPage = isAttached( elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); for ( i = 0, l = srcElements.length; i < l; i++ ) { fixInput( srcElements[ i ], destElements[ i ] ); } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0, l = srcElements.length; i < l; i++ ) { cloneCopyEvent( srcElements[ i ], destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } // Return the cloned set return clone; }, cleanData: function( elems ) { var data, elem, type, special = jQuery.event.special, i = 0; for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { if ( acceptData( elem ) ) { if ( ( data = elem[ dataPriv.expando ] ) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataPriv.expando ] = undefined; } if ( elem[ dataUser.expando ] ) { // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataUser.expando ] = undefined; } } } } } ); jQuery.fn.extend( { detach: function( selector ) { return remove( this, selector, true ); }, remove: function( selector ) { return remove( this, selector ); }, text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().each( function() { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.textContent = value; } } ); }, null, value, arguments.length ); }, append: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } } ); }, prepend: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } } ); }, before: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } } ); }, after: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } } ); }, empty: function() { var elem, i = 0; for ( ; ( elem = this[ i ] ) != null; i++ ) { if ( elem.nodeType === 1 ) { // Prevent memory leaks jQuery.cleanData( getAll( elem, false ) ); // Remove any remaining nodes elem.textContent = ""; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); } ); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined && elem.nodeType === 1 ) { return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { value = jQuery.htmlPrefilter( value ); try { for ( ; i < l; i++ ) { elem = this[ i ] || {}; // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch ( e ) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var ignored = []; // Make the changes, replacing each non-ignored context element with the new content return domManip( this, arguments, function( elem ) { var parent = this.parentNode; if ( jQuery.inArray( this, ignored ) < 0 ) { jQuery.cleanData( getAll( this ) ); if ( parent ) { parent.replaceChild( elem, this ); } } // Force callback invocation }, ignored ); } } ); jQuery.each( { appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, ret = [], insert = jQuery( selector ), last = insert.length - 1, i = 0; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); // Support: Android <=4.0 only, PhantomJS 1 only // .get() because push.apply(_, arraylike) throws on ancient WebKit push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; } ); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { // Support: IE <=11 only, Firefox <=30 (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" var view = elem.ownerDocument.defaultView; if ( !view || !view.opener ) { view = window; } return view.getComputedStyle( elem ); }; var swap = function( elem, options, callback ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.call( elem ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; }; var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); ( function() { // Executing both pixelPosition & boxSizingReliable tests require only one layout // so they're executed at the same time to save the second computation. function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%"; documentElement.appendChild( container ).appendChild( div ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 // Some styles come back with percentage values, even though they shouldn't div.style.right = "60%"; pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; // Support: IE 9 - 11 only // Detect misreporting of content dimensions for box-sizing:border-box elements boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; // Support: IE 9 only // Detect overflow:scroll screwiness (gh-3699) // Support: Chrome <=64 // Don't get tricked when zoom affects offsetWidth (gh-4029) div.style.position = "absolute"; scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; } function roundPixelMeasures( measure ) { return Math.round( parseFloat( measure ) ); } var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); // Finish early in limited (non-browser) environments if ( !div.style ) { return; } // Support: IE <=9 - 11 only // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; jQuery.extend( support, { boxSizingReliable: function() { computeStyleTests(); return boxSizingReliableVal; }, pixelBoxStyles: function() { computeStyleTests(); return pixelBoxStylesVal; }, pixelPosition: function() { computeStyleTests(); return pixelPositionVal; }, reliableMarginLeft: function() { computeStyleTests(); return reliableMarginLeftVal; }, scrollboxSize: function() { computeStyleTests(); return scrollboxSizeVal; }, // Support: IE 9 - 11+, Edge 15 - 18+ // IE/Edge misreport `getComputedStyle` of table rows with width/height // set in CSS while `offset*` properties report correct values. // Behavior in IE 9 is more subtle than in newer versions & it passes // some versions of this test; make sure not to make it pass there! // // Support: Firefox 70+ // Only Firefox includes border widths // in computed dimensions. (gh-4529) reliableTrDimensions: function() { var table, tr, trChild, trStyle; if ( reliableTrDimensionsVal == null ) { table = document.createElement( "table" ); tr = document.createElement( "tr" ); trChild = document.createElement( "div" ); table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; tr.style.cssText = "border:1px solid"; // Support: Chrome 86+ // Height set through cssText does not get applied. // Computed height then comes back as 0. tr.style.height = "1px"; trChild.style.height = "9px"; // Support: Android 8 Chrome 86+ // In our bodyBackground.html iframe, // display for all div elements is set to "inline", // which causes a problem only in Android 8 Chrome 86. // Ensuring the div is display: block // gets around this issue. trChild.style.display = "block"; documentElement .appendChild( table ) .appendChild( tr ) .appendChild( trChild ); trStyle = window.getComputedStyle( tr ); reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + parseInt( trStyle.borderTopWidth, 10 ) + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; documentElement.removeChild( table ); } return reliableTrDimensionsVal; } } ); } )(); function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, // Support: Firefox 51+ // Retrieving style before computed somehow // fixes an issue with getting wrong values // on detached elements style = elem.style; computed = computed || getStyles( elem ); // getPropertyValue is needed for: // .css('filter') (IE 9 only, #12537) // .css('--customProperty) (#3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; if ( ret === "" && !isAttached( elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Android Browser returns percentage for some values, // but width seems to be reliably pixels. // This is against the CSSOM draft spec: // https://drafts.csswg.org/cssom/#resolved-values if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } return ret !== undefined ? // Support: IE <=9 - 11 only // IE returns zIndex value as an integer. ret + "" : ret; } function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { if ( conditionFn() ) { // Hook not needed (or it's not possible to use it due // to missing dependency), remove it. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. return ( this.get = hookFn ).apply( this, arguments ); } }; } var cssPrefixes = [ "Webkit", "Moz", "ms" ], emptyStyle = document.createElement( "div" ).style, vendorProps = {}; // Return a vendor-prefixed property or undefined function vendorPropName( name ) { // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property function finalPropName( name ) { var final = jQuery.cssProps[ name ] || vendorProps[ name ]; if ( final ) { return final; } if ( name in emptyStyle ) { return name; } return vendorProps[ name ] = vendorPropName( name ) || name; } var // Swappable if display is none or starts with table // except "table", "table-cell", or "table-caption" // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rcustomProp = /^--/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: "0", fontWeight: "400" }; function setPositiveNumber( _elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point var matches = rcssNum.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : value; } function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0; // Adjustment may not be necessary if ( box === ( isBorderBox ? "border" : "content" ) ) { return 0; } for ( ; i < 4; i += 2 ) { // Both box models exclude margin if ( box === "margin" ) { delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); } // If we get here with a content-box, we're seeking "padding" or "border" or "margin" if ( !isBorderBox ) { // Add padding delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // For "border" or "margin", add border if ( box !== "padding" ) { delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); // But still keep track of it otherwise } else { extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } // If we get here with a border-box (content + padding + border), we're seeking "content" or // "padding" or "margin" } else { // For "content", subtract padding if ( box === "content" ) { delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // For "content" or "padding", subtract border if ( box !== "margin" ) { delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } // Account for positive content-box scroll gutter when requested by providing computedVal if ( !isBorderBox && computedVal >= 0 ) { // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border // Assuming integer scroll gutter, subtract the rest and round down delta += Math.max( 0, Math.ceil( elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - computedVal - delta - extra - 0.5 // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter // Use an explicit zero to avoid NaN (gh-3964) ) ) || 0; } return delta; } function getWidthOrHeight( elem, dimension, extra ) { // Start with computed style var styles = getStyles( elem ), // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). // Fake content-box until we know it's needed to know the true value. boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS( elem, dimension, styles ), offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); // Support: Firefox <=54 // Return a confounding non-pixel value or feign ignorance, as appropriate. if ( rnumnonpx.test( val ) ) { if ( !extra ) { return val; } val = "auto"; } // Support: IE 9 - 11 only // Use offsetWidth/offsetHeight for when box sizing is unreliable. // In those cases, the computed value can be trusted to be border-box. if ( ( !support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+ // IE/Edge misreport `getComputedStyle` of table rows with width/height // set in CSS while `offset*` properties report correct values. // Interestingly, in some cases IE 9 doesn't suffer from this issue. !support.reliableTrDimensions() && nodeName( elem, "tr" ) || // Fall back to offsetWidth/offsetHeight when value is "auto" // This happens for inline elements with no explicit setting (gh-3571) val === "auto" || // Support: Android <=4.1 - 4.3 only // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && // Make sure the element is visible & connected elem.getClientRects().length ) { isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // Where available, offsetWidth/offsetHeight approximate border box dimensions. // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the // retrieved value as a content box dimension. valueIsBorderBox = offsetProp in elem; if ( valueIsBorderBox ) { val = elem[ offsetProp ]; } } // Normalize "" and auto val = parseFloat( val ) || 0; // Adjust for the element's box model return ( val + boxModelAdjustment( elem, dimension, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles, // Provide the current computed size to request scroll gutter calculation (gh-3589) val ) ) + "px"; } jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "animationIterationCount": true, "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, "gridArea": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnStart": true, "gridRow": true, "gridRowEnd": true, "gridRowStart": true, "lineHeight": true, "opacity": true, "order": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: {}, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = camelCase( name ), isCustomProp = rcustomProp.test( name ), style = elem.style; // Make sure that we're working with the right name. We don't // want to query the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { value = adjustCSS( elem, name, ret ); // Fixes bug #9237 type = "number"; } // Make sure that null and NaN values aren't set (#7116) if ( value == null || value !== value ) { return; } // If a number was passed in, add the unit (except for certain CSS properties) // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append // "px" to a few hardcoded values. if ( type === "number" && !isCustomProp ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } // background-* props affect original clone's values if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !( "set" in hooks ) || ( value = hooks.set( elem, value, extra ) ) !== undefined ) { if ( isCustomProp ) { style.setProperty( name, value ); } else { style[ name ] = value; } } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var val, num, hooks, origName = camelCase( name ), isCustomProp = rcustomProp.test( name ); // Make sure that we're working with the right name. We don't // want to modify the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } // Convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || isFinite( num ) ? num || 0 : val; } return val; } } ); jQuery.each( [ "height", "width" ], function( _i, dimension ) { jQuery.cssHooks[ dimension ] = { get: function( elem, computed, extra ) { if ( computed ) { // Certain elements can have dimension info if we invisibly show them // but it must have a current display style that would benefit return rdisplayswap.test( jQuery.css( elem, "display" ) ) && // Support: Safari 8+ // Table columns in Safari have non-zero offsetWidth & zero // getBoundingClientRect().width unless display is changed. // Support: IE <=11 only // Running getBoundingClientRect on a disconnected node // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? swap( elem, cssShow, function() { return getWidthOrHeight( elem, dimension, extra ); } ) : getWidthOrHeight( elem, dimension, extra ); } }, set: function( elem, value, extra ) { var matches, styles = getStyles( elem ), // Only read styles.position if the test has a chance to fail // to avoid forcing a reflow. scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", subtract = extra ? boxModelAdjustment( elem, dimension, extra, isBorderBox, styles ) : 0; // Account for unreliable border-box dimensions by comparing offset* to computed and // faking a content-box to get border and padding (gh-3699) if ( isBorderBox && scrollboxSizeBuggy ) { subtract -= Math.ceil( elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - parseFloat( styles[ dimension ] ) - boxModelAdjustment( elem, dimension, "border", false, styles ) - 0.5 ); } // Convert to pixels if value adjustment is needed if ( subtract && ( matches = rcssNum.exec( value ) ) && ( matches[ 3 ] || "px" ) !== "px" ) { elem.style[ dimension ] = value; value = jQuery.css( elem, dimension ); } return setPositiveNumber( elem, value, subtract ); } }; } ); jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function( elem, computed ) { if ( computed ) { return ( parseFloat( curCSS( elem, "marginLeft" ) ) || elem.getBoundingClientRect().left - swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) ) + "px"; } } ); // These hooks are used by animate to expand properties jQuery.each( { margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // Assumes a single number if not a string parts = typeof value === "string" ? value.split( " " ) : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( prefix !== "margin" ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } } ); jQuery.fn.extend( { css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( Array.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); } } ); function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; // Use a property on the element directly when it is not a DOM element, // or when there is no matching style property that exists. if ( tween.elem.nodeType !== 1 || tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { return tween.elem[ tween.prop ]; } // Passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails. // Simple values such as "10px" are parsed to Float; // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // Use step hook for back compat. // Use cssHook if its there. // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( jQuery.cssHooks[ tween.prop ] || tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE <=9 only // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; }, _default: "swing" }; jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point jQuery.fx.step = {}; var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; function schedule() { if ( inProgress ) { if ( document.hidden === false && window.requestAnimationFrame ) { window.requestAnimationFrame( schedule ); } else { window.setTimeout( schedule, jQuery.fx.interval ); } jQuery.fx.tick(); } } // Animations created synchronously will run synchronously function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = Date.now() ); } // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } function createTween( value, prop, animation ) { var tween, collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // We're done with this property return tween; } } } function defaultPrefilter( elem, props, opts ) { var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree( elem ), dataShow = dataPriv.get( elem, "fxshow" ); // Queue-skipping animations hijack the fx hooks if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always( function() { // Ensure the complete handler is called before this completes anim.always( function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } } ); } ); } // Detect show/hide animations for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.test( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { // Pretend to be hidden if this is a "show" and // there is still data from a stopped show/hide if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; // Ignore all other no-op show/hide data } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); } } // Bail out if this is a no-op like .hide().hide() propTween = !jQuery.isEmptyObject( props ); if ( !propTween && jQuery.isEmptyObject( orig ) ) { return; } // Restrict "overflow" and "display" styles during box animations if ( isBox && elem.nodeType === 1 ) { // Support: IE <=9 - 11, Edge 12 - 15 // Record all 3 overflow attributes because IE does not infer the shorthand // from identically-valued overflowX and overflowY and Edge just mirrors // the overflowX value there. opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Identify a display type, preferring old show/hide data over the CSS cascade restoreDisplay = dataShow && dataShow.display; if ( restoreDisplay == null ) { restoreDisplay = dataPriv.get( elem, "display" ); } display = jQuery.css( elem, "display" ); if ( display === "none" ) { if ( restoreDisplay ) { display = restoreDisplay; } else { // Get nonempty value(s) by temporarily forcing visibility showHide( [ elem ], true ); restoreDisplay = elem.style.display || restoreDisplay; display = jQuery.css( elem, "display" ); showHide( [ elem ] ); } } // Animate inline elements as inline-block if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { if ( jQuery.css( elem, "float" ) === "none" ) { // Restore the original display value at the end of pure show/hide animations if ( !propTween ) { anim.done( function() { style.display = restoreDisplay; } ); if ( restoreDisplay == null ) { display = style.display; restoreDisplay = display === "none" ? "" : display; } } style.display = "inline-block"; } } } if ( opts.overflow ) { style.overflow = "hidden"; anim.always( function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; } ); } // Implement show/hide animations propTween = false; for ( prop in orig ) { // General show/hide setup for this element animation if ( !propTween ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); } // Store hidden/visible for toggle so `.stop().toggle()` "reverses" if ( toggle ) { dataShow.hidden = !hidden; } // Show elements before animating them if ( hidden ) { showHide( [ elem ], true ); } /* eslint-disable no-loop-func */ anim.done( function() { /* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { showHide( [ elem ] ); } dataPriv.remove( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } } ); } // Per-property setup propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = propTween.start; if ( hidden ) { propTween.end = propTween.start; propTween.start = 0; } } } } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( Array.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // Not quite $.extend, this won't overwrite existing keys. // Reusing 'index' because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { // Don't match elem in the :animated selector delete tick.elem; } ), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // Support: Android 2.3 only // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ] ); // If there's more to do, yield if ( percent < 1 && length ) { return remaining; } // If this was an empty animation, synthesize a final progress notification if ( !length ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); } // Resolve the animation and report its conclusion deferred.resolveWith( elem, [ animation ] ); return false; }, animation = deferred.promise( { elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {}, easing: jQuery.easing._default }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length; index++ ) { animation.tweens[ index ].run( 1 ); } // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } } ), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { if ( isFunction( result.stop ) ) { jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = result.stop.bind( result ); } return result; } } jQuery.map( props, createTween, animation ); if ( isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } // Attach callbacks from options animation .progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue } ) ); return animation; } jQuery.Animation = jQuery.extend( Animation, { tweeners: { "*": [ function( prop, value ) { var tween = this.createTween( prop, value ); adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); return tween; } ] }, tweener: function( props, callback ) { if ( isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.match( rnothtmlwhite ); } var prop, index = 0, length = props.length; for ( ; index < length; index++ ) { prop = props[ index ]; Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; Animation.tweeners[ prop ].unshift( callback ); } }, prefilters: [ defaultPrefilter ], prefilter: function( callback, prepend ) { if ( prepend ) { Animation.prefilters.unshift( callback ); } else { Animation.prefilters.push( callback ); } } } ); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !isFunction( easing ) && easing }; // Go to the end state if fx are off if ( jQuery.fx.off ) { opt.duration = 0; } else { if ( typeof opt.duration !== "number" ) { if ( opt.duration in jQuery.fx.speeds ) { opt.duration = jQuery.fx.speeds[ opt.duration ]; } else { opt.duration = jQuery.fx.speeds._default; } } } // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.fn.extend( { fadeTo: function( speed, to, easing, callback ) { // Show any hidden elements after setting opacity to 0 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() // Animate to the value specified .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || dataPriv.get( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue ) { this.queue( type || "fx", [] ); } return this.each( function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && ( type == null || timers[ index ].queue === type ) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // Start the next in the queue if the last step wasn't forced. // Timers currently will call their complete callbacks, which // will dequeue but only if they were gotoEnd. if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } } ); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each( function() { var index, data = dataPriv.get( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // Enable finishing flag on private data data.finish = true; // Empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } // Look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // Look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // Turn off finishing flag delete data.finish; } ); } } ); jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; } ); // Generate shortcuts for custom animations jQuery.each( { slideDown: genFx( "show" ), slideUp: genFx( "hide" ), slideToggle: genFx( "toggle" ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; } ); jQuery.timers = []; jQuery.fx.tick = function() { var timer, i = 0, timers = jQuery.timers; fxNow = Date.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Run the timer and safely remove it when done (allowing for external removal) if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); jQuery.fx.start(); }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( inProgress ) { return; } inProgress = true; schedule(); }; jQuery.fx.stop = function() { inProgress = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = window.setTimeout( next, time ); hooks.stop = function() { window.clearTimeout( timeout ); }; } ); }; ( function() { var input = document.createElement( "input" ), select = document.createElement( "select" ), opt = select.appendChild( document.createElement( "option" ) ); input.type = "checkbox"; // Support: Android <=4.3 only // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; // Support: IE <=11 only // Must access selectedIndex to make default options select support.optSelected = opt.selected; // Support: IE <=11 only // An input loses its value after becoming a radio input = document.createElement( "input" ); input.value = "t"; input.type = "radio"; support.radioValue = input.value === "t"; } )(); var boolHook, attrHandle = jQuery.expr.attrHandle; jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each( function() { jQuery.removeAttr( this, name ); } ); } } ); jQuery.extend( { attr: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } // Attribute hooks are determined by the lowercase version // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { hooks = jQuery.attrHooks[ name.toLowerCase() ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } elem.setAttribute( name, value + "" ); return value; } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } ret = jQuery.find.attr( elem, name ); // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; }, attrHooks: { type: { set: function( elem, value ) { if ( !support.radioValue && value === "radio" && nodeName( elem, "input" ) ) { var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, removeAttr: function( elem, value ) { var name, i = 0, // Attribute names can contain non-HTML whitespace characters // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 attrNames = value && value.match( rnothtmlwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( ( name = attrNames[ i++ ] ) ) { elem.removeAttribute( name ); } } } } ); // Hooks for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { elem.setAttribute( name, name ); } return name; } }; jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { var ret, handle, lowercaseName = name.toLowerCase(); if ( !isXML ) { // Avoid an infinite loop by temporarily removing this function from the getter handle = attrHandle[ lowercaseName ]; attrHandle[ lowercaseName ] = ret; ret = getter( elem, name, isXML ) != null ? lowercaseName : null; attrHandle[ lowercaseName ] = handle; } return ret; }; } ); var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { return this.each( function() { delete this[ jQuery.propFix[ name ] || name ]; } ); } } ); jQuery.extend( { prop: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } return ( elem[ name ] = value ); } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } return elem[ name ]; }, propHooks: { tabIndex: { get: function( elem ) { // Support: IE <=9 - 11 only // elem.tabIndex doesn't always return the // correct value when it hasn't been explicitly set // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ // Use proper attribute retrieval(#12072) var tabindex = jQuery.find.attr( elem, "tabindex" ); if ( tabindex ) { return parseInt( tabindex, 10 ); } if ( rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ) { return 0; } return -1; } } }, propFix: { "for": "htmlFor", "class": "className" } } ); // Support: IE <=11 only // Accessing the selectedIndex property // forces the browser to respect setting selected // on the option // The getter ensures a default option is selected // when in an optgroup // eslint rule "no-unused-expressions" is disabled for this code // since it considers such accessions noop if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent && parent.parentNode ) { parent.parentNode.selectedIndex; } return null; }, set: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } } }; } jQuery.each( [ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; } ); // Strip and collapse whitespace according to HTML spec // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); } function getClass( elem ) { return elem.getAttribute && elem.getAttribute( "class" ) || ""; } function classesToArray( value ) { if ( Array.isArray( value ) ) { return value; } if ( typeof value === "string" ) { return value.match( rnothtmlwhite ) || []; } return []; } jQuery.fn.extend( { addClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); } classes = classesToArray( value ); if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, removeClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); } if ( !arguments.length ) { return this.attr( "class", "" ); } classes = classesToArray( value ); if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) > -1 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isValidValue = type === "string" || Array.isArray( value ); if ( typeof stateVal === "boolean" && isValidValue ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } if ( isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), stateVal ); } ); } return this.each( function() { var className, i, self, classNames; if ( isValidValue ) { // Toggle individual class names i = 0; self = jQuery( this ); classNames = classesToArray( value ); while ( ( className = classNames[ i++ ] ) ) { // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( value === undefined || type === "boolean" ) { className = getClass( this ); if ( className ) { // Store className if set dataPriv.set( this, "__className__", className ); } // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if ( this.setAttribute ) { this.setAttribute( "class", className || value === false ? "" : dataPriv.get( this, "__className__" ) || "" ); } } } ); }, hasClass: function( selector ) { var className, elem, i = 0; className = " " + selector + " "; while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { return true; } } return false; } } ); var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { var hooks, ret, valueIsFunction, elem = this[ 0 ]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && ( ret = hooks.get( elem, "value" ) ) !== undefined ) { return ret; } ret = elem.value; // Handle most common string cases if ( typeof ret === "string" ) { return ret.replace( rreturn, "" ); } // Handle cases where value is null/undef or number return ret == null ? "" : ret; } return; } valueIsFunction = isFunction( value ); return this.each( function( i ) { var val; if ( this.nodeType !== 1 ) { return; } if ( valueIsFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( Array.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; } ); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } } ); } } ); jQuery.extend( { valHooks: { option: { get: function( elem ) { var val = jQuery.find.attr( elem, "value" ); return val != null ? val : // Support: IE <=10 - 11 only // option.text throws exceptions (#14686, #14858) // Strip and collapse whitespace // https://html.spec.whatwg.org/#strip-and-collapse-whitespace stripAndCollapse( jQuery.text( elem ) ); } }, select: { get: function( elem ) { var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length; if ( index < 0 ) { i = max; } else { i = one ? index : 0; } // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // Support: IE <=9 only // IE8-9 doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup !option.disabled && ( !option.parentNode.disabled || !nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var optionSet, option, options = elem.options, values = jQuery.makeArray( value ), i = options.length; while ( i-- ) { option = options[ i ]; /* eslint-disable no-cond-assign */ if ( option.selected = jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) { optionSet = true; } /* eslint-enable no-cond-assign */ } // Force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } return values; } } } } ); // Radios and checkboxes getter/setter jQuery.each( [ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { if ( Array.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { return elem.getAttribute( "value" ) === null ? "on" : elem.value; }; } } ); // Return jQuery for attributes-only inclusion support.focusin = "onfocusin" in window; var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function( e ) { e.stopPropagation(); }; jQuery.extend( jQuery.event, { trigger: function( event, data, elem, onlyHandlers ) { var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; cur = lastElement = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "." ) > -1 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split( "." ); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf( ":" ) < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join( "." ); event.rnamespace = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === ( elem.ownerDocument || document ) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { lastElement = cur; event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( ( !special._default || special._default.apply( eventPath.pop(), data ) === false ) && acceptData( elem ) ) { // Call a native DOM method on the target with the same name as the event. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; if ( event.isPropagationStopped() ) { lastElement.addEventListener( type, stopPropagationCallback ); } elem[ type ](); if ( event.isPropagationStopped() ) { lastElement.removeEventListener( type, stopPropagationCallback ); } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, // Piggyback on a donor event to simulate a different one // Used only for `focus(in | out)` events simulate: function( type, elem, event ) { var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true } ); jQuery.event.trigger( e, null, elem ); } } ); jQuery.fn.extend( { trigger: function( type, data ) { return this.each( function() { jQuery.event.trigger( type, data, this ); } ); }, triggerHandler: function( type, data ) { var elem = this[ 0 ]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } } ); // Support: Firefox <=44 // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 // // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 // focus(in | out) events fire after focus & blur events, // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 if ( !support.focusin ) { jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); }; jQuery.event.special[ fix ] = { setup: function() { // Handle: regular nodes (via `this.ownerDocument`), window // (via `this.document`) & document (via `this`). var doc = this.ownerDocument || this.document || this, attaches = dataPriv.access( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this.document || this, attaches = dataPriv.access( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); dataPriv.remove( doc, fix ); } else { dataPriv.access( doc, fix, attaches ); } } }; } ); } var location = window.location; var nonce = { guid: Date.now() }; var rquery = ( /\?/ ); // Cross-browser xml parsing jQuery.parseXML = function( data ) { var xml, parserErrorElem; if ( !data || typeof data !== "string" ) { return null; } // Support: IE 9 - 11 only // IE throws on parseFromString with invalid input. try { xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); } catch ( e ) {} parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; if ( !xml || parserErrorElem ) { jQuery.error( "Invalid XML: " + ( parserErrorElem ? jQuery.map( parserErrorElem.childNodes, function( el ) { return el.textContent; } ).join( "\n" ) : data ) ); } return xml; }; var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; function buildParams( prefix, obj, traditional, add ) { var name; if ( Array.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", v, traditional, add ); } } ); } else if ( !traditional && toType( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // Serialize an array of form elements or a set of // key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, valueOrFunction ) { // If value is a function, invoke it and use its return value var value = isFunction( valueOrFunction ) ? valueOrFunction() : valueOrFunction; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value == null ? "" : value ); }; if ( a == null ) { return ""; } // If an array was passed in, assume that it is an array of form elements. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); } ); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ); }; jQuery.fn.extend( { serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map( function() { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; } ).filter( function() { var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); } ).map( function( _i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { return null; } if ( Array.isArray( val ) ) { return jQuery.map( val, function( val ) { return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ); } return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ).get(); } } ); var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat( "*" ), // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; if ( isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; } jQuery.extend( { // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: location.href, type: "GET", isLocal: rlocalProtocol.test( location.protocol ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": JSON.parse, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var transport, // URL without anti-cache param cacheURL, // Response headers responseHeadersString, responseHeaders, // timeout handle timeoutTimer, // Url cleanup var urlAnchor, // Request state (becomes false upon send and true upon completion) completed, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // uncached part of the url uncached, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( completed ) { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[ 1 ].toLowerCase() + " " ] = ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) .concat( match[ 2 ] ); } } match = responseHeaders[ key.toLowerCase() + " " ]; } return match == null ? null : match.join( ", " ); }, // Raw string getAllResponseHeaders: function() { return completed ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { if ( completed == null ) { name = requestHeadersNames[ name.toLowerCase() ] = requestHeadersNames[ name.toLowerCase() ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( completed == null ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( completed ) { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } else { // Lazy-add the new callbacks in a way that preserves old ones for ( code in map ) { statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ); // Add protocol if not provided (prefilters might expect it) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || location.href ) + "" ) .replace( rprotocol, location.protocol + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; // A cross-domain request is in order when the origin doesn't match the current origin. if ( s.crossDomain == null ) { urlAnchor = document.createElement( "a" ); // Support: IE <=8 - 11, Edge 12 - 15 // IE throws exception on accessing the href property if url is malformed, // e.g. http://example.com:80x/ try { urlAnchor.href = s.url; // Support: IE <=8 - 11 only // Anchor's host property isn't correctly set when s.url is relative urlAnchor.href = urlAnchor.href; s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; } catch ( e ) { // If there is an error parsing the URL, assume it is crossDomain, // it can be rejected by the transport if it is invalid s.crossDomain = true; } } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( completed ) { return jqXHR; } // We can fire global events as of now if asked to // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on // Remove hash to simplify url manipulation cacheURL = s.url.replace( rhash, "" ); // More options handling for requests with no content if ( !s.hasContent ) { // Remember the hash so we can put it back uncached = s.url.slice( cacheURL.length ); // If data is available and should be processed, append data to url if ( s.data && ( s.processData || typeof s.data === "string" ) ) { cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add or update anti-cache param if needed if ( s.cache === false ) { cacheURL = cacheURL.replace( rantiCache, "$1" ); uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + uncached; } // Put hash and anti-cache on the URL that will be requested (gh-1732) s.url = cacheURL + uncached; // Change '%20' to '+' if this is encoded form body content (gh-2658) } else if ( s.data && s.processData && ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? s.accepts[ s.dataTypes[ 0 ] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { // Abort if not done already and return return jqXHR.abort(); } // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds completeDeferred.add( s.complete ); jqXHR.done( s.success ); jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // If request was aborted inside ajaxSend, stop there if ( completed ) { return jqXHR; } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = window.setTimeout( function() { jqXHR.abort( "timeout" ); }, s.timeout ); } try { completed = false; transport.send( requestHeaders, done ); } catch ( e ) { // Rethrow post-completion exceptions if ( completed ) { throw e; } // Propagate others as results done( -1, e ); } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Use a noop converter for missing script but not if jsonp if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 && jQuery.inArray( "json", s.dataTypes ) < 0 ) { s.converters[ "text script" ] = function() {}; } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } return jqXHR; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } } ); jQuery.each( [ "get", "post" ], function( _i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted if ( isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } // The url can be an options object (which then must have .url) return jQuery.ajax( jQuery.extend( { url: url, type: method, dataType: type, data: data, success: callback }, jQuery.isPlainObject( url ) && url ) ); }; } ); jQuery.ajaxPrefilter( function( s ) { var i; for ( i in s.headers ) { if ( i.toLowerCase() === "content-type" ) { s.contentType = s.headers[ i ] || ""; } } } ); jQuery._evalUrl = function( url, options, doc ) { return jQuery.ajax( { url: url, // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", dataType: "script", cache: true, async: false, global: false, // Only evaluate the response if it is successful (gh-4126) // dataFilter is not invoked for failure responses, so using it instead // of the default converter is kludgy but it works. converters: { "text script": function() {} }, dataFilter: function( response ) { jQuery.globalEval( response, options, doc ); } } ); }; jQuery.fn.extend( { wrapAll: function( html ) { var wrap; if ( this[ 0 ] ) { if ( isFunction( html ) ) { html = html.call( this[ 0 ] ); } // The elements to wrap the target around wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); if ( this[ 0 ].parentNode ) { wrap.insertBefore( this[ 0 ] ); } wrap.map( function() { var elem = this; while ( elem.firstElementChild ) { elem = elem.firstElementChild; } return elem; } ).append( this ); } return this; }, wrapInner: function( html ) { if ( isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); } return this.each( function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } } ); }, wrap: function( html ) { var htmlIsFunction = isFunction( html ); return this.each( function( i ) { jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); } ); }, unwrap: function( selector ) { this.parent( selector ).not( "body" ).each( function() { jQuery( this ).replaceWith( this.childNodes ); } ); return this; } } ); jQuery.expr.pseudos.hidden = function( elem ) { return !jQuery.expr.pseudos.visible( elem ); }; jQuery.expr.pseudos.visible = function( elem ) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; jQuery.ajaxSettings.xhr = function() { try { return new window.XMLHttpRequest(); } catch ( e ) {} }; var xhrSuccessStatus = { // File protocol always yields status code 0, assume 200 0: 200, // Support: IE <=9 only // #1450: sometimes IE returns 1223 when it should be 204 1223: 204 }, xhrSupported = jQuery.ajaxSettings.xhr(); support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); support.ajax = xhrSupported = !!xhrSupported; jQuery.ajaxTransport( function( options ) { var callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest if ( support.cors || xhrSupported && !options.crossDomain ) { return { send: function( headers, complete ) { var i, xhr = options.xhr(); xhr.open( options.type, options.url, options.async, options.username, options.password ); // Apply custom fields if provided if ( options.xhrFields ) { for ( i in options.xhrFields ) { xhr[ i ] = options.xhrFields[ i ]; } } // Override mime type if needed if ( options.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( options.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Set headers for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } // Callback callback = function( type ) { return function() { if ( callback ) { callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null; if ( type === "abort" ) { xhr.abort(); } else if ( type === "error" ) { // Support: IE <=9 only // On a manual native abort, IE9 throws // errors on any property access that is not readyState if ( typeof xhr.status !== "number" ) { complete( 0, "error" ); } else { complete( // File: protocol always yields status 0; see #8605, #14207 xhr.status, xhr.statusText ); } } else { complete( xhrSuccessStatus[ xhr.status ] || xhr.status, xhr.statusText, // Support: IE <=9 only // IE9 has no XHR2 but throws on binary (trac-11426) // For XHR2 non-text, let the caller handle it (gh-2498) ( xhr.responseType || "text" ) !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, xhr.getAllResponseHeaders() ); } } }; }; // Listen to events xhr.onload = callback(); errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); // Support: IE 9 only // Use onreadystatechange to replace onabort // to handle uncaught aborts if ( xhr.onabort !== undefined ) { xhr.onabort = errorCallback; } else { xhr.onreadystatechange = function() { // Check readyState before timeout as it changes if ( xhr.readyState === 4 ) { // Allow onerror to be called first, // but that will not handle a native abort // Also, save errorCallback to a variable // as xhr.onerror cannot be accessed window.setTimeout( function() { if ( callback ) { errorCallback(); } } ); } }; } // Create the abort callback callback = callback( "abort" ); try { // Do send the request (this may raise an exception) xhr.send( options.hasContent && options.data || null ); } catch ( e ) { // #14683: Only rethrow if this hasn't been notified as an error yet if ( callback ) { throw e; } } }, abort: function() { if ( callback ) { callback(); } } }; } } ); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) jQuery.ajaxPrefilter( function( s ) { if ( s.crossDomain ) { s.contents.script = false; } } ); // Install script dataType jQuery.ajaxSetup( { accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } } ); // Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; } } ); // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { // This transport only deals with cross domain or forced-by-attrs requests if ( s.crossDomain || s.scriptAttrs ) { var script, callback; return { send: function( _, complete ) { script = jQuery( "<script>" ) .attr( s.scriptAttrs || {} ) .prop( { charset: s.scriptCharset, src: s.url } ) .on( "load error", callback = function( evt ) { script.remove(); callback = null; if ( evt ) { complete( evt.type === "error" ? 404 : 200, evt.type ); } } ); // Use native DOM manipulation to avoid our domManip AJAX trickery document.head.appendChild( script[ 0 ] ); }, abort: function() { if ( callback ) { callback(); } } }; } } ); var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings jQuery.ajaxSetup( { jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); this[ callback ] = true; return callback; } } ); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : typeof s.data === "string" && ( s.contentType || "" ) .indexOf( "application/x-www-form-urlencoded" ) === 0 && rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution s.converters[ "script json" ] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; // Force json dataType s.dataTypes[ 0 ] = "json"; // Install callback overwritten = window[ callbackName ]; window[ callbackName ] = function() { responseContainer = arguments; }; // Clean-up function (fires after converters) jqXHR.always( function() { // If previous value didn't exist - remove it if ( overwritten === undefined ) { jQuery( window ).removeProp( callbackName ); // Otherwise restore preexisting value } else { window[ callbackName ] = overwritten; } // Save back as free if ( s[ callbackName ] ) { // Make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; // Save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response if ( responseContainer && isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; } ); // Delegate to script return "script"; } } ); // Support: Safari 8 only // In Safari 8 documents created via document.implementation.createHTMLDocument // collapse sibling forms: the second one becomes a child of the first one. // Because of that, this security measure has to be disabled in Safari 8. // https://bugs.webkit.org/show_bug.cgi?id=137337 support.createHTMLDocument = ( function() { var body = document.implementation.createHTMLDocument( "" ).body; body.innerHTML = "<form></form><form></form>"; return body.childNodes.length === 2; } )(); // Argument "data" should be string of html // context (optional): If specified, the fragment will be created in this context, // defaults to document // keepScripts (optional): If true, will include scripts passed in the html string jQuery.parseHTML = function( data, context, keepScripts ) { if ( typeof data !== "string" ) { return []; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } var base, parsed, scripts; if ( !context ) { // Stop scripts or inline event handlers from being executed immediately // by using document.implementation if ( support.createHTMLDocument ) { context = document.implementation.createHTMLDocument( "" ); // Set the base href for the created document // so any parsed elements with URLs // are based on the document's URL (gh-2965) base = context.createElement( "base" ); base.href = document.location.href; context.head.appendChild( base ); } else { context = document; } } parsed = rsingleTag.exec( data ); scripts = !keepScripts && []; // Single tag if ( parsed ) { return [ context.createElement( parsed[ 1 ] ) ]; } parsed = buildFragment( [ data ], context, scripts ); if ( scripts && scripts.length ) { jQuery( scripts ).remove(); } return jQuery.merge( [], parsed.childNodes ); }; /** * Load a url into a page */ jQuery.fn.load = function( url, params, callback ) { var selector, type, response, self = this, off = url.indexOf( " " ); if ( off > -1 ) { selector = stripAndCollapse( url.slice( off ) ); url = url.slice( 0, off ); } // If it's a function if ( isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( params && typeof params === "object" ) { type = "POST"; } // If we have elements to modify, make the request if ( self.length > 0 ) { jQuery.ajax( { url: url, // If "type" variable is undefined, then "GET" method will be used. // Make value of this field explicit since // user can override it through ajaxSetup method type: type || "GET", dataType: "html", data: params } ).done( function( responseText ) { // Save response for use in complete callback response = arguments; self.html( selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); // If the request succeeds, this function gets "data", "status", "jqXHR" // but they are ignored because response was set above. // If it fails, this function gets "jqXHR", "status", "error" } ).always( callback && function( jqXHR, status ) { self.each( function() { callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); } ); } ); } return this; }; jQuery.expr.pseudos.animated = function( elem ) { return jQuery.grep( jQuery.timers, function( fn ) { return elem === fn.elem; } ).length; }; jQuery.offset = { setOffset: function( elem, options, i ) { var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css( elem, "position" ), curElem = jQuery( elem ), props = {}; // Set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } curOffset = curElem.offset(); curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); calculatePosition = ( position === "absolute" || position === "fixed" ) && ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; // Need to be able to calculate position if either // top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( isFunction( options ) ) { // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend( { // offset() relates an element's border box to the document origin offset: function( options ) { // Preserve chaining for setter if ( arguments.length ) { return options === undefined ? this : this.each( function( i ) { jQuery.offset.setOffset( this, options, i ); } ); } var rect, win, elem = this[ 0 ]; if ( !elem ) { return; } // Return zeros for disconnected and hidden (display: none) elements (gh-2310) // Support: IE <=11 only // Running getBoundingClientRect on a // disconnected node in IE throws an error if ( !elem.getClientRects().length ) { return { top: 0, left: 0 }; } // Get document-relative position by adding viewport scroll to viewport-relative gBCR rect = elem.getBoundingClientRect(); win = elem.ownerDocument.defaultView; return { top: rect.top + win.pageYOffset, left: rect.left + win.pageXOffset }; }, // position() relates an element's margin box to its offset parent's padding box // This corresponds to the behavior of CSS absolute positioning position: function() { if ( !this[ 0 ] ) { return; } var offsetParent, offset, doc, elem = this[ 0 ], parentOffset = { top: 0, left: 0 }; // position:fixed elements are offset from the viewport, which itself always has zero offset if ( jQuery.css( elem, "position" ) === "fixed" ) { // Assume position:fixed implies availability of getBoundingClientRect offset = elem.getBoundingClientRect(); } else { offset = this.offset(); // Account for the *real* offset parent, which can be the document or its root element // when a statically positioned element is identified doc = elem.ownerDocument; offsetParent = elem.offsetParent || doc.documentElement; while ( offsetParent && ( offsetParent === doc.body || offsetParent === doc.documentElement ) && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.parentNode; } if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { // Incorporate borders into its offset, since they are outside its content origin parentOffset = jQuery( offsetParent ).offset(); parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); } } // Subtract parent offsets and element margins return { top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) }; }, // This method will return documentElement in the following cases: // 1) For the element inside the iframe without offsetParent, this method will return // documentElement of the parent window // 2) For the hidden or detached element // 3) For body or html element, i.e. in case of the html node - it will return itself // // but those exceptions were never presented as a real life use-cases // and might be considered as more preferable results. // // This logic, however, is not guaranteed and can change at any point in the future offsetParent: function() { return this.map( function() { var offsetParent = this.offsetParent; while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.offsetParent; } return offsetParent || documentElement; } ); } } ); // Create scrollLeft and scrollTop methods jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { var top = "pageYOffset" === prop; jQuery.fn[ method ] = function( val ) { return access( this, function( elem, method, val ) { // Coalesce documents and windows var win; if ( isWindow( elem ) ) { win = elem; } else if ( elem.nodeType === 9 ) { win = elem.defaultView; } if ( val === undefined ) { return win ? win[ prop ] : elem[ method ]; } if ( win ) { win.scrollTo( !top ? val : win.pageXOffset, top ? val : win.pageYOffset ); } else { elem[ method ] = val; } }, method, val, arguments.length ); }; } ); // Support: Safari <=7 - 9.1, Chrome <=37 - 49 // Add the top/left cssHooks using jQuery.fn.position // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 // getComputedStyle returns percent when specified for top/left/bottom/right; // rather than make the css module depend on the offset module, just check for it here jQuery.each( [ "top", "left" ], function( _i, prop ) { jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); // If curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; } } ); } ); // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); return access( this, function( elem, type, value ) { var doc; if ( isWindow( elem ) ) { // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) return funcName.indexOf( "outer" ) === 0 ? elem[ "inner" + name ] : elem.document.documentElement[ "client" + name ]; } // Get document width or height if ( elem.nodeType === 9 ) { doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], // whichever is greatest return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], doc[ "client" + name ] ); } return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); }, type, chainable ? margin : undefined, chainable ); }; } ); } ); jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( _i, type ) { jQuery.fn[ type ] = function( fn ) { return this.on( type, fn ); }; } ); jQuery.fn.extend( { bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); }, hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu" ).split( " " ), function( _i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; } ); // Support: Android <=4.0 only // Make sure we trim BOM and NBSP var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; // Bind a function to a context, optionally partially applying any // arguments. // jQuery.proxy is deprecated to promote standards (specifically Function#bind) // However, it is not slated for removal any time soon jQuery.proxy = function( fn, context ) { var tmp, args, proxy; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }; jQuery.holdReady = function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }; jQuery.isArray = Array.isArray; jQuery.parseJSON = JSON.parse; jQuery.nodeName = nodeName; jQuery.isFunction = isFunction; jQuery.isWindow = isWindow; jQuery.camelCase = camelCase; jQuery.type = toType; jQuery.now = Date.now; jQuery.isNumeric = function( obj ) { // As of jQuery 3.0, isNumeric is limited to // strings and numbers (primitives or objects) // that can be coerced to finite numbers (gh-2662) var type = jQuery.type( obj ); return ( type === "number" || type === "string" ) && // parseFloat NaNs numeric-cast false positives ("") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN !isNaN( obj - parseFloat( obj ) ); }; jQuery.trim = function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }; // Register as a named AMD module, since jQuery can be concatenated with other // files that may use define, but not via a proper concatenation script that // understands anonymous AMD modules. A named AMD is safest and most robust // way to register. Lowercase jquery is used because AMD module names are // derived from file names, and jQuery is normally delivered in a lowercase // file name. Do this after creating the global so that if an AMD module wants // to call noConflict to hide this version of jQuery, it will work. // Note that for maximum portability, libraries that are not jQuery should // declare themselves as anonymous modules, and avoid setting a global if an // AMD loader is present. jQuery is a special case. For more information, see // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon if ( true ) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { return jQuery; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } var // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$; jQuery.noConflict = function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }; // Expose jQuery and $ identifiers, even in AMD // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) if ( typeof noGlobal === "undefined" ) { window.jQuery = window.$ = jQuery; } return jQuery; } ); /***/ }), /***/ "1626": /***/ (function(module, exports) { // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable module.exports = function (argument) { return typeof argument == 'function'; }; /***/ }), /***/ "1a2d": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var toObject = __webpack_require__("7b0b"); var hasOwnProperty = uncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty module.exports = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; /***/ }), /***/ "1d80": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var TypeError = global.TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ "1dde": /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__("d039"); var wellKnownSymbol = __webpack_require__("b622"); var V8_VERSION = __webpack_require__("2d00"); var SPECIES = wellKnownSymbol('species'); module.exports = function (METHOD_NAME) { // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/677 return V8_VERSION >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; /***/ }), /***/ "23cb": /***/ (function(module, exports, __webpack_require__) { var toIntegerOrInfinity = __webpack_require__("5926"); var max = Math.max; var min = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). module.exports = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max(integer + length, 0) : min(integer, length); }; /***/ }), /***/ "23e7": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var getOwnPropertyDescriptor = __webpack_require__("06cf").f; var createNonEnumerableProperty = __webpack_require__("9112"); var redefine = __webpack_require__("6eeb"); var setGlobal = __webpack_require__("ce4e"); var copyConstructorProperties = __webpack_require__("e893"); var isForced = __webpack_require__("94ca"); /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ module.exports = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global; } else if (STATIC) { target = global[TARGET] || setGlobal(TARGET, {}); } else { target = (global[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; /***/ }), /***/ "241c": /***/ (function(module, exports, __webpack_require__) { var internalObjectKeys = __webpack_require__("ca84"); var enumBugKeys = __webpack_require__("7839"); var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys(O, hiddenKeys); }; /***/ }), /***/ "24fb": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader // eslint-disable-next-line func-names module.exports = function (useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if (item[2]) { return "@media ".concat(item[2], " {").concat(content, "}"); } return content; }).join(''); }; // import a list of modules into the list // eslint-disable-next-line func-names list.i = function (modules, mediaQuery, dedupe) { if (typeof modules === 'string') { // eslint-disable-next-line no-param-reassign modules = [[null, modules, '']]; } var alreadyImportedModules = {}; if (dedupe) { for (var i = 0; i < this.length; i++) { // eslint-disable-next-line prefer-destructuring var id = this[i][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _i = 0; _i < modules.length; _i++) { var item = [].concat(modules[_i]); if (dedupe && alreadyImportedModules[item[0]]) { // eslint-disable-next-line no-continue continue; } if (mediaQuery) { if (!item[2]) { item[2] = mediaQuery; } else { item[2] = "".concat(mediaQuery, " and ").concat(item[2]); } } list.push(item); } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */"); }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); return "/*# ".concat(data, " */"); } /***/ }), /***/ "2d00": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var userAgent = __webpack_require__("342f"); var process = global.process; var Deno = global.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } module.exports = version; /***/ }), /***/ "3089": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ztree_vue_vue_type_style_index_0_id_2deb67ae_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bae4"); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ztree_vue_vue_type_style_index_0_id_2deb67ae_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ztree_vue_vue_type_style_index_0_id_2deb67ae_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /***/ }), /***/ "342f": /***/ (function(module, exports, __webpack_require__) { var getBuiltIn = __webpack_require__("d066"); module.exports = getBuiltIn('navigator', 'userAgent') || ''; /***/ }), /***/ "3a9b": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); module.exports = uncurryThis({}.isPrototypeOf); /***/ }), /***/ "4273": /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb"); exports = ___CSS_LOADER_API_IMPORT___(false); // Module exports.push([module.i, ".ztree[data-v-2deb67ae]{text-align:left;font-size:14px}.ztree[data-v-2deb67ae] li{list-style-type:none;white-space:nowrap;outline:none}.ztree[data-v-2deb67ae] li ul{position:relative;padding:0 0 0 20px;margin:0}.ztree[data-v-2deb67ae] .line:before{position:absolute;top:0;left:10px;height:100%;content:\"\";border-right:1px dotted #dbdbdb}.ztree[data-v-2deb67ae] .bottom_docu:after,.ztree[data-v-2deb67ae] .bottom_docu:before,.ztree[data-v-2deb67ae] .center_docu:after,.ztree[data-v-2deb67ae] .center_docu:before,.ztree[data-v-2deb67ae] .roots_docu:after,.ztree[data-v-2deb67ae] .roots_docu:before{position:absolute;content:\"\";border:0 dotted #dbdbdb}.ztree[data-v-2deb67ae] .roots_docu:before{left:10px;height:50%;top:50%;border-left-width:1px}.ztree[data-v-2deb67ae] .roots_docu:after{top:50%;left:11px;width:50%;border-top-width:1px}.ztree[data-v-2deb67ae] .center_docu:before{left:10px;height:100%;border-left-width:1px}.ztree[data-v-2deb67ae] .center_docu:after{top:50%;left:11px;width:50%;border-top-width:1px}.ztree[data-v-2deb67ae] .bottom_docu:before{left:10px;height:50%;border-left-width:1px}.ztree[data-v-2deb67ae] .bottom_docu:after{top:50%;left:11px;width:50%;border-top-width:1px}.ztree[data-v-2deb67ae] li a{display:inline-block;line-height:22px;height:22px;margin:0;cursor:pointer;-webkit-transition:none;transition:none;vertical-align:middle;color:#555}.ztree[data-v-2deb67ae] .node_name{display:inline-block;padding:0 3px;border-radius:4px}.ztree[data-v-2deb67ae] .curSelectedNode .node_name{color:#000;background-color:#c9e9f7}.ztree[data-v-2deb67ae] .curSelectedNode_Edit{height:20px;opacity:.8;color:#000;border:1px solid #6cc2e8;background-color:#9dd6f0}.ztree[data-v-2deb67ae] .tmpTargetNode_inner{opacity:.8;color:#fff;background-color:#4fcbf0;filter:alpha(opacity=80)}.ztree[data-v-2deb67ae] .rename{font-size:12px;line-height:22px;width:80px;height:22px;margin:0;padding:0;vertical-align:top;border:0;background:none}.ztree[data-v-2deb67ae] .button{position:relative;display:inline-block;line-height:22px;height:22px;width:22px;cursor:pointer;text-align:center;vertical-align:middle}.ztree[data-v-2deb67ae] .button.edit{color:#25ae88}.ztree[data-v-2deb67ae] .button.remove{color:#cb4042}.ztree[data-v-2deb67ae] .button.chk{position:relative;width:14px;height:14px;margin:0 4px 0 0;border:1px solid #d7dde4;border-radius:2px;background:#fff}.ztree[data-v-2deb67ae] .chk.radio_false_disable,.ztree[data-v-2deb67ae] .chk.radio_false_full,.ztree[data-v-2deb67ae] .chk.radio_false_full_focus,.ztree[data-v-2deb67ae] .chk.radio_false_part,.ztree[data-v-2deb67ae] .chk.radio_false_part_focus,.ztree[data-v-2deb67ae] .chk.radio_true_disable,.ztree[data-v-2deb67ae] .chk.radio_true_full,.ztree[data-v-2deb67ae] .chk.radio_true_full_focus,.ztree[data-v-2deb67ae] .chk.radio_true_part,.ztree[data-v-2deb67ae] .chk.radio_true_part_focus{border-radius:8px}.ztree[data-v-2deb67ae] .button.chk:after{position:absolute;top:1px;left:4px;width:4px;height:8px;content:\"\";transition:-webkit-transform .2s ease-in-out;-webkit-transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;-webkit-transform:rotate(0deg) scale(0);transform:rotate(0deg) scale(0);border-right:2px solid #fff;border-bottom:2px solid #fff}.ztree[data-v-2deb67ae] .button.checkbox_false_full_focus{border-color:#ccc}.ztree[data-v-2deb67ae] .button.checkbox_true_disable,.ztree[data-v-2deb67ae] .button.checkbox_true_full,.ztree[data-v-2deb67ae] .button.checkbox_true_full_focus,.ztree[data-v-2deb67ae] .button.checkbox_true_part,.ztree[data-v-2deb67ae] .button.checkbox_true_part_focus{border-color:#39f;background-color:#39f}.ztree[data-v-2deb67ae] .button.checkbox_true_disable:after,.ztree[data-v-2deb67ae] .button.checkbox_true_full:after,.ztree[data-v-2deb67ae] .button.checkbox_true_full_focus:after{-webkit-transform:rotate(45deg) scale(1);transform:rotate(45deg) scale(1)}.ztree[data-v-2deb67ae] .button.checkbox_true_part:after,.ztree[data-v-2deb67ae] .button.checkbox_true_part_focus:after{top:5px;left:2px;width:10px;height:1px;-webkit-transform:rotate(0deg) scale(1);transform:rotate(0deg) scale(1);border-right:0}.ztree[data-v-2deb67ae] .button.radio_true_full,.ztree[data-v-2deb67ae] .chk.radio_true_full_focus,.ztree[data-v-2deb67ae] .chk.radio_true_part,.ztree[data-v-2deb67ae] .chk.radio_true_part_focus{border-color:#39f}.ztree[data-v-2deb67ae] .button.radio_true_full:after,.ztree[data-v-2deb67ae] .chk.radio_true_full_focus:after,.ztree[data-v-2deb67ae] .chk.radio_true_part:after,.ztree[data-v-2deb67ae] .chk.radio_true_part_focus:after{top:3px;left:3px;width:8px;-webkit-transform:rotate(0deg) scale(1);transform:rotate(0deg) scale(1);border:0;border-radius:4px;background:#39f}.ztree[data-v-2deb67ae] .button.checkbox_false_disable,.ztree[data-v-2deb67ae] .button.checkbox_true_disable,.ztree[data-v-2deb67ae] .chk.radio_false_disable,.ztree[data-v-2deb67ae] .chk.radio_true_disable{cursor:not-allowed}.ztree[data-v-2deb67ae] .button.checkbox_false_disable{background-color:#f3f3f3}.ztree[data-v-2deb67ae] .button.bottom_close:before,.ztree[data-v-2deb67ae] .button.bottom_open:before,.ztree[data-v-2deb67ae] .button.center_close:before,.ztree[data-v-2deb67ae] .button.center_open:before,.ztree[data-v-2deb67ae] .button.noline_close:before,.ztree[data-v-2deb67ae] .button.noline_open:before,.ztree[data-v-2deb67ae] .button.root_close:before,.ztree[data-v-2deb67ae] .button.root_open:before,.ztree[data-v-2deb67ae] .button.roots_close:before,.ztree[data-v-2deb67ae] .button.roots_open:before{position:absolute;top:5px;left:5px;content:\"\";transition:-webkit-transform .3s ease;-webkit-transition:-webkit-transform .3s ease;transition:transform .3s ease;transition:transform .3s ease,-webkit-transform .3s ease;-webkit-transform:rotate(0deg);transform:rotate(0deg);-webkit-transform-origin:25% 50%;transform-origin:25% 50%;border:6px solid;border-color:transparent transparent transparent #666}.ztree[data-v-2deb67ae] .button.bottom_open:before,.ztree[data-v-2deb67ae] .button.center_open:before,.ztree[data-v-2deb67ae] .button.noline_open:before,.ztree[data-v-2deb67ae] .button.root_open:before,.ztree[data-v-2deb67ae] .button.roots_open:before{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ztree[data-v-2deb67ae] .button.ico_loading{margin-right:2px;background:url(\"data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7\") 0 no-repeat}.ztree[data-v-2deb67ae] .tmpTargetzTree{opacity:.8;background-color:#2ea9df;filter:alpha(opacity=80)}.ztree[data-v-2deb67ae] .tmpzTreeMove_arrow{position:absolute;width:18px;height:18px;color:#4fcbf0}", ""]); // Exports module.exports = exports; /***/ }), /***/ "43b2": /***/ (function(module, exports) { /* * JQuery zTree excheck * v3.5.48 * http://treejs.cn/ * * Copyright (c) 2010 Hunter.z * * Licensed same as jquery - MIT License * http://www.opensource.org/licenses/mit-license.php * * Date: 2020-11-21 */ (function ($) { //default consts of excheck var _consts = { event: { CHECK: "ztree_check" }, id: { CHECK: "_check" }, checkbox: { STYLE: "checkbox", DEFAULT: "chk", DISABLED: "disable", FALSE: "false", TRUE: "true", FULL: "full", PART: "part", FOCUS: "focus" }, radio: { STYLE: "radio", TYPE_ALL: "all", TYPE_LEVEL: "level" } }, //default setting of excheck _setting = { check: { enable: false, autoCheckTrigger: false, chkStyle: _consts.checkbox.STYLE, nocheckInherit: false, chkDisabledInherit: false, radioType: _consts.radio.TYPE_LEVEL, chkboxType: { "Y": "ps", "N": "ps" } }, data: { key: { checked: "checked" } }, callback: { beforeCheck: null, onCheck: null } }, //default root of excheck _initRoot = function (setting) { var r = data.getRoot(setting); r.radioCheckedList = []; }, //default cache of excheck _initCache = function (treeId) { }, //default bind event of excheck _bindEvent = function (setting) { var o = setting.treeObj, c = consts.event; o.bind(c.CHECK, function (event, srcEvent, treeId, node) { event.srcEvent = srcEvent; tools.apply(setting.callback.onCheck, [event, treeId, node]); }); }, _unbindEvent = function (setting) { var o = setting.treeObj, c = consts.event; o.unbind(c.CHECK); }, //default event proxy of excheck _eventProxy = function (e) { var target = e.target, setting = data.getSetting(e.data.treeId), tId = "", node = null, nodeEventType = "", treeEventType = "", nodeEventCallback = null, treeEventCallback = null; if (tools.eqs(e.type, "mouseover")) { if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.CHECK) !== null) { tId = tools.getNodeMainDom(target).id; nodeEventType = "mouseoverCheck"; } } else if (tools.eqs(e.type, "mouseout")) { if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.CHECK) !== null) { tId = tools.getNodeMainDom(target).id; nodeEventType = "mouseoutCheck"; } } else if (tools.eqs(e.type, "click")) { if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.CHECK) !== null) { tId = tools.getNodeMainDom(target).id; nodeEventType = "checkNode"; } } if (tId.length > 0) { node = data.getNodeCache(setting, tId); switch (nodeEventType) { case "checkNode" : nodeEventCallback = _handler.onCheckNode; break; case "mouseoverCheck" : nodeEventCallback = _handler.onMouseoverCheck; break; case "mouseoutCheck" : nodeEventCallback = _handler.onMouseoutCheck; break; } } var proxyResult = { stop: nodeEventType === "checkNode", node: node, nodeEventType: nodeEventType, nodeEventCallback: nodeEventCallback, treeEventType: treeEventType, treeEventCallback: treeEventCallback }; return proxyResult }, //default init node of excheck _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { if (!n) return; var checked = data.nodeChecked(setting, n); n.checkedOld = checked; if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true"); n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled); if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true"); n.halfCheck = !!n.halfCheck; n.check_Child_State = -1; n.check_Focus = false; n.getCheckStatus = function () { return data.getCheckStatus(setting, n); }; if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && checked) { var r = data.getRoot(setting); r.radioCheckedList.push(n); } }, //add dom for check _beforeA = function (setting, node, html) { if (setting.check.enable) { data.makeChkFlag(setting, node); html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), "></span>"); } }, //update zTreeObj, add method of check _zTreeTools = function (setting, zTreeTools) { zTreeTools.checkNode = function (node, checked, checkTypeFlag, callbackFlag) { var nodeChecked = data.nodeChecked(setting, node); if (node.chkDisabled === true) return; if (checked !== true && checked !== false) { checked = !nodeChecked; } callbackFlag = !!callbackFlag; if (nodeChecked === checked && !checkTypeFlag) { return; } else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) { return; } if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) { data.nodeChecked(setting, node, checked); var checkObj = $$(node, consts.id.CHECK, this.setting); if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); view.setChkClass(this.setting, checkObj, node); view.repairParentChkClassWithSelf(this.setting, node); if (callbackFlag) { this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]); } } } zTreeTools.checkAllNodes = function (checked) { view.repairAllChk(this.setting, !!checked); } zTreeTools.getCheckedNodes = function (checked) { checked = (checked !== false); var children = data.nodeChildren(setting, data.getRoot(this.setting)); return data.getTreeCheckedNodes(this.setting, children, checked); } zTreeTools.getChangeCheckedNodes = function () { var children = data.nodeChildren(setting, data.getRoot(this.setting)); return data.getTreeChangeCheckedNodes(this.setting, children); } zTreeTools.setChkDisabled = function (node, disabled, inheritParent, inheritChildren) { disabled = !!disabled; inheritParent = !!inheritParent; inheritChildren = !!inheritChildren; view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren); view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent); } var _updateNode = zTreeTools.updateNode; zTreeTools.updateNode = function (node, checkTypeFlag) { if (_updateNode) _updateNode.apply(zTreeTools, arguments); if (!node || !this.setting.check.enable) return; var nObj = $$(node, this.setting); if (nObj.get(0) && tools.uCanDo(this.setting)) { var checkObj = $$(node, consts.id.CHECK, this.setting); if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node); view.setChkClass(this.setting, checkObj, node); view.repairParentChkClassWithSelf(this.setting, node); } } }, //method of operate data _data = { getRadioCheckedList: function (setting) { var checkedList = data.getRoot(setting).radioCheckedList; for (var i = 0, j = checkedList.length; i < j; i++) { if (!data.getNodeCache(setting, checkedList[i].tId)) { checkedList.splice(i, 1); i--; j--; } } return checkedList; }, getCheckStatus: function (setting, node) { if (!setting.check.enable || node.nocheck || node.chkDisabled) return null; var checked = data.nodeChecked(setting, node), r = { checked: checked, half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (checked ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0))) }; return r; }, getTreeCheckedNodes: function (setting, nodes, checked, results) { if (!nodes) return []; var onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL); results = !results ? [] : results; for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; var children = data.nodeChildren(setting, node); var nodeChecked = data.nodeChecked(setting, node); if (node.nocheck !== true && node.chkDisabled !== true && nodeChecked == checked) { results.push(node); if (onlyOne) { break; } } data.getTreeCheckedNodes(setting, children, checked, results); if (onlyOne && results.length > 0) { break; } } return results; }, getTreeChangeCheckedNodes: function (setting, nodes, results) { if (!nodes) return []; results = !results ? [] : results; for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; var children = data.nodeChildren(setting, node); var nodeChecked = data.nodeChecked(setting, node); if (node.nocheck !== true && node.chkDisabled !== true && nodeChecked != node.checkedOld) { results.push(node); } data.getTreeChangeCheckedNodes(setting, children, results); } return results; }, makeChkFlag: function (setting, node) { if (!node) return; var chkFlag = -1; var children = data.nodeChildren(setting, node); if (children) { for (var i = 0, l = children.length; i < l; i++) { var cNode = children[i]; var nodeChecked = data.nodeChecked(setting, cNode); var tmp = -1; if (setting.check.chkStyle == consts.radio.STYLE) { if (cNode.nocheck === true || cNode.chkDisabled === true) { tmp = cNode.check_Child_State; } else if (cNode.halfCheck === true) { tmp = 2; } else if (nodeChecked) { tmp = 2; } else { tmp = cNode.check_Child_State > 0 ? 2 : 0; } if (tmp == 2) { chkFlag = 2; break; } else if (tmp == 0) { chkFlag = 0; } } else if (setting.check.chkStyle == consts.checkbox.STYLE) { if (cNode.nocheck === true || cNode.chkDisabled === true) { tmp = cNode.check_Child_State; } else if (cNode.halfCheck === true) { tmp = 1; } else if (nodeChecked) { tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1; } else { tmp = (cNode.check_Child_State > 0) ? 1 : 0; } if (tmp === 1) { chkFlag = 1; break; } else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) { chkFlag = 1; break; } else if (chkFlag === 2 && tmp > -1 && tmp < 2) { chkFlag = 1; break; } else if (tmp > -1) { chkFlag = tmp; } } } } node.check_Child_State = chkFlag; } }, //method of event proxy _event = {}, //method of event handler _handler = { onCheckNode: function (event, node) { if (node.chkDisabled === true) return false; var setting = data.getSetting(event.data.treeId); if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true; var nodeChecked = data.nodeChecked(setting, node); data.nodeChecked(setting, node, !nodeChecked); view.checkNodeRelation(setting, node); var checkObj = $$(node, consts.id.CHECK, setting); view.setChkClass(setting, checkObj, node); view.repairParentChkClassWithSelf(setting, node); setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]); return true; }, onMouseoverCheck: function (event, node) { if (node.chkDisabled === true) return false; var setting = data.getSetting(event.data.treeId), checkObj = $$(node, consts.id.CHECK, setting); node.check_Focus = true; view.setChkClass(setting, checkObj, node); return true; }, onMouseoutCheck: function (event, node) { if (node.chkDisabled === true) return false; var setting = data.getSetting(event.data.treeId), checkObj = $$(node, consts.id.CHECK, setting); node.check_Focus = false; view.setChkClass(setting, checkObj, node); return true; } }, //method of tools for zTree _tools = {}, //method of operate ztree dom _view = { checkNodeRelation: function (setting, node) { var pNode, i, l, r = consts.radio; var nodeChecked = data.nodeChecked(setting, node); if (setting.check.chkStyle == r.STYLE) { var checkedList = data.getRadioCheckedList(setting); if (nodeChecked) { if (setting.check.radioType == r.TYPE_ALL) { for (i = checkedList.length - 1; i >= 0; i--) { pNode = checkedList[i]; var pNodeChecked = data.nodeChecked(setting, pNode); if (pNodeChecked && pNode != node) { data.nodeChecked(setting, pNode, false); checkedList.splice(i, 1); view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); if (pNode.parentTId != node.parentTId) { view.repairParentChkClassWithSelf(setting, pNode); } } } checkedList.push(node); } else { var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); var children = data.nodeChildren(setting, parentNode); for (i = 0, l = children.length; i < l; i++) { pNode = children[i]; var pNodeChecked = data.nodeChecked(setting, pNode); if (pNodeChecked && pNode != node) { data.nodeChecked(setting, pNode, false); view.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode); } } } } else if (setting.check.radioType == r.TYPE_ALL) { for (i = 0, l = checkedList.length; i < l; i++) { if (node == checkedList[i]) { checkedList.splice(i, 1); break; } } } } else { var children = data.nodeChildren(setting, node); if (nodeChecked && (!children || children.length == 0 || setting.check.chkboxType.Y.indexOf("s") > -1)) { view.setSonNodeCheckBox(setting, node, true); } if (!nodeChecked && (!children || children.length == 0 || setting.check.chkboxType.N.indexOf("s") > -1)) { view.setSonNodeCheckBox(setting, node, false); } if (nodeChecked && setting.check.chkboxType.Y.indexOf("p") > -1) { view.setParentNodeCheckBox(setting, node, true); } if (!nodeChecked && setting.check.chkboxType.N.indexOf("p") > -1) { view.setParentNodeCheckBox(setting, node, false); } } }, makeChkClass: function (setting, node) { var c = consts.checkbox, r = consts.radio, fullStyle = ""; var nodeChecked = data.nodeChecked(setting, node); if (node.chkDisabled === true) { fullStyle = c.DISABLED; } else if (node.halfCheck) { fullStyle = c.PART; } else if (setting.check.chkStyle == r.STYLE) { fullStyle = (node.check_Child_State < 1) ? c.FULL : c.PART; } else { fullStyle = nodeChecked ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL : c.PART) : ((node.check_Child_State < 1) ? c.FULL : c.PART); } var chkName = setting.check.chkStyle + "_" + (nodeChecked ? c.TRUE : c.FALSE) + "_" + fullStyle; chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; }, repairAllChk: function (setting, checked) { if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { var root = data.getRoot(setting); var children = data.nodeChildren(setting, root); for (var i = 0, l = children.length; i < l; i++) { var node = children[i]; if (node.nocheck !== true && node.chkDisabled !== true) { data.nodeChecked(setting, node, checked); } view.setSonNodeCheckBox(setting, node, checked); } } }, repairChkClass: function (setting, node) { if (!node) return; data.makeChkFlag(setting, node); if (node.nocheck !== true) { var checkObj = $$(node, consts.id.CHECK, setting); view.setChkClass(setting, checkObj, node); } }, repairParentChkClass: function (setting, node) { if (!node || !node.parentTId) return; var pNode = node.getParentNode(); view.repairChkClass(setting, pNode); view.repairParentChkClass(setting, pNode); }, repairParentChkClassWithSelf: function (setting, node) { if (!node) return; var children = data.nodeChildren(setting, node); if (children && children.length > 0) { view.repairParentChkClass(setting, children[0]); } else { view.repairParentChkClass(setting, node); } }, repairSonChkDisabled: function (setting, node, chkDisabled, inherit) { if (!node) return; if (node.chkDisabled != chkDisabled) { node.chkDisabled = chkDisabled; } view.repairChkClass(setting, node); var children = data.nodeChildren(setting, node); if (children && inherit) { for (var i = 0, l = children.length; i < l; i++) { var sNode = children[i]; view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit); } } }, repairParentChkDisabled: function (setting, node, chkDisabled, inherit) { if (!node) return; if (node.chkDisabled != chkDisabled && inherit) { node.chkDisabled = chkDisabled; } view.repairChkClass(setting, node); view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit); }, setChkClass: function (setting, obj, node) { if (!obj) return; if (node.nocheck === true) { obj.hide(); } else { obj.show(); } obj.attr('class', view.makeChkClass(setting, node)); }, setParentNodeCheckBox: function (setting, node, value, srcNode) { var checkObj = $$(node, consts.id.CHECK, setting); if (!srcNode) srcNode = node; data.makeChkFlag(setting, node); if (node.nocheck !== true && node.chkDisabled !== true) { data.nodeChecked(setting, node, value); view.setChkClass(setting, checkObj, node); if (setting.check.autoCheckTrigger && node != srcNode) { setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); } } if (node.parentTId) { var pSign = true; if (!value) { var pNodes = data.nodeChildren(setting, node.getParentNode()); for (var i = 0, l = pNodes.length; i < l; i++) { var pNode = pNodes[i]; var nodeChecked = data.nodeChecked(setting, pNode); if ((pNode.nocheck !== true && pNode.chkDisabled !== true && nodeChecked) || ((pNode.nocheck === true || pNode.chkDisabled === true) && pNode.check_Child_State > 0)) { pSign = false; break; } } } if (pSign) { view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode); } } }, setSonNodeCheckBox: function (setting, node, value, srcNode) { if (!node) return; var checkObj = $$(node, consts.id.CHECK, setting); if (!srcNode) srcNode = node; var hasDisable = false; var children = data.nodeChildren(setting, node); if (children) { for (var i = 0, l = children.length; i < l; i++) { var sNode = children[i]; view.setSonNodeCheckBox(setting, sNode, value, srcNode); if (sNode.chkDisabled === true) hasDisable = true; } } if (node != data.getRoot(setting) && node.chkDisabled !== true) { if (hasDisable && node.nocheck !== true) { data.makeChkFlag(setting, node); } if (node.nocheck !== true && node.chkDisabled !== true) { data.nodeChecked(setting, node, value); if (!hasDisable) node.check_Child_State = (children && children.length > 0) ? (value ? 2 : 0) : -1; } else { node.check_Child_State = -1; } view.setChkClass(setting, checkObj, node); if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) { setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]); } } } }, _z = { tools: _tools, view: _view, event: _event, data: _data }; $.extend(true, $.fn.zTree.consts, _consts); $.extend(true, $.fn.zTree._z, _z); var zt = $.fn.zTree, tools = zt._z.tools, consts = zt.consts, view = zt._z.view, data = zt._z.data, event = zt._z.event, $$ = tools.$; data.nodeChecked = function (setting, node, newChecked) { if (!node) { return false; } var key = setting.data.key.checked; if (typeof newChecked !== 'undefined') { if (typeof newChecked === "string") { newChecked = tools.eqs(newChecked, "true"); } newChecked = !!newChecked; node[key] = newChecked; } else if (typeof node[key] == "string"){ node[key] = tools.eqs(node[key], "true"); } else { node[key] = !!node[key]; } return node[key]; }; data.exSetting(_setting); data.addInitBind(_bindEvent); data.addInitUnBind(_unbindEvent); data.addInitCache(_initCache); data.addInitNode(_initNode); data.addInitProxy(_eventProxy, true); data.addInitRoot(_initRoot); data.addBeforeA(_beforeA); data.addZTreeTools(_zTreeTools); var _createNodes = view.createNodes; view.createNodes = function (setting, level, nodes, parentNode, index) { if (_createNodes) _createNodes.apply(view, arguments); if (!nodes) return; view.repairParentChkClassWithSelf(setting, parentNode); } var _removeNode = view.removeNode; view.removeNode = function (setting, node) { var parentNode = node.getParentNode(); if (_removeNode) _removeNode.apply(view, arguments); if (!node || !parentNode) return; view.repairChkClass(setting, parentNode); view.repairParentChkClass(setting, parentNode); } var _appendNodes = view.appendNodes; view.appendNodes = function (setting, level, nodes, parentNode, index, initFlag, openFlag) { var html = ""; if (_appendNodes) { html = _appendNodes.apply(view, arguments); } if (parentNode) { data.makeChkFlag(setting, parentNode); } return html; } })(jQuery); /***/ }), /***/ "44ad": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var uncurryThis = __webpack_require__("e330"); var fails = __webpack_require__("d039"); var classof = __webpack_require__("c6b6"); var Object = global.Object; var split = uncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings module.exports = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !Object('z').propertyIsEnumerable(0); }) ? function (it) { return classof(it) == 'String' ? split(it, '') : Object(it); } : Object; /***/ }), /***/ "485a": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var call = __webpack_require__("c65b"); var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var TypeError = global.TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive module.exports = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ "4930": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = __webpack_require__("2d00"); var fails = __webpack_require__("d039"); // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing module.exports = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION && V8_VERSION < 41; }); /***/ }), /***/ "499e": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ addStylesClient; }); // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js /** * Translates the list format produced by css-loader into something * easier to manipulate. */ function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: media, sourceMap: sourceMap } if (!newStyles[id]) { styles.push(newStyles[id] = { id: id, parts: [part] }) } else { newStyles[id].parts.push(part) } } return styles } // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra Modified by Evan You @yyx990803 */ var hasDocument = typeof document !== 'undefined' if (typeof DEBUG !== 'undefined' && DEBUG) { if (!hasDocument) { throw new Error( 'vue-style-loader cannot be used in a non-browser environment. ' + "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." ) } } /* type StyleObject = { id: number; parts: Array<StyleObjectPart> } type StyleObjectPart = { css: string; media: string; sourceMap: ?string } */ var stylesInDom = {/* [id: number]: { id: number, refs: number, parts: Array<(obj?: StyleObjectPart) => void> } */} var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) var singletonElement = null var singletonCounter = 0 var isProduction = false var noop = function () {} var options = null var ssrIdKey = 'data-vue-ssr-id' // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) function addStylesClient (parentId, list, _isProduction, _options) { isProduction = _isProduction options = _options || {} var styles = listToStyles(parentId, list) addStylesToDom(styles) return function update (newList) { var mayRemove = [] for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] domStyle.refs-- mayRemove.push(domStyle) } if (newList) { styles = listToStyles(parentId, newList) addStylesToDom(styles) } else { styles = [] } for (var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i] if (domStyle.refs === 0) { for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j]() } delete stylesInDom[domStyle.id] } } } } function addStylesToDom (styles /* Array<StyleObject> */) { for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] if (domStyle) { domStyle.refs++ for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]) } for (; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j])) } if (domStyle.parts.length > item.parts.length) { domStyle.parts.length = item.parts.length } } else { var parts = [] for (var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j])) } stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } } } } function createStyleElement () { var styleElement = document.createElement('style') styleElement.type = 'text/css' head.appendChild(styleElement) return styleElement } function addStyle (obj /* StyleObjectPart */) { var update, remove var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]') if (styleElement) { if (isProduction) { // has SSR styles and in production mode. // simply do nothing. return noop } else { // has SSR styles but in dev mode. // for some reason Chrome can't handle source map in server-rendered // style tags - source maps in <style> only works if the style tag is // created and inserted dynamically. So we remove the server rendered // styles and inject new ones. styleElement.parentNode.removeChild(styleElement) } } if (isOldIE) { // use singleton mode for IE9. var styleIndex = singletonCounter++ styleElement = singletonElement || (singletonElement = createStyleElement()) update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) } else { // use multi-style-tag mode in all other cases styleElement = createStyleElement() update = applyToTag.bind(null, styleElement) remove = function () { styleElement.parentNode.removeChild(styleElement) } } update(obj) return function updateStyle (newObj /* StyleObjectPart */) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return } update(obj = newObj) } else { remove() } } } var replaceText = (function () { var textStore = [] return function (index, replacement) { textStore[index] = replacement return textStore.filter(Boolean).join('\n') } })() function applyToSingletonTag (styleElement, index, remove, obj) { var css = remove ? '' : obj.css if (styleElement.styleSheet) { styleElement.styleSheet.cssText = replaceText(index, css) } else { var cssNode = document.createTextNode(css) var childNodes = styleElement.childNodes if (childNodes[index]) styleElement.removeChild(childNodes[index]) if (childNodes.length) { styleElement.insertBefore(cssNode, childNodes[index]) } else { styleElement.appendChild(cssNode) } } } function applyToTag (styleElement, obj) { var css = obj.css var media = obj.media var sourceMap = obj.sourceMap if (media) { styleElement.setAttribute('media', media) } if (options.ssrId) { styleElement.setAttribute(ssrIdKey, obj.id) } if (sourceMap) { // https://developer.chrome.com/devtools/docs/javascript-debugging // this makes source maps inside style tags work properly in Chrome css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' // http://stackoverflow.com/a/26603875 css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' } if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild) } styleElement.appendChild(document.createTextNode(css)) } } /***/ }), /***/ "4d64": /***/ (function(module, exports, __webpack_require__) { var toIndexedObject = __webpack_require__("fc6a"); var toAbsoluteIndex = __webpack_require__("23cb"); var lengthOfArrayLike = __webpack_require__("07fa"); // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare -- NaN check if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) { if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; module.exports = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod(false) }; /***/ }), /***/ "50c4": /***/ (function(module, exports, __webpack_require__) { var toIntegerOrInfinity = __webpack_require__("5926"); var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength module.exports = function (argument) { return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; /***/ }), /***/ "5692": /***/ (function(module, exports, __webpack_require__) { var IS_PURE = __webpack_require__("c430"); var store = __webpack_require__("c6cd"); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.19.1', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2021 Denis Pushkarev (zloirock.ru)' }); /***/ }), /***/ "56ef": /***/ (function(module, exports, __webpack_require__) { var getBuiltIn = __webpack_require__("d066"); var uncurryThis = __webpack_require__("e330"); var getOwnPropertyNamesModule = __webpack_require__("241c"); var getOwnPropertySymbolsModule = __webpack_require__("7418"); var anObject = __webpack_require__("825a"); var concat = uncurryThis([].concat); // all object keys, includes non-enumerable and symbols module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = getOwnPropertyNamesModule.f(anObject(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; }; /***/ }), /***/ "5926": /***/ (function(module, exports) { var ceil = Math.ceil; var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity module.exports = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- safe return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number); }; /***/ }), /***/ "59ed": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var tryToString = __webpack_require__("0d51"); var TypeError = global.TypeError; // `Assert: IsCallable(argument) is true` module.exports = function (argument) { if (isCallable(argument)) return argument; throw TypeError(tryToString(argument) + ' is not a function'); }; /***/ }), /***/ "5aa5": /***/ (function(module, exports) { /* * JQuery zTree exHideNodes * v3.5.48 * http://treejs.cn/ * * Copyright (c) 2010 Hunter.z * * Licensed same as jquery - MIT License * http://www.opensource.org/licenses/mit-license.php * * Date: 2020-11-21 */ (function ($) { var _setting = { data: { key: { isHidden: "isHidden" } } }; //default init node of exLib var _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { var isHidden = data.isHidden(setting, n); data.isHidden(setting, n, isHidden); data.initHideForExCheck(setting, n); }, //add dom for check _beforeA = function (setting, node, html) { }, //update zTreeObj, add method of exLib _zTreeTools = function (setting, zTreeTools) { zTreeTools.showNodes = function (nodes, options) { view.showNodes(setting, nodes, options); } zTreeTools.showNode = function (node, options) { if (!node) { return; } view.showNodes(setting, [node], options); } zTreeTools.hideNodes = function (nodes, options) { view.hideNodes(setting, nodes, options); } zTreeTools.hideNode = function (node, options) { if (!node) { return; } view.hideNodes(setting, [node], options); } var _checkNode = zTreeTools.checkNode; if (_checkNode) { zTreeTools.checkNode = function (node, checked, checkTypeFlag, callbackFlag) { if (!!node && !!data.isHidden(setting, node)) { return; } _checkNode.apply(zTreeTools, arguments); } } }, //method of operate data _data = { initHideForExCheck: function (setting, n) { var isHidden = data.isHidden(setting, n); if (isHidden && setting.check && setting.check.enable) { if (typeof n._nocheck == "undefined") { n._nocheck = !!n.nocheck n.nocheck = true; } n.check_Child_State = -1; if (view.repairParentChkClassWithSelf) { view.repairParentChkClassWithSelf(setting, n); } } }, initShowForExCheck: function (setting, n) { var isHidden = data.isHidden(setting, n); if (!isHidden && setting.check && setting.check.enable) { if (typeof n._nocheck != "undefined") { n.nocheck = n._nocheck; delete n._nocheck; } if (view.setChkClass) { var checkObj = $$(n, consts.id.CHECK, setting); view.setChkClass(setting, checkObj, n); } if (view.repairParentChkClassWithSelf) { view.repairParentChkClassWithSelf(setting, n); } } } }, //method of operate ztree dom _view = { clearOldFirstNode: function (setting, node) { var n = node.getNextNode(); while (!!n) { if (n.isFirstNode) { n.isFirstNode = false; view.setNodeLineIcos(setting, n); break; } if (n.isLastNode) { break; } n = n.getNextNode(); } }, clearOldLastNode: function (setting, node, openFlag) { var n = node.getPreNode(); while (!!n) { if (n.isLastNode) { n.isLastNode = false; if (openFlag) { view.setNodeLineIcos(setting, n); } break; } if (n.isFirstNode) { break; } n = n.getPreNode(); } }, makeDOMNodeMainBefore: function (html, setting, node) { var isHidden = data.isHidden(setting, node); html.push("<li ", (isHidden ? "style='display:none;' " : ""), "id='", node.tId, "' class='", consts.className.LEVEL, node.level, "' tabindex='0' hidefocus='true' treenode>"); }, showNode: function (setting, node, options) { data.isHidden(setting, node, false); data.initShowForExCheck(setting, node); $$(node, setting).show(); }, showNodes: function (setting, nodes, options) { if (!nodes || nodes.length == 0) { return; } var pList = {}, i, j; for (i = 0, j = nodes.length; i < j; i++) { var n = nodes[i]; if (!pList[n.parentTId]) { var pn = n.getParentNode(); pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode(); } view.showNode(setting, n, options); } for (var tId in pList) { var children = data.nodeChildren(setting, pList[tId]); view.setFirstNodeForShow(setting, children); view.setLastNodeForShow(setting, children); } }, hideNode: function (setting, node, options) { data.isHidden(setting, node, true); node.isFirstNode = false; node.isLastNode = false; data.initHideForExCheck(setting, node); view.cancelPreSelectedNode(setting, node); $$(node, setting).hide(); }, hideNodes: function (setting, nodes, options) { if (!nodes || nodes.length == 0) { return; } var pList = {}, i, j; for (i = 0, j = nodes.length; i < j; i++) { var n = nodes[i]; if ((n.isFirstNode || n.isLastNode) && !pList[n.parentTId]) { var pn = n.getParentNode(); pList[n.parentTId] = (pn === null) ? data.getRoot(setting) : n.getParentNode(); } view.hideNode(setting, n, options); } for (var tId in pList) { var children = data.nodeChildren(setting, pList[tId]); view.setFirstNodeForHide(setting, children); view.setLastNodeForHide(setting, children); } }, setFirstNode: function (setting, parentNode) { var children = data.nodeChildren(setting, parentNode); var isHidden = data.isHidden(setting, children[0], false); if (children.length > 0 && !isHidden) { children[0].isFirstNode = true; } else if (children.length > 0) { view.setFirstNodeForHide(setting, children); } }, setLastNode: function (setting, parentNode) { var children = data.nodeChildren(setting, parentNode); var isHidden = data.isHidden(setting, children[0]); if (children.length > 0 && !isHidden) { children[children.length - 1].isLastNode = true; } else if (children.length > 0) { view.setLastNodeForHide(setting, children); } }, setFirstNodeForHide: function (setting, nodes) { var n, i, j; for (i = 0, j = nodes.length; i < j; i++) { n = nodes[i]; if (n.isFirstNode) { break; } var isHidden = data.isHidden(setting, n); if (!isHidden && !n.isFirstNode) { n.isFirstNode = true; view.setNodeLineIcos(setting, n); break; } else { n = null; } } return n; }, setFirstNodeForShow: function (setting, nodes) { var n, i, j, first, old; for (i = 0, j = nodes.length; i < j; i++) { n = nodes[i]; var isHidden = data.isHidden(setting, n); if (!first && !isHidden && n.isFirstNode) { first = n; break; } else if (!first && !isHidden && !n.isFirstNode) { n.isFirstNode = true; first = n; view.setNodeLineIcos(setting, n); } else if (first && n.isFirstNode) { n.isFirstNode = false; old = n; view.setNodeLineIcos(setting, n); break; } else { n = null; } } return {"new": first, "old": old}; }, setLastNodeForHide: function (setting, nodes) { var n, i; for (i = nodes.length - 1; i >= 0; i--) { n = nodes[i]; if (n.isLastNode) { break; } var isHidden = data.isHidden(setting, n); if (!isHidden && !n.isLastNode) { n.isLastNode = true; view.setNodeLineIcos(setting, n); break; } else { n = null; } } return n; }, setLastNodeForShow: function (setting, nodes) { var n, i, j, last, old; for (i = nodes.length - 1; i >= 0; i--) { n = nodes[i]; var isHidden = data.isHidden(setting, n); if (!last && !isHidden && n.isLastNode) { last = n; break; } else if (!last && !isHidden && !n.isLastNode) { n.isLastNode = true; last = n; view.setNodeLineIcos(setting, n); } else if (last && n.isLastNode) { n.isLastNode = false; old = n; view.setNodeLineIcos(setting, n); break; } else { n = null; } } return {"new": last, "old": old}; } }, _z = { view: _view, data: _data }; $.extend(true, $.fn.zTree._z, _z); var zt = $.fn.zTree, tools = zt._z.tools, consts = zt.consts, view = zt._z.view, data = zt._z.data, event = zt._z.event, $$ = tools.$; data.isHidden = function (setting, node, newIsHidden) { if (!node) { return false; } var key = setting.data.key.isHidden; if (typeof newIsHidden !== 'undefined') { if (typeof newIsHidden === "string") { newIsHidden = tools.eqs(newIsHidden, "true"); } newIsHidden = !!newIsHidden; node[key] = newIsHidden; } else if (typeof node[key] == "string"){ node[key] = tools.eqs(node[key], "true"); } else { node[key] = !!node[key]; } return node[key]; }; data.exSetting(_setting); data.addInitNode(_initNode); data.addBeforeA(_beforeA); data.addZTreeTools(_zTreeTools); // Override method in core var _dInitNode = data.initNode; data.initNode = function (setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) { var tmpPNode = (parentNode) ? parentNode : data.getRoot(setting), children = tmpPNode[setting.data.key.children]; data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children); data.tmpHideLastNode = view.setLastNodeForHide(setting, children); if (openFlag) { view.setNodeLineIcos(setting, data.tmpHideFirstNode); view.setNodeLineIcos(setting, data.tmpHideLastNode); } isFirstNode = (data.tmpHideFirstNode === node); isLastNode = (data.tmpHideLastNode === node); if (_dInitNode) _dInitNode.apply(data, arguments); if (openFlag && isLastNode) { view.clearOldLastNode(setting, node, openFlag); } }; var _makeChkFlag = data.makeChkFlag; if (!!_makeChkFlag) { data.makeChkFlag = function (setting, node) { if (!!node && !!data.isHidden(setting, node)) { return; } _makeChkFlag.apply(data, arguments); } } var _getTreeCheckedNodes = data.getTreeCheckedNodes; if (!!_getTreeCheckedNodes) { data.getTreeCheckedNodes = function (setting, nodes, checked, results) { if (!!nodes && nodes.length > 0) { var p = nodes[0].getParentNode(); if (!!p && !!data.isHidden(setting, p)) { return []; } } return _getTreeCheckedNodes.apply(data, arguments); } } var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes; if (!!_getTreeChangeCheckedNodes) { data.getTreeChangeCheckedNodes = function (setting, nodes, results) { if (!!nodes && nodes.length > 0) { var p = nodes[0].getParentNode(); if (!!p && !!data.isHidden(setting, p)) { return []; } } return _getTreeChangeCheckedNodes.apply(data, arguments); } } var _expandCollapseSonNode = view.expandCollapseSonNode; if (!!_expandCollapseSonNode) { view.expandCollapseSonNode = function (setting, node, expandFlag, animateFlag, callback) { if (!!node && !!data.isHidden(setting, node)) { return; } _expandCollapseSonNode.apply(view, arguments); } } var _setSonNodeCheckBox = view.setSonNodeCheckBox; if (!!_setSonNodeCheckBox) { view.setSonNodeCheckBox = function (setting, node, value, srcNode) { if (!!node && !!data.isHidden(setting, node)) { return; } _setSonNodeCheckBox.apply(view, arguments); } } var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf; if (!!_repairParentChkClassWithSelf) { view.repairParentChkClassWithSelf = function (setting, node) { if (!!node && !!data.isHidden(setting, node)) { return; } _repairParentChkClassWithSelf.apply(view, arguments); } } })(jQuery); /***/ }), /***/ "5c6c": /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "5e77": /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__("83ab"); var hasOwn = __webpack_require__("1a2d"); var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); module.exports = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; /***/ }), /***/ "65f0": /***/ (function(module, exports, __webpack_require__) { var arraySpeciesConstructor = __webpack_require__("0b42"); // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; /***/ }), /***/ "68ee": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var fails = __webpack_require__("d039"); var isCallable = __webpack_require__("1626"); var classof = __webpack_require__("f5df"); var getBuiltIn = __webpack_require__("d066"); var inspectSource = __webpack_require__("8925"); var noop = function () { /* empty */ }; var empty = []; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec = uncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); var isConstructorModern = function (argument) { if (!isCallable(argument)) return false; try { construct(noop, empty, argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function (argument) { if (!isCallable(argument)) return false; switch (classof(argument)) { case 'AsyncFunction': case 'GeneratorFunction': case 'AsyncGeneratorFunction': return false; // we can't check .prototype since constructors produced by .bind haven't it } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument)); }; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor module.exports = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; /***/ }), /***/ "69f3": /***/ (function(module, exports, __webpack_require__) { var NATIVE_WEAK_MAP = __webpack_require__("7f9a"); var global = __webpack_require__("da84"); var uncurryThis = __webpack_require__("e330"); var isObject = __webpack_require__("861d"); var createNonEnumerableProperty = __webpack_require__("9112"); var hasOwn = __webpack_require__("1a2d"); var shared = __webpack_require__("c6cd"); var sharedKey = __webpack_require__("f772"); var hiddenKeys = __webpack_require__("d012"); var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError = global.TypeError; var WeakMap = global.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared.state) { var store = shared.state || (shared.state = new WeakMap()); var wmget = uncurryThis(store.get); var wmhas = uncurryThis(store.has); var wmset = uncurryThis(store.set); set = function (it, metadata) { if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset(store, it, metadata); return metadata; }; get = function (it) { return wmget(store, it) || {}; }; has = function (it) { return wmhas(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn(it, STATE); }; } module.exports = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; /***/ }), /***/ "6eeb": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var hasOwn = __webpack_require__("1a2d"); var createNonEnumerableProperty = __webpack_require__("9112"); var setGlobal = __webpack_require__("ce4e"); var inspectSource = __webpack_require__("8925"); var InternalStateModule = __webpack_require__("69f3"); var CONFIGURABLE_FUNCTION_NAME = __webpack_require__("5e77").CONFIGURABLE; var getInternalState = InternalStateModule.get; var enforceInternalState = InternalStateModule.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; var name = options && options.name !== undefined ? options.name : key; var state; if (isCallable(value)) { if (String(name).slice(0, 7) === 'Symbol(') { name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; } if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { createNonEnumerableProperty(value, 'name', name); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); } } if (O === global) { if (simple) O[key] = value; else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value; else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }); /***/ }), /***/ "7418": /***/ (function(module, exports) { // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ "7839": /***/ (function(module, exports) { // IE8- don't enum bug keys module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; /***/ }), /***/ "7b0b": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var requireObjectCoercible = __webpack_require__("1d80"); var Object = global.Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject module.exports = function (argument) { return Object(requireObjectCoercible(argument)); }; /***/ }), /***/ "7f9a": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var inspectSource = __webpack_require__("8925"); var WeakMap = global.WeakMap; module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap)); /***/ }), /***/ "825a": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isObject = __webpack_require__("861d"); var String = global.String; var TypeError = global.TypeError; // `Assert: Type(argument) is Object` module.exports = function (argument) { if (isObject(argument)) return argument; throw TypeError(String(argument) + ' is not an object'); }; /***/ }), /***/ "83ab": /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__("d039"); // Detect IE8's incomplete defineProperty implementation module.exports = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); /***/ }), /***/ "8418": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toPropertyKey = __webpack_require__("a04b"); var definePropertyModule = __webpack_require__("9bf2"); var createPropertyDescriptor = __webpack_require__("5c6c"); module.exports = function (object, key, value) { var propertyKey = toPropertyKey(key); if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); else object[propertyKey] = value; }; /***/ }), /***/ "861d": /***/ (function(module, exports, __webpack_require__) { var isCallable = __webpack_require__("1626"); module.exports = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; /***/ }), /***/ "8875": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller // MIT license // source: https://github.com/amiller-gh/currentScript-polyfill // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505 (function (root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }(typeof self !== 'undefined' ? self : this, function () { function getCurrentScript () { var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript') // for chrome if (!descriptor && 'currentScript' in document && document.currentScript) { return document.currentScript } // for other browsers with native support for currentScript if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) { return document.currentScript } // IE 8-10 support script readyState // IE 11+ & Firefox support stack trace try { throw new Error(); } catch (err) { // Find the second match for the "at" string to get file src url from stack. var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig, ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig, stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack), scriptLocation = (stackDetails && stackDetails[1]) || false, line = (stackDetails && stackDetails[2]) || false, currentLocation = document.location.href.replace(document.location.hash, ''), pageSource, inlineScriptSourceRegExp, inlineScriptSource, scripts = document.getElementsByTagName('script'); // Live NodeList collection if (scriptLocation === currentLocation) { pageSource = document.documentElement.outerHTML; inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i'); inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim(); } for (var i = 0; i < scripts.length; i++) { // If ready state is interactive, return the script tag if (scripts[i].readyState === 'interactive') { return scripts[i]; } // If src matches, return the script tag if (scripts[i].src === scriptLocation) { return scripts[i]; } // If inline source matches, return the script tag if ( scriptLocation === currentLocation && scripts[i].innerHTML && scripts[i].innerHTML.trim() === inlineScriptSource ) { return scripts[i]; } } // If no match, return null return null; } }; return getCurrentScript })); /***/ }), /***/ "8925": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var isCallable = __webpack_require__("1626"); var store = __webpack_require__("c6cd"); var functionToString = uncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(store.inspectSource)) { store.inspectSource = function (it) { return functionToString(it); }; } module.exports = store.inspectSource; /***/ }), /***/ "8f68": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ztree_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ab17"); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ztree_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ztree_vue_vue_type_style_index_1_lang_css___WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ /***/ }), /***/ "90e3": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var id = 0; var postfix = Math.random(); var toString = uncurryThis(1.0.toString); module.exports = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; /***/ }), /***/ "9112": /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__("83ab"); var definePropertyModule = __webpack_require__("9bf2"); var createPropertyDescriptor = __webpack_require__("5c6c"); module.exports = DESCRIPTORS ? function (object, key, value) { return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ "94ca": /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__("d039"); var isCallable = __webpack_require__("1626"); var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; module.exports = isForced; /***/ }), /***/ "95eb": /***/ (function(module, exports, __webpack_require__) { // Imports var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb"); exports = ___CSS_LOADER_API_IMPORT___(false); // Module exports.push([module.i, "ul.ztree.zTreeDragUL{margin:0;padding:0;position:absolute;overflow:hidden;background-color:#dedede;border:1px dotted #4fcbf0;border-radius:4px;opacity:.7}.zTreeMask{position:absolute;z-index:10000;opacity:0;background-color:#cfcfcf}", ""]); // Exports module.exports = exports; /***/ }), /***/ "99af": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var global = __webpack_require__("da84"); var fails = __webpack_require__("d039"); var isArray = __webpack_require__("e8b5"); var isObject = __webpack_require__("861d"); var toObject = __webpack_require__("7b0b"); var lengthOfArrayLike = __webpack_require__("07fa"); var createProperty = __webpack_require__("8418"); var arraySpeciesCreate = __webpack_require__("65f0"); var arrayMethodHasSpeciesSupport = __webpack_require__("1dde"); var wellKnownSymbol = __webpack_require__("b622"); var V8_VERSION = __webpack_require__("2d00"); var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; var TypeError = global.TypeError; // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species $({ target: 'Array', proto: true, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); createProperty(A, n++, E); } } A.length = n; return A; } }); /***/ }), /***/ "9bf2": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var DESCRIPTORS = __webpack_require__("83ab"); var IE8_DOM_DEFINE = __webpack_require__("0cfb"); var anObject = __webpack_require__("825a"); var toPropertyKey = __webpack_require__("a04b"); var TypeError = global.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ "a04b": /***/ (function(module, exports, __webpack_require__) { var toPrimitive = __webpack_require__("c04e"); var isSymbol = __webpack_require__("d9b5"); // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey module.exports = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; /***/ }), /***/ "a632": /***/ (function(module, exports) { /* * JQuery zTree core * v3.5.48 * http://treejs.cn/ * * Copyright (c) 2010 Hunter.z * * Licensed same as jquery - MIT License * http://www.opensource.org/licenses/mit-license.php * * Date: 2020-11-21 */ (function ($) { var settings = {}, roots = {}, caches = {}, //default consts of core _consts = { className: { BUTTON: "button", LEVEL: "level", ICO_LOADING: "ico_loading", SWITCH: "switch", NAME: 'node_name' }, event: { NODECREATED: "ztree_nodeCreated", CLICK: "ztree_click", EXPAND: "ztree_expand", COLLAPSE: "ztree_collapse", ASYNC_SUCCESS: "ztree_async_success", ASYNC_ERROR: "ztree_async_error", REMOVE: "ztree_remove", SELECTED: "ztree_selected", UNSELECTED: "ztree_unselected" }, id: { A: "_a", ICON: "_ico", SPAN: "_span", SWITCH: "_switch", UL: "_ul" }, line: { ROOT: "root", ROOTS: "roots", CENTER: "center", BOTTOM: "bottom", NOLINE: "noline", LINE: "line" }, folder: { OPEN: "open", CLOSE: "close", DOCU: "docu" }, node: { CURSELECTED: "curSelectedNode" } }, //default setting of core _setting = { treeId: "", treeObj: null, view: { addDiyDom: null, autoCancelSelected: true, dblClickExpand: true, expandSpeed: "fast", fontCss: {}, nodeClasses: {}, nameIsHTML: false, selectedMulti: true, showIcon: true, showLine: true, showTitle: true, txtSelectedEnable: false }, data: { key: { isParent: "isParent", children: "children", name: "name", title: "", url: "url", icon: "icon" }, render: { name: null, title: null, }, simpleData: { enable: false, idKey: "id", pIdKey: "pId", rootPId: null }, keep: { parent: false, leaf: false } }, async: { enable: false, contentType: "application/x-www-form-urlencoded", type: "post", dataType: "text", headers: {}, xhrFields: {}, url: "", autoParam: [], otherParam: [], dataFilter: null }, callback: { beforeAsync: null, beforeClick: null, beforeDblClick: null, beforeRightClick: null, beforeMouseDown: null, beforeMouseUp: null, beforeExpand: null, beforeCollapse: null, beforeRemove: null, onAsyncError: null, onAsyncSuccess: null, onNodeCreated: null, onClick: null, onDblClick: null, onRightClick: null, onMouseDown: null, onMouseUp: null, onExpand: null, onCollapse: null, onRemove: null } }, //default root of core //zTree use root to save full data _initRoot = function (setting) { var r = data.getRoot(setting); if (!r) { r = {}; data.setRoot(setting, r); } data.nodeChildren(setting, r, []); r.expandTriggerFlag = false; r.curSelectedList = []; r.noSelection = true; r.createdNodes = []; r.zId = 0; r._ver = (new Date()).getTime(); }, //default cache of core _initCache = function (setting) { var c = data.getCache(setting); if (!c) { c = {}; data.setCache(setting, c); } c.nodes = []; c.doms = []; }, //default bindEvent of core _bindEvent = function (setting) { var o = setting.treeObj, c = consts.event; o.bind(c.NODECREATED, function (event, treeId, node) { tools.apply(setting.callback.onNodeCreated, [event, treeId, node]); }); o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) { tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]); }); o.bind(c.EXPAND, function (event, treeId, node) { tools.apply(setting.callback.onExpand, [event, treeId, node]); }); o.bind(c.COLLAPSE, function (event, treeId, node) { tools.apply(setting.callback.onCollapse, [event, treeId, node]); }); o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) { tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]); }); o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) { tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]); }); o.bind(c.REMOVE, function (event, treeId, treeNode) { tools.apply(setting.callback.onRemove, [event, treeId, treeNode]); }); o.bind(c.SELECTED, function (event, treeId, node) { tools.apply(setting.callback.onSelected, [treeId, node]); }); o.bind(c.UNSELECTED, function (event, treeId, node) { tools.apply(setting.callback.onUnSelected, [treeId, node]); }); }, _unbindEvent = function (setting) { var o = setting.treeObj, c = consts.event; o.unbind(c.NODECREATED) .unbind(c.CLICK) .unbind(c.EXPAND) .unbind(c.COLLAPSE) .unbind(c.ASYNC_SUCCESS) .unbind(c.ASYNC_ERROR) .unbind(c.REMOVE) .unbind(c.SELECTED) .unbind(c.UNSELECTED); }, //default event proxy of core _eventProxy = function (event) { var target = event.target, setting = data.getSetting(event.data.treeId), tId = "", node = null, nodeEventType = "", treeEventType = "", nodeEventCallback = null, treeEventCallback = null, tmp = null; if (tools.eqs(event.type, "mousedown")) { treeEventType = "mousedown"; } else if (tools.eqs(event.type, "mouseup")) { treeEventType = "mouseup"; } else if (tools.eqs(event.type, "contextmenu")) { treeEventType = "contextmenu"; } else if (tools.eqs(event.type, "click")) { if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.SWITCH) !== null) { tId = tools.getNodeMainDom(target).id; nodeEventType = "switchNode"; } else { tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); if (tmp) { tId = tools.getNodeMainDom(tmp).id; nodeEventType = "clickNode"; } } } else if (tools.eqs(event.type, "dblclick")) { treeEventType = "dblclick"; tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); if (tmp) { tId = tools.getNodeMainDom(tmp).id; nodeEventType = "switchNode"; } } if (treeEventType.length > 0 && tId.length == 0) { tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); if (tmp) { tId = tools.getNodeMainDom(tmp).id; } } // event to node if (tId.length > 0) { node = data.getNodeCache(setting, tId); switch (nodeEventType) { case "switchNode" : var isParent = data.nodeIsParent(setting, node); if (!isParent) { nodeEventType = ""; } else if (tools.eqs(event.type, "click") || (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) { nodeEventCallback = handler.onSwitchNode; } else { nodeEventType = ""; } break; case "clickNode" : nodeEventCallback = handler.onClickNode; break; } } // event to zTree switch (treeEventType) { case "mousedown" : treeEventCallback = handler.onZTreeMousedown; break; case "mouseup" : treeEventCallback = handler.onZTreeMouseup; break; case "dblclick" : treeEventCallback = handler.onZTreeDblclick; break; case "contextmenu" : treeEventCallback = handler.onZTreeContextmenu; break; } var proxyResult = { stop: false, node: node, nodeEventType: nodeEventType, nodeEventCallback: nodeEventCallback, treeEventType: treeEventType, treeEventCallback: treeEventCallback }; return proxyResult }, //default init node of core _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { if (!n) return; var r = data.getRoot(setting), children = data.nodeChildren(setting, n); n.level = level; n.tId = setting.treeId + "_" + (++r.zId); n.parentTId = parentNode ? parentNode.tId : null; n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; var isParent = data.nodeIsParent(setting, n); if (tools.isArray(children)) { data.nodeIsParent(setting, n, true); n.zAsync = true; } else { isParent = data.nodeIsParent(setting, n, isParent); n.open = (isParent && !setting.async.enable) ? n.open : false; n.zAsync = !isParent; } n.isFirstNode = isFirstNode; n.isLastNode = isLastNode; n.getParentNode = function () { return data.getNodeCache(setting, n.parentTId); }; n.getPreNode = function () { return data.getPreNode(setting, n); }; n.getNextNode = function () { return data.getNextNode(setting, n); }; n.getIndex = function () { return data.getNodeIndex(setting, n); }; n.getPath = function () { return data.getNodePath(setting, n); }; n.isAjaxing = false; data.fixPIdKeyValue(setting, n); }, _init = { bind: [_bindEvent], unbind: [_unbindEvent], caches: [_initCache], nodes: [_initNode], proxys: [_eventProxy], roots: [_initRoot], beforeA: [], afterA: [], innerBeforeA: [], innerAfterA: [], zTreeTools: [] }, //method of operate data data = { addNodeCache: function (setting, node) { data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node; }, getNodeCacheId: function (tId) { return tId.substring(tId.lastIndexOf("_") + 1); }, addAfterA: function (afterA) { _init.afterA.push(afterA); }, addBeforeA: function (beforeA) { _init.beforeA.push(beforeA); }, addInnerAfterA: function (innerAfterA) { _init.innerAfterA.push(innerAfterA); }, addInnerBeforeA: function (innerBeforeA) { _init.innerBeforeA.push(innerBeforeA); }, addInitBind: function (bindEvent) { _init.bind.push(bindEvent); }, addInitUnBind: function (unbindEvent) { _init.unbind.push(unbindEvent); }, addInitCache: function (initCache) { _init.caches.push(initCache); }, addInitNode: function (initNode) { _init.nodes.push(initNode); }, addInitProxy: function (initProxy, isFirst) { if (!!isFirst) { _init.proxys.splice(0, 0, initProxy); } else { _init.proxys.push(initProxy); } }, addInitRoot: function (initRoot) { _init.roots.push(initRoot); }, addNodesData: function (setting, parentNode, index, nodes) { var children = data.nodeChildren(setting, parentNode), params; if (!children) { children = data.nodeChildren(setting, parentNode, []); index = -1; } else if (index >= children.length) { index = -1; } if (children.length > 0 && index === 0) { children[0].isFirstNode = false; view.setNodeLineIcos(setting, children[0]); } else if (children.length > 0 && index < 0) { children[children.length - 1].isLastNode = false; view.setNodeLineIcos(setting, children[children.length - 1]); } data.nodeIsParent(setting, parentNode, true); if (index < 0) { data.nodeChildren(setting, parentNode, children.concat(nodes)); } else { params = [index, 0].concat(nodes); children.splice.apply(children, params); } }, addSelectedNode: function (setting, node) { var root = data.getRoot(setting); if (!data.isSelectedNode(setting, node)) { root.curSelectedList.push(node); } }, addCreatedNode: function (setting, node) { if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { var root = data.getRoot(setting); root.createdNodes.push(node); } }, addZTreeTools: function (zTreeTools) { _init.zTreeTools.push(zTreeTools); }, exSetting: function (s) { $.extend(true, _setting, s); }, fixPIdKeyValue: function (setting, node) { if (setting.data.simpleData.enable) { node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId; } }, getAfterA: function (setting, node, array) { for (var i = 0, j = _init.afterA.length; i < j; i++) { _init.afterA[i].apply(this, arguments); } }, getBeforeA: function (setting, node, array) { for (var i = 0, j = _init.beforeA.length; i < j; i++) { _init.beforeA[i].apply(this, arguments); } }, getInnerAfterA: function (setting, node, array) { for (var i = 0, j = _init.innerAfterA.length; i < j; i++) { _init.innerAfterA[i].apply(this, arguments); } }, getInnerBeforeA: function (setting, node, array) { for (var i = 0, j = _init.innerBeforeA.length; i < j; i++) { _init.innerBeforeA[i].apply(this, arguments); } }, getCache: function (setting) { return caches[setting.treeId]; }, getNodeIndex: function (setting, node) { if (!node) return null; var p = node.parentTId ? node.getParentNode() : data.getRoot(setting), children = data.nodeChildren(setting, p); for (var i = 0, l = children.length - 1; i <= l; i++) { if (children[i] === node) { return i; } } return -1; }, getNextNode: function (setting, node) { if (!node) return null; var p = node.parentTId ? node.getParentNode() : data.getRoot(setting), children = data.nodeChildren(setting, p); for (var i = 0, l = children.length - 1; i <= l; i++) { if (children[i] === node) { return (i == l ? null : children[i + 1]); } } return null; }, getNodeByParam: function (setting, nodes, key, value) { if (!nodes || !key) return null; for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; if (node[key] == value) { return nodes[i]; } var children = data.nodeChildren(setting, node); var tmp = data.getNodeByParam(setting, children, key, value); if (tmp) return tmp; } return null; }, getNodeCache: function (setting, tId) { if (!tId) return null; var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)]; return n ? n : null; }, getNodePath: function (setting, node) { if (!node) return null; var path; if (node.parentTId) { path = node.getParentNode().getPath(); } else { path = []; } if (path) { path.push(node); } return path; }, getNodes: function (setting) { return data.nodeChildren(setting, data.getRoot(setting)); }, getNodesByParam: function (setting, nodes, key, value) { if (!nodes || !key) return []; var result = []; for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; if (node[key] == value) { result.push(node); } var children = data.nodeChildren(setting, node); result = result.concat(data.getNodesByParam(setting, children, key, value)); } return result; }, getNodesByParamFuzzy: function (setting, nodes, key, value) { if (!nodes || !key) return []; var result = []; value = value.toLowerCase(); for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; if (typeof node[key] == "string" && nodes[i][key].toLowerCase().indexOf(value) > -1) { result.push(node); } var children = data.nodeChildren(setting, node); result = result.concat(data.getNodesByParamFuzzy(setting, children, key, value)); } return result; }, getNodesByFilter: function (setting, nodes, filter, isSingle, invokeParam) { if (!nodes) return (isSingle ? null : []); var result = isSingle ? null : []; for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; if (tools.apply(filter, [node, invokeParam], false)) { if (isSingle) { return node; } result.push(node); } var children = data.nodeChildren(setting, node); var tmpResult = data.getNodesByFilter(setting, children, filter, isSingle, invokeParam); if (isSingle && !!tmpResult) { return tmpResult; } result = isSingle ? tmpResult : result.concat(tmpResult); } return result; }, getPreNode: function (setting, node) { if (!node) return null; var p = node.parentTId ? node.getParentNode() : data.getRoot(setting), children = data.nodeChildren(setting, p); for (var i = 0, l = children.length; i < l; i++) { if (children[i] === node) { return (i == 0 ? null : children[i - 1]); } } return null; }, getRoot: function (setting) { return setting ? roots[setting.treeId] : null; }, getRoots: function () { return roots; }, getSetting: function (treeId) { return settings[treeId]; }, getSettings: function () { return settings; }, getZTreeTools: function (treeId) { var r = this.getRoot(this.getSetting(treeId)); return r ? r.treeTools : null; }, initCache: function (setting) { for (var i = 0, j = _init.caches.length; i < j; i++) { _init.caches[i].apply(this, arguments); } }, initNode: function (setting, level, node, parentNode, preNode, nextNode) { for (var i = 0, j = _init.nodes.length; i < j; i++) { _init.nodes[i].apply(this, arguments); } }, initRoot: function (setting) { for (var i = 0, j = _init.roots.length; i < j; i++) { _init.roots[i].apply(this, arguments); } }, isSelectedNode: function (setting, node) { var root = data.getRoot(setting); for (var i = 0, j = root.curSelectedList.length; i < j; i++) { if (node === root.curSelectedList[i]) return true; } return false; }, nodeChildren: function (setting, node, newChildren) { if (!node) { return null; } var key = setting.data.key.children; if (typeof newChildren !== 'undefined') { node[key] = newChildren; } return node[key]; }, nodeIsParent: function (setting, node, newIsParent) { if (!node) { return false; } var key = setting.data.key.isParent; if (typeof newIsParent !== 'undefined') { if (typeof newIsParent === "string") { newIsParent = tools.eqs(newIsParent, "true"); } newIsParent = !!newIsParent; node[key] = newIsParent; } else if (typeof node[key] == "string"){ node[key] = tools.eqs(node[key], "true"); } else { node[key] = !!node[key]; } return node[key]; }, nodeName: function (setting, node, newName) { var key = setting.data.key.name; if (typeof newName !== 'undefined') { node[key] = newName; } var rawName = "" + node[key]; if(typeof setting.data.render.name === 'function') { return setting.data.render.name.call(this,rawName,node); } return rawName; }, nodeTitle: function (setting, node) { var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title; var rawTitle = "" + node[t]; if(typeof setting.data.render.title === 'function') { return setting.data.render.title.call(this,rawTitle,node); } return rawTitle; }, removeNodeCache: function (setting, node) { var children = data.nodeChildren(setting, node); if (children) { for (var i = 0, l = children.length; i < l; i++) { data.removeNodeCache(setting, children[i]); } } data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null; }, removeSelectedNode: function (setting, node) { var root = data.getRoot(setting); for (var i = 0, j = root.curSelectedList.length; i < j; i++) { if (node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) { root.curSelectedList.splice(i, 1); setting.treeObj.trigger(consts.event.UNSELECTED, [setting.treeId, node]); i--; j--; } } }, setCache: function (setting, cache) { caches[setting.treeId] = cache; }, setRoot: function (setting, root) { roots[setting.treeId] = root; }, setZTreeTools: function (setting, zTreeTools) { for (var i = 0, j = _init.zTreeTools.length; i < j; i++) { _init.zTreeTools[i].apply(this, arguments); } }, transformToArrayFormat: function (setting, nodes) { if (!nodes) return []; var r = []; if (tools.isArray(nodes)) { for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; _do(node); } } else { _do(nodes); } return r; function _do(_node) { r.push(_node); var children = data.nodeChildren(setting, _node); if (children) { r = r.concat(data.transformToArrayFormat(setting, children)); } } }, transformTozTreeFormat: function (setting, sNodes) { var i, l, key = setting.data.simpleData.idKey, parentKey = setting.data.simpleData.pIdKey; if (!key || key == "" || !sNodes) return []; if (tools.isArray(sNodes)) { var r = []; var tmpMap = {}; for (i = 0, l = sNodes.length; i < l; i++) { tmpMap[sNodes[i][key]] = sNodes[i]; } for (i = 0, l = sNodes.length; i < l; i++) { var p = tmpMap[sNodes[i][parentKey]]; if (p && sNodes[i][key] != sNodes[i][parentKey]) { var children = data.nodeChildren(setting, p); if (!children) { children = data.nodeChildren(setting, p, []); } children.push(sNodes[i]); } else { r.push(sNodes[i]); } } return r; } else { return [sNodes]; } } }, //method of event proxy event = { bindEvent: function (setting) { for (var i = 0, j = _init.bind.length; i < j; i++) { _init.bind[i].apply(this, arguments); } }, unbindEvent: function (setting) { for (var i = 0, j = _init.unbind.length; i < j; i++) { _init.unbind[i].apply(this, arguments); } }, bindTree: function (setting) { var eventParam = { treeId: setting.treeId }, o = setting.treeObj; if (!setting.view.txtSelectedEnable) { // for can't select text o.bind('selectstart', handler.onSelectStart).css({ "-moz-user-select": "-moz-none" }); } o.bind('click', eventParam, event.proxy); o.bind('dblclick', eventParam, event.proxy); o.bind('mouseover', eventParam, event.proxy); o.bind('mouseout', eventParam, event.proxy); o.bind('mousedown', eventParam, event.proxy); o.bind('mouseup', eventParam, event.proxy); o.bind('contextmenu', eventParam, event.proxy); }, unbindTree: function (setting) { var o = setting.treeObj; o.unbind('selectstart', handler.onSelectStart) .unbind('click', event.proxy) .unbind('dblclick', event.proxy) .unbind('mouseover', event.proxy) .unbind('mouseout', event.proxy) .unbind('mousedown', event.proxy) .unbind('mouseup', event.proxy) .unbind('contextmenu', event.proxy); }, doProxy: function (e) { var results = []; for (var i = 0, j = _init.proxys.length; i < j; i++) { var proxyResult = _init.proxys[i].apply(this, arguments); results.push(proxyResult); if (proxyResult.stop) { break; } } return results; }, proxy: function (e) { var setting = data.getSetting(e.data.treeId); if (!tools.uCanDo(setting, e)) return true; var results = event.doProxy(e), r = true, x = false; for (var i = 0, l = results.length; i < l; i++) { var proxyResult = results[i]; if (proxyResult.nodeEventCallback) { x = true; r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; } if (proxyResult.treeEventCallback) { x = true; r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r; } } return r; } }, //method of event handler handler = { onSwitchNode: function (event, node) { var setting = data.getSetting(event.data.treeId); if (node.open) { if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true; data.getRoot(setting).expandTriggerFlag = true; view.switchNode(setting, node); } else { if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true; data.getRoot(setting).expandTriggerFlag = true; view.switchNode(setting, node); } return true; }, onClickNode: function (event, node) { var setting = data.getSetting(event.data.treeId), clickFlag = ((setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1; if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true; if (clickFlag === 0) { view.cancelPreSelectedNode(setting, node); } else { view.selectNode(setting, node, clickFlag === 2); } setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]); return true; }, onZTreeMousedown: function (event, node) { var setting = data.getSetting(event.data.treeId); if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) { tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]); } return true; }, onZTreeMouseup: function (event, node) { var setting = data.getSetting(event.data.treeId); if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) { tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]); } return true; }, onZTreeDblclick: function (event, node) { var setting = data.getSetting(event.data.treeId); if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) { tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]); } return true; }, onZTreeContextmenu: function (event, node) { var setting = data.getSetting(event.data.treeId); if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) { tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]); } return (typeof setting.callback.onRightClick) != "function"; }, onSelectStart: function (e) { var n = e.originalEvent.srcElement.nodeName.toLowerCase(); return (n === "input" || n === "textarea"); } }, //method of tools for zTree tools = { apply: function (fun, param, defaultValue) { if ((typeof fun) == "function") { return fun.apply(zt, param ? param : []); } return defaultValue; }, canAsync: function (setting, node) { var children = data.nodeChildren(setting, node); var isParent = data.nodeIsParent(setting, node); return (setting.async.enable && node && isParent && !(node.zAsync || (children && children.length > 0))); }, clone: function (obj) { if (obj === null) return null; var o = tools.isArray(obj) ? [] : {}; for (var i in obj) { o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? tools.clone(obj[i]) : obj[i]); } return o; }, eqs: function (str1, str2) { return str1.toLowerCase() === str2.toLowerCase(); }, isArray: function (arr) { return Object.prototype.toString.apply(arr) === "[object Array]"; }, isElement: function (o) { return ( typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2 o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string" ); }, $: function (node, exp, setting) { if (!!exp && typeof exp != "string") { setting = exp; exp = ""; } if (typeof node == "string") { return $(node, setting ? setting.treeObj.get(0).ownerDocument : null); } else { return $("#" + node.tId + exp, setting ? setting.treeObj : null); } }, getMDom: function (setting, curDom, targetExpr) { if (!curDom) return null; while (curDom && curDom.id !== setting.treeId) { for (var i = 0, l = targetExpr.length; curDom.tagName && i < l; i++) { if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) { return curDom; } } curDom = curDom.parentNode; } return null; }, getNodeMainDom: function (target) { return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)); }, isChildOrSelf: function (dom, parentId) { return ($(dom).closest("#" + parentId).length > 0); }, uCanDo: function (setting, e) { return true; } }, //method of operate ztree dom view = { addNodes: function (setting, parentNode, index, newNodes, isSilent) { var isParent = data.nodeIsParent(setting, parentNode); if (setting.data.keep.leaf && parentNode && !isParent) { return; } if (!tools.isArray(newNodes)) { newNodes = [newNodes]; } if (setting.data.simpleData.enable) { newNodes = data.transformTozTreeFormat(setting, newNodes); } if (parentNode) { var target_switchObj = $$(parentNode, consts.id.SWITCH, setting), target_icoObj = $$(parentNode, consts.id.ICON, setting), target_ulObj = $$(parentNode, consts.id.UL, setting); if (!parentNode.open) { view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE); view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE); parentNode.open = false; target_ulObj.css({ "display": "none" }); } data.addNodesData(setting, parentNode, index, newNodes); view.createNodes(setting, parentNode.level + 1, newNodes, parentNode, index); if (!isSilent) { view.expandCollapseParentNode(setting, parentNode, true); } } else { data.addNodesData(setting, data.getRoot(setting), index, newNodes); view.createNodes(setting, 0, newNodes, null, index); } }, appendNodes: function (setting, level, nodes, parentNode, index, initFlag, openFlag) { if (!nodes) return []; var html = []; var tmpPNode = (parentNode) ? parentNode : data.getRoot(setting), tmpPChild = data.nodeChildren(setting, tmpPNode), isFirstNode, isLastNode; if (!tmpPChild || index >= tmpPChild.length - nodes.length) { index = -1; } for (var i = 0, l = nodes.length; i < l; i++) { var node = nodes[i]; if (initFlag) { isFirstNode = ((index === 0 || tmpPChild.length == nodes.length) && (i == 0)); isLastNode = (index < 0 && i == (nodes.length - 1)); data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag); data.addNodeCache(setting, node); } var isParent = data.nodeIsParent(setting, node); var childHtml = []; var children = data.nodeChildren(setting, node); if (children && children.length > 0) { //make child html first, because checkType childHtml = view.appendNodes(setting, level + 1, children, node, -1, initFlag, openFlag && node.open); } if (openFlag) { view.makeDOMNodeMainBefore(html, setting, node); view.makeDOMNodeLine(html, setting, node); data.getBeforeA(setting, node, html); view.makeDOMNodeNameBefore(html, setting, node); data.getInnerBeforeA(setting, node, html); view.makeDOMNodeIcon(html, setting, node); data.getInnerAfterA(setting, node, html); view.makeDOMNodeNameAfter(html, setting, node); data.getAfterA(setting, node, html); if (isParent && node.open) { view.makeUlHtml(setting, node, html, childHtml.join('')); } view.makeDOMNodeMainAfter(html, setting, node); data.addCreatedNode(setting, node); } } return html; }, appendParentULDom: function (setting, node) { var html = [], nObj = $$(node, setting); if (!nObj.get(0) && !!node.parentTId) { view.appendParentULDom(setting, node.getParentNode()); nObj = $$(node, setting); } var ulObj = $$(node, consts.id.UL, setting); if (ulObj.get(0)) { ulObj.remove(); } var children = data.nodeChildren(setting, node), childHtml = view.appendNodes(setting, node.level + 1, children, node, -1, false, true); view.makeUlHtml(setting, node, html, childHtml.join('')); nObj.append(html.join('')); }, asyncNode: function (setting, node, isSilent, callback) { var i, l; var isParent = data.nodeIsParent(setting, node); if (node && !isParent) { tools.apply(callback); return false; } else if (node && node.isAjaxing) { return false; } else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) { tools.apply(callback); return false; } if (node) { node.isAjaxing = true; var icoObj = $$(node, consts.id.ICON, setting); icoObj.attr({"style": "", "class": consts.className.BUTTON + " " + consts.className.ICO_LOADING}); } var tmpParam = {}; var autoParam = tools.apply(setting.async.autoParam, [setting.treeId, node], setting.async.autoParam); for (i = 0, l = autoParam.length; node && i < l; i++) { var pKey = autoParam[i].split("="), spKey = pKey; if (pKey.length > 1) { spKey = pKey[1]; pKey = pKey[0]; } tmpParam[spKey] = node[pKey]; } var otherParam = tools.apply(setting.async.otherParam, [setting.treeId, node], setting.async.otherParam); if (tools.isArray(otherParam)) { for (i = 0, l = otherParam.length; i < l; i += 2) { tmpParam[otherParam[i]] = otherParam[i + 1]; } } else { for (var p in otherParam) { tmpParam[p] = otherParam[p]; } } var _tmpV = data.getRoot(setting)._ver; $.ajax({ contentType: setting.async.contentType, cache: false, type: setting.async.type, url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url), data: setting.async.contentType.indexOf('application/json') > -1 ? JSON.stringify(tmpParam) : tmpParam, dataType: setting.async.dataType, headers: setting.async.headers, xhrFields: setting.async.xhrFields, success: function (msg) { if (_tmpV != data.getRoot(setting)._ver) { return; } var newNodes = []; try { if (!msg || msg.length == 0) { newNodes = []; } else if (typeof msg == "string") { newNodes = eval("(" + msg + ")"); } else { newNodes = msg; } } catch (err) { newNodes = msg; } if (node) { node.isAjaxing = null; node.zAsync = true; } view.setNodeLineIcos(setting, node); if (newNodes && newNodes !== "") { newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes); view.addNodes(setting, node, -1, !!newNodes ? tools.clone(newNodes) : [], !!isSilent); } else { view.addNodes(setting, node, -1, [], !!isSilent); } setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]); tools.apply(callback); }, error: function (XMLHttpRequest, textStatus, errorThrown) { if (_tmpV != data.getRoot(setting)._ver) { return; } if (node) node.isAjaxing = null; view.setNodeLineIcos(setting, node); setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]); } }); return true; }, cancelPreSelectedNode: function (setting, node, excludeNode) { var list = data.getRoot(setting).curSelectedList, i, n; for (i = list.length - 1; i >= 0; i--) { n = list[i]; if (node === n || (!node && (!excludeNode || excludeNode !== n))) { $$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED); if (node) { data.removeSelectedNode(setting, node); break; } else { list.splice(i, 1); setting.treeObj.trigger(consts.event.UNSELECTED, [setting.treeId, n]); } } } }, createNodeCallback: function (setting) { if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) { var root = data.getRoot(setting); while (root.createdNodes.length > 0) { var node = root.createdNodes.shift(); tools.apply(setting.view.addDiyDom, [setting.treeId, node]); if (!!setting.callback.onNodeCreated) { setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]); } } } }, createNodes: function (setting, level, nodes, parentNode, index) { if (!nodes || nodes.length == 0) return; var root = data.getRoot(setting), openFlag = !parentNode || parentNode.open || !!$$(data.nodeChildren(setting, parentNode)[0], setting).get(0); root.createdNodes = []; var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, index, true, openFlag), parentObj, nextObj; if (!parentNode) { parentObj = setting.treeObj; //setting.treeObj.append(zTreeHtml.join('')); } else { var ulObj = $$(parentNode, consts.id.UL, setting); if (ulObj.get(0)) { parentObj = ulObj; //ulObj.append(zTreeHtml.join('')); } } if (parentObj) { if (index >= 0) { nextObj = parentObj.children()[index]; } if (index >= 0 && nextObj) { $(nextObj).before(zTreeHtml.join('')); } else { parentObj.append(zTreeHtml.join('')); } } view.createNodeCallback(setting); }, destroy: function (setting) { if (!setting) return; data.initCache(setting); data.initRoot(setting); event.unbindTree(setting); event.unbindEvent(setting); setting.treeObj.empty(); delete settings[setting.treeId]; }, expandCollapseNode: function (setting, node, expandFlag, animateFlag, callback) { var root = data.getRoot(setting); var tmpCb, _callback; if (!node) { tools.apply(callback, []); return; } var children = data.nodeChildren(setting, node); var isParent = data.nodeIsParent(setting, node); if (root.expandTriggerFlag) { _callback = callback; tmpCb = function () { if (_callback) _callback(); if (node.open) { setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]); } else { setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]); } }; callback = tmpCb; root.expandTriggerFlag = false; } if (!node.open && isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (children && children.length > 0 && !$$(children[0], setting).get(0)))) { view.appendParentULDom(setting, node); view.createNodeCallback(setting); } if (node.open == expandFlag) { tools.apply(callback, []); return; } var ulObj = $$(node, consts.id.UL, setting), switchObj = $$(node, consts.id.SWITCH, setting), icoObj = $$(node, consts.id.ICON, setting); if (isParent) { node.open = !node.open; if (node.iconOpen && node.iconClose) { icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); } if (node.open) { view.replaceSwitchClass(node, switchObj, consts.folder.OPEN); view.replaceIcoClass(node, icoObj, consts.folder.OPEN); if (animateFlag == false || setting.view.expandSpeed == "") { ulObj.show(); tools.apply(callback, []); } else { if (children && children.length > 0) { ulObj.slideDown(setting.view.expandSpeed, callback); } else { ulObj.show(); tools.apply(callback, []); } } } else { view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE); view.replaceIcoClass(node, icoObj, consts.folder.CLOSE); if (animateFlag == false || setting.view.expandSpeed == "" || !(children && children.length > 0)) { ulObj.hide(); tools.apply(callback, []); } else { ulObj.slideUp(setting.view.expandSpeed, callback); } } } else { tools.apply(callback, []); } }, expandCollapseParentNode: function (setting, node, expandFlag, animateFlag, callback) { if (!node) return; if (!node.parentTId) { view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); return; } else { view.expandCollapseNode(setting, node, expandFlag, animateFlag); } if (node.parentTId) { view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback); } }, expandCollapseSonNode: function (setting, node, expandFlag, animateFlag, callback) { var root = data.getRoot(setting), treeNodes = (node) ? data.nodeChildren(setting, node) : data.nodeChildren(setting, root), selfAnimateSign = (node) ? false : animateFlag, expandTriggerFlag = data.getRoot(setting).expandTriggerFlag; data.getRoot(setting).expandTriggerFlag = false; if (treeNodes) { for (var i = 0, l = treeNodes.length; i < l; i++) { if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign); } } data.getRoot(setting).expandTriggerFlag = expandTriggerFlag; view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback); }, isSelectedNode: function (setting, node) { if (!node) { return false; } var list = data.getRoot(setting).curSelectedList, i; for (i = list.length - 1; i >= 0; i--) { if (node === list[i]) { return true; } } return false; }, makeDOMNodeIcon: function (html, setting, node) { var nameStr = data.nodeName(setting, node), name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;'); html.push("<span id='", node.tId, consts.id.ICON, "' title='' treeNode", consts.id.ICON, " class='", view.makeNodeIcoClass(setting, node), "' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN, "' class='", consts.className.NAME, "'>", name, "</span>"); }, makeDOMNodeLine: function (html, setting, node) { html.push("<span id='", node.tId, consts.id.SWITCH, "' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH, "></span>"); }, makeDOMNodeMainAfter: function (html, setting, node) { html.push("</li>"); }, makeDOMNodeMainBefore: function (html, setting, node) { html.push("<li id='", node.tId, "' class='", consts.className.LEVEL, node.level, "' tabindex='0' hidefocus='true' treenode>"); }, makeDOMNodeNameAfter: function (html, setting, node) { html.push("</a>"); }, makeDOMNodeNameBefore: function (html, setting, node) { var title = data.nodeTitle(setting, node), url = view.makeNodeUrl(setting, node), fontcss = view.makeNodeFontCss(setting, node), nodeClasses = view.makeNodeClasses(setting, node), fontStyle = []; for (var f in fontcss) { fontStyle.push(f, ":", fontcss[f], ";"); } html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level, nodeClasses.add ? ' ' + nodeClasses.add.join(' ') : '', "' treeNode", consts.id.A, node.click ? " onclick=\"" + node.click + "\"" : "", ((url != null && url.length > 0) ? " href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(''), "'"); if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) { html.push("title='", title.replace(/'/g, "&#39;").replace(/</g, '&lt;').replace(/>/g, '&gt;'), "'"); } html.push(">"); }, makeNodeFontCss: function (setting, node) { var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss); return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {}; }, makeNodeClasses: function (setting, node) { var classes = tools.apply(setting.view.nodeClasses, [setting.treeId, node], setting.view.nodeClasses); return (classes && (typeof classes !== "function")) ? classes : {add:[], remove:[]}; }, makeNodeIcoClass: function (setting, node) { var icoCss = ["ico"]; if (!node.isAjaxing) { var isParent = data.nodeIsParent(setting, node); icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0]; if (isParent) { icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); } else { icoCss.push(consts.folder.DOCU); } } return consts.className.BUTTON + " " + icoCss.join('_'); }, makeNodeIcoStyle: function (setting, node) { var icoStyle = []; if (!node.isAjaxing) { var isParent = data.nodeIsParent(setting, node); var icon = (isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node[setting.data.key.icon]; if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;"); if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) { icoStyle.push("display:none;"); } } return icoStyle.join(''); }, makeNodeLineClass: function (setting, node) { var lineClass = []; if (setting.view.showLine) { if (node.level == 0 && node.isFirstNode && node.isLastNode) { lineClass.push(consts.line.ROOT); } else if (node.level == 0 && node.isFirstNode) { lineClass.push(consts.line.ROOTS); } else if (node.isLastNode) { lineClass.push(consts.line.BOTTOM); } else { lineClass.push(consts.line.CENTER); } } else { lineClass.push(consts.line.NOLINE); } if (data.nodeIsParent(setting, node)) { lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE); } else { lineClass.push(consts.folder.DOCU); } return view.makeNodeLineClassEx(node) + lineClass.join('_'); }, makeNodeLineClassEx: function (node) { return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " "; }, makeNodeTarget: function (node) { return (node.target || "_blank"); }, makeNodeUrl: function (setting, node) { var urlKey = setting.data.key.url; return node[urlKey] ? node[urlKey] : null; }, makeUlHtml: function (setting, node, html, content) { html.push("<ul id='", node.tId, consts.id.UL, "' class='", consts.className.LEVEL, node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block" : "none"), "'>"); html.push(content); html.push("</ul>"); }, makeUlLineClass: function (setting, node) { return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : ""); }, removeChildNodes: function (setting, node) { if (!node) return; var nodes = data.nodeChildren(setting, node); if (!nodes) return; for (var i = 0, l = nodes.length; i < l; i++) { data.removeNodeCache(setting, nodes[i]); } data.removeSelectedNode(setting); delete node[setting.data.key.children]; if (!setting.data.keep.parent) { data.nodeIsParent(setting, node, false); node.open = false; var tmp_switchObj = $$(node, consts.id.SWITCH, setting), tmp_icoObj = $$(node, consts.id.ICON, setting); view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU); view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU); $$(node, consts.id.UL, setting).remove(); } else { $$(node, consts.id.UL, setting).empty(); } }, scrollIntoView: function (setting, dom) { if (!dom) { return; } // support IE 7 / 8 if (typeof Element === 'undefined' || typeof HTMLElement === 'undefined') { var contRect = setting.treeObj.get(0).getBoundingClientRect(), findMeRect = dom.getBoundingClientRect(); if (findMeRect.top < contRect.top || findMeRect.bottom > contRect.bottom || findMeRect.right > contRect.right || findMeRect.left < contRect.left) { dom.scrollIntoView(); } return; } // CC-BY jocki84@googlemail.com, https://gist.github.com/jocki84/6ffafd003387179a988e if (!Element.prototype.scrollIntoViewIfNeeded) { Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { "use strict"; function makeRange(start, length) { return {"start": start, "length": length, "end": start + length}; } function coverRange(inner, outer) { if ( false === centerIfNeeded || (outer.start < inner.end && inner.start < outer.end) ) { return Math.max( inner.end - outer.length, Math.min(outer.start, inner.start) ); } return (inner.start + inner.end - outer.length) / 2; } function makePoint(x, y) { return { "x": x, "y": y, "translate": function translate(dX, dY) { return makePoint(x + dX, y + dY); } }; } function absolute(elem, pt) { while (elem) { pt = pt.translate(elem.offsetLeft, elem.offsetTop); elem = elem.offsetParent; } return pt; } var target = absolute(this, makePoint(0, 0)), extent = makePoint(this.offsetWidth, this.offsetHeight), elem = this.parentNode, origin; while (elem instanceof HTMLElement) { // Apply desired scroll amount. origin = absolute(elem, makePoint(elem.clientLeft, elem.clientTop)); elem.scrollLeft = coverRange( makeRange(target.x - origin.x, extent.x), makeRange(elem.scrollLeft, elem.clientWidth) ); elem.scrollTop = coverRange( makeRange(target.y - origin.y, extent.y), makeRange(elem.scrollTop, elem.clientHeight) ); // Determine actual scroll amount by reading back scroll properties. target = target.translate(-elem.scrollLeft, -elem.scrollTop); elem = elem.parentNode; } }; } dom.scrollIntoViewIfNeeded(); }, setFirstNode: function (setting, parentNode) { var children = data.nodeChildren(setting, parentNode); if (children.length > 0) { children[0].isFirstNode = true; } }, setLastNode: function (setting, parentNode) { var children = data.nodeChildren(setting, parentNode); if (children.length > 0) { children[children.length - 1].isLastNode = true; } }, removeNode: function (setting, node) { var root = data.getRoot(setting), parentNode = (node.parentTId) ? node.getParentNode() : root; node.isFirstNode = false; node.isLastNode = false; node.getPreNode = function () { return null; }; node.getNextNode = function () { return null; }; if (!data.getNodeCache(setting, node.tId)) { return; } $$(node, setting).remove(); data.removeNodeCache(setting, node); data.removeSelectedNode(setting, node); var children = data.nodeChildren(setting, parentNode); for (var i = 0, l = children.length; i < l; i++) { if (children[i].tId == node.tId) { children.splice(i, 1); break; } } view.setFirstNode(setting, parentNode); view.setLastNode(setting, parentNode); var tmp_ulObj, tmp_switchObj, tmp_icoObj, childLength = children.length; //repair nodes old parent if (!setting.data.keep.parent && childLength == 0) { //old parentNode has no child nodes data.nodeIsParent(setting, parentNode, false); parentNode.open = false; delete parentNode[setting.data.key.children]; tmp_ulObj = $$(parentNode, consts.id.UL, setting); tmp_switchObj = $$(parentNode, consts.id.SWITCH, setting); tmp_icoObj = $$(parentNode, consts.id.ICON, setting); view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU); view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU); tmp_ulObj.css("display", "none"); } else if (setting.view.showLine && childLength > 0) { //old parentNode has child nodes var newLast = children[childLength - 1]; tmp_ulObj = $$(newLast, consts.id.UL, setting); tmp_switchObj = $$(newLast, consts.id.SWITCH, setting); tmp_icoObj = $$(newLast, consts.id.ICON, setting); if (parentNode == root) { if (children.length == 1) { //node was root, and ztree has only one root after move node view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT); } else { var tmp_first_switchObj = $$(children[0], consts.id.SWITCH, setting); view.replaceSwitchClass(children[0], tmp_first_switchObj, consts.line.ROOTS); view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); } } else { view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM); } tmp_ulObj.removeClass(consts.line.LINE); } }, replaceIcoClass: function (node, obj, newName) { if (!obj || node.isAjaxing) return; var tmpName = obj.attr("class"); if (tmpName == undefined) return; var tmpList = tmpName.split("_"); switch (newName) { case consts.folder.OPEN: case consts.folder.CLOSE: case consts.folder.DOCU: tmpList[tmpList.length - 1] = newName; break; } obj.attr("class", tmpList.join("_")); }, replaceSwitchClass: function (node, obj, newName) { if (!obj) return; var tmpName = obj.attr("class"); if (tmpName == undefined) return; var tmpList = tmpName.split("_"); switch (newName) { case consts.line.ROOT: case consts.line.ROOTS: case consts.line.CENTER: case consts.line.BOTTOM: case consts.line.NOLINE: tmpList[0] = view.makeNodeLineClassEx(node) + newName; break; case consts.folder.OPEN: case consts.folder.CLOSE: case consts.folder.DOCU: tmpList[1] = newName; break; } obj.attr("class", tmpList.join("_")); if (newName !== consts.folder.DOCU) { obj.removeAttr("disabled"); } else { obj.attr("disabled", "disabled"); } }, selectNode: function (setting, node, addFlag) { if (!addFlag) { view.cancelPreSelectedNode(setting, null, node); } $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED); data.addSelectedNode(setting, node); setting.treeObj.trigger(consts.event.SELECTED, [setting.treeId, node]); }, setNodeFontCss: function (setting, treeNode) { var aObj = $$(treeNode, consts.id.A, setting), fontCss = view.makeNodeFontCss(setting, treeNode); if (fontCss) { aObj.css(fontCss); } }, setNodeClasses: function (setting, treeNode) { var aObj = $$(treeNode, consts.id.A, setting), classes = view.makeNodeClasses(setting, treeNode); if ('add' in classes && classes.add.length) { aObj.addClass(classes.add.join(' ')); } if ('remove' in classes && classes.remove.length) { aObj.removeClass(classes.remove.join(' ')); } }, setNodeLineIcos: function (setting, node) { if (!node) return; var switchObj = $$(node, consts.id.SWITCH, setting), ulObj = $$(node, consts.id.UL, setting), icoObj = $$(node, consts.id.ICON, setting), ulLine = view.makeUlLineClass(setting, node); if (ulLine.length == 0) { ulObj.removeClass(consts.line.LINE); } else { ulObj.addClass(ulLine); } switchObj.attr("class", view.makeNodeLineClass(setting, node)); if (data.nodeIsParent(setting, node)) { switchObj.removeAttr("disabled"); } else { switchObj.attr("disabled", "disabled"); } icoObj.removeAttr("style"); icoObj.attr("style", view.makeNodeIcoStyle(setting, node)); icoObj.attr("class", view.makeNodeIcoClass(setting, node)); }, setNodeName: function (setting, node) { var title = data.nodeTitle(setting, node), nObj = $$(node, consts.id.SPAN, setting); nObj.empty(); if (setting.view.nameIsHTML) { nObj.html(data.nodeName(setting, node)); } else { nObj.text(data.nodeName(setting, node)); } if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) { var aObj = $$(node, consts.id.A, setting); aObj.attr("title", !title ? "" : title); } }, setNodeTarget: function (setting, node) { var aObj = $$(node, consts.id.A, setting); aObj.attr("target", view.makeNodeTarget(node)); }, setNodeUrl: function (setting, node) { var aObj = $$(node, consts.id.A, setting), url = view.makeNodeUrl(setting, node); if (url == null || url.length == 0) { aObj.removeAttr("href"); } else { aObj.attr("href", url); } }, switchNode: function (setting, node) { if (node.open || !tools.canAsync(setting, node)) { view.expandCollapseNode(setting, node, !node.open); } else if (setting.async.enable) { if (!view.asyncNode(setting, node)) { view.expandCollapseNode(setting, node, !node.open); return; } } else if (node) { view.expandCollapseNode(setting, node, !node.open); } } }; // zTree defind $.fn.zTree = { consts: _consts, _z: { tools: tools, view: view, event: event, data: data }, getZTreeObj: function (treeId) { var o = data.getZTreeTools(treeId); return o ? o : null; }, destroy: function (treeId) { if (!!treeId && treeId.length > 0) { view.destroy(data.getSetting(treeId)); } else { for (var s in settings) { view.destroy(settings[s]); } } }, init: function (obj, zSetting, zNodes) { var setting = tools.clone(_setting); $.extend(true, setting, zSetting); setting.treeId = obj.attr("id"); setting.treeObj = obj; setting.treeObj.empty(); settings[setting.treeId] = setting; //For some older browser,(e.g., ie6) if (typeof document.body.style.maxHeight === "undefined") { setting.view.expandSpeed = ""; } data.initRoot(setting); var root = data.getRoot(setting); zNodes = zNodes ? tools.clone(tools.isArray(zNodes) ? zNodes : [zNodes]) : []; if (setting.data.simpleData.enable) { data.nodeChildren(setting, root, data.transformTozTreeFormat(setting, zNodes)); } else { data.nodeChildren(setting, root, zNodes); } data.initCache(setting); event.unbindTree(setting); event.bindTree(setting); event.unbindEvent(setting); event.bindEvent(setting); var zTreeTools = { setting: setting, addNodes: function (parentNode, index, newNodes, isSilent) { if (!parentNode) parentNode = null; var isParent = data.nodeIsParent(setting, parentNode); if (parentNode && !isParent && setting.data.keep.leaf) return null; var i = parseInt(index, 10); if (isNaN(i)) { isSilent = !!newNodes; newNodes = index; index = -1; } else { index = i; } if (!newNodes) return null; var xNewNodes = tools.clone(tools.isArray(newNodes) ? newNodes : [newNodes]); function addCallback() { view.addNodes(setting, parentNode, index, xNewNodes, (isSilent == true)); } if (tools.canAsync(setting, parentNode)) { view.asyncNode(setting, parentNode, isSilent, addCallback); } else { addCallback(); } return xNewNodes; }, cancelSelectedNode: function (node) { view.cancelPreSelectedNode(setting, node); }, destroy: function () { view.destroy(setting); }, expandAll: function (expandFlag) { expandFlag = !!expandFlag; view.expandCollapseSonNode(setting, null, expandFlag, true); return expandFlag; }, expandNode: function (node, expandFlag, sonSign, focus, callbackFlag) { if (!node || !data.nodeIsParent(setting, node)) return null; if (expandFlag !== true && expandFlag !== false) { expandFlag = !node.open; } callbackFlag = !!callbackFlag; if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) { return null; } else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) { return null; } if (expandFlag && node.parentTId) { view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false); } if (expandFlag === node.open && !sonSign) { return null; } data.getRoot(setting).expandTriggerFlag = callbackFlag; if (!tools.canAsync(setting, node) && sonSign) { view.expandCollapseSonNode(setting, node, expandFlag, true, showNodeFocus); } else { node.open = !expandFlag; view.switchNode(this.setting, node); showNodeFocus(); } return expandFlag; function showNodeFocus() { var a = $$(node, consts.id.A, setting).get(0); if (a && focus !== false) { view.scrollIntoView(setting, a); } } }, getNodes: function () { return data.getNodes(setting); }, getNodeByParam: function (key, value, parentNode) { if (!key) return null; return data.getNodeByParam(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), key, value); }, getNodeByTId: function (tId) { return data.getNodeCache(setting, tId); }, getNodesByParam: function (key, value, parentNode) { if (!key) return null; return data.getNodesByParam(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), key, value); }, getNodesByParamFuzzy: function (key, value, parentNode) { if (!key) return null; return data.getNodesByParamFuzzy(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), key, value); }, getNodesByFilter: function (filter, isSingle, parentNode, invokeParam) { isSingle = !!isSingle; if (!filter || (typeof filter != "function")) return (isSingle ? null : []); return data.getNodesByFilter(setting, parentNode ? data.nodeChildren(setting, parentNode) : data.getNodes(setting), filter, isSingle, invokeParam); }, getNodeIndex: function (node) { if (!node) return null; var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting); var children = data.nodeChildren(setting, parentNode); for (var i = 0, l = children.length; i < l; i++) { if (children[i] == node) return i; } return -1; }, getSelectedNodes: function () { var r = [], list = data.getRoot(setting).curSelectedList; for (var i = 0, l = list.length; i < l; i++) { r.push(list[i]); } return r; }, isSelectedNode: function (node) { return data.isSelectedNode(setting, node); }, reAsyncChildNodesPromise: function (parentNode, reloadType, isSilent) { var promise = new Promise(function (resolve, reject) { try { zTreeTools.reAsyncChildNodes(parentNode, reloadType, isSilent, function () { resolve(parentNode); }); } catch (e) { reject(e); } }); return promise; }, reAsyncChildNodes: function (parentNode, reloadType, isSilent, callback) { if (!this.setting.async.enable) return; var isRoot = !parentNode; if (isRoot) { parentNode = data.getRoot(setting); } if (reloadType == "refresh") { var children = data.nodeChildren(setting, parentNode); for (var i = 0, l = children ? children.length : 0; i < l; i++) { data.removeNodeCache(setting, children[i]); } data.removeSelectedNode(setting); data.nodeChildren(setting, parentNode, []); if (isRoot) { this.setting.treeObj.empty(); } else { var ulObj = $$(parentNode, consts.id.UL, setting); ulObj.empty(); } } view.asyncNode(this.setting, isRoot ? null : parentNode, !!isSilent, callback); }, refresh: function () { this.setting.treeObj.empty(); var root = data.getRoot(setting), nodes = data.nodeChildren(setting, root); data.initRoot(setting); data.nodeChildren(setting, root, nodes); data.initCache(setting); view.createNodes(setting, 0, data.nodeChildren(setting, root), null, -1); }, removeChildNodes: function (node) { if (!node) return null; var nodes = data.nodeChildren(setting, node); view.removeChildNodes(setting, node); return nodes ? nodes : null; }, removeNode: function (node, callbackFlag) { if (!node) return; callbackFlag = !!callbackFlag; if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return; view.removeNode(setting, node); if (callbackFlag) { this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); } }, selectNode: function (node, addFlag, isSilent) { if (!node) return; if (tools.uCanDo(setting)) { addFlag = setting.view.selectedMulti && addFlag; if (node.parentTId) { view.expandCollapseParentNode(setting, node.getParentNode(), true, false, showNodeFocus); } else if (!isSilent) { try { $$(node, setting).focus().blur(); } catch (e) { } } view.selectNode(setting, node, addFlag); } function showNodeFocus() { if (isSilent) { return; } var a = $$(node, setting).get(0); view.scrollIntoView(setting, a); } }, transformTozTreeNodes: function (simpleNodes) { return data.transformTozTreeFormat(setting, simpleNodes); }, transformToArray: function (nodes) { return data.transformToArrayFormat(setting, nodes); }, updateNode: function (node, checkTypeFlag) { if (!node) return; var nObj = $$(node, setting); if (nObj.get(0) && tools.uCanDo(setting)) { view.setNodeName(setting, node); view.setNodeTarget(setting, node); view.setNodeUrl(setting, node); view.setNodeLineIcos(setting, node); view.setNodeFontCss(setting, node); view.setNodeClasses(setting, node); } } }; root.treeTools = zTreeTools; data.setZTreeTools(setting, zTreeTools); var children = data.nodeChildren(setting, root); if (children && children.length > 0) { view.createNodes(setting, 0, children, null, -1); } else if (setting.async.enable && setting.async.url && setting.async.url !== '') { view.asyncNode(setting); } return zTreeTools; } }; var zt = $.fn.zTree, $$ = tools.$, consts = zt.consts; })(jQuery); /***/ }), /***/ "ab17": /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__("95eb"); if(content.__esModule) content = content.default; if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add the styles to the DOM var add = __webpack_require__("499e").default var update = add("6c9c26d5", content, true, {"sourceMap":false,"shadowMode":false}); /***/ }), /***/ "b622": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var shared = __webpack_require__("5692"); var hasOwn = __webpack_require__("1a2d"); var uid = __webpack_require__("90e3"); var NATIVE_SYMBOL = __webpack_require__("4930"); var USE_SYMBOL_AS_UID = __webpack_require__("fdbf"); var WellKnownSymbolsStore = shared('wks'); var Symbol = global.Symbol; var symbolFor = Symbol && Symbol['for']; var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; module.exports = function (name) { if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { var description = 'Symbol.' + name; if (NATIVE_SYMBOL && hasOwn(Symbol, name)) { WellKnownSymbolsStore[name] = Symbol[name]; } else if (USE_SYMBOL_AS_UID && symbolFor) { WellKnownSymbolsStore[name] = symbolFor(description); } else { WellKnownSymbolsStore[name] = createWellKnownSymbol(description); } } return WellKnownSymbolsStore[name]; }; /***/ }), /***/ "bae4": /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__("4273"); if(content.__esModule) content = content.default; if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add the styles to the DOM var add = __webpack_require__("499e").default var update = add("7fa80e31", content, true, {"sourceMap":false,"shadowMode":false}); /***/ }), /***/ "c04e": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var call = __webpack_require__("c65b"); var isObject = __webpack_require__("861d"); var isSymbol = __webpack_require__("d9b5"); var getMethod = __webpack_require__("dc4a"); var ordinaryToPrimitive = __webpack_require__("485a"); var wellKnownSymbol = __webpack_require__("b622"); var TypeError = global.TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive module.exports = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw TypeError("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; /***/ }), /***/ "c430": /***/ (function(module, exports) { module.exports = false; /***/ }), /***/ "c65b": /***/ (function(module, exports) { var call = Function.prototype.call; module.exports = call.bind ? call.bind(call) : function () { return call.apply(call, arguments); }; /***/ }), /***/ "c6b6": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var toString = uncurryThis({}.toString); var stringSlice = uncurryThis(''.slice); module.exports = function (it) { return stringSlice(toString(it), 8, -1); }; /***/ }), /***/ "c6cd": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var setGlobal = __webpack_require__("ce4e"); var SHARED = '__core-js_shared__'; var store = global[SHARED] || setGlobal(SHARED, {}); module.exports = store; /***/ }), /***/ "c8ba": /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || new Function("return this")(); } catch (e) { // This works if the window reference is available if (typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /***/ "ca84": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var hasOwn = __webpack_require__("1a2d"); var toIndexedObject = __webpack_require__("fc6a"); var indexOf = __webpack_require__("4d64").indexOf; var hiddenKeys = __webpack_require__("d012"); var push = uncurryThis([].push); module.exports = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn(O, key = names[i++])) { ~indexOf(result, key) || push(result, key); } return result; }; /***/ }), /***/ "cc12": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isObject = __webpack_require__("861d"); var document = global.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document) && isObject(document.createElement); module.exports = function (it) { return EXISTS ? document.createElement(it) : {}; }; /***/ }), /***/ "ce4e": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; module.exports = function (key, value) { try { defineProperty(global, key, { value: value, configurable: true, writable: true }); } catch (error) { global[key] = value; } return value; }; /***/ }), /***/ "d012": /***/ (function(module, exports) { module.exports = {}; /***/ }), /***/ "d039": /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (error) { return true; } }; /***/ }), /***/ "d066": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var aFunction = function (argument) { return isCallable(argument) ? argument : undefined; }; module.exports = function (namespace, method) { return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method]; }; /***/ }), /***/ "d1e7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; /***/ }), /***/ "d9b5": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var getBuiltIn = __webpack_require__("d066"); var isCallable = __webpack_require__("1626"); var isPrototypeOf = __webpack_require__("3a9b"); var USE_SYMBOL_AS_UID = __webpack_require__("fdbf"); var Object = global.Object; module.exports = USE_SYMBOL_AS_UID ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it)); }; /***/ }), /***/ "da84": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 module.exports = // eslint-disable-next-line es/no-global-this -- safe check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe check(typeof self == 'object' && self) || check(typeof global == 'object' && global) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) /***/ }), /***/ "dc4a": /***/ (function(module, exports, __webpack_require__) { var aCallable = __webpack_require__("59ed"); // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod module.exports = function (V, P) { var func = V[P]; return func == null ? undefined : aCallable(func); }; /***/ }), /***/ "e330": /***/ (function(module, exports) { var FunctionPrototype = Function.prototype; var bind = FunctionPrototype.bind; var call = FunctionPrototype.call; var callBind = bind && bind.bind(call); module.exports = bind ? function (fn) { return fn && callBind(call, fn); } : function (fn) { return fn && function () { return call.apply(fn, arguments); }; }; /***/ }), /***/ "e893": /***/ (function(module, exports, __webpack_require__) { var hasOwn = __webpack_require__("1a2d"); var ownKeys = __webpack_require__("56ef"); var getOwnPropertyDescriptorModule = __webpack_require__("06cf"); var definePropertyModule = __webpack_require__("9bf2"); module.exports = function (target, source) { var keys = ownKeys(source); var defineProperty = definePropertyModule.f; var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } }; /***/ }), /***/ "e8b5": /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__("c6b6"); // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe module.exports = Array.isArray || function isArray(argument) { return classof(argument) == 'Array'; }; /***/ }), /***/ "effb": /***/ (function(module, exports) { /* * JQuery zTree exedit * v3.5.48 * http://treejs.cn/ * * Copyright (c) 2010 Hunter.z * * Licensed same as jquery - MIT License * http://www.opensource.org/licenses/mit-license.php * * Date: 2020-11-21 */ (function ($) { //default consts of exedit var _consts = { event: { DRAG: "ztree_drag", DROP: "ztree_drop", RENAME: "ztree_rename", DRAGMOVE: "ztree_dragmove" }, id: { EDIT: "_edit", INPUT: "_input", REMOVE: "_remove" }, move: { TYPE_INNER: "inner", TYPE_PREV: "prev", TYPE_NEXT: "next" }, node: { CURSELECTED_EDIT: "curSelectedNode_Edit", TMPTARGET_TREE: "tmpTargetzTree", TMPTARGET_NODE: "tmpTargetNode" } }, //default setting of exedit _setting = { edit: { enable: false, editNameSelectAll: false, showRemoveBtn: true, showRenameBtn: true, removeTitle: "remove", renameTitle: "rename", drag: { autoExpandTrigger: false, isCopy: true, isMove: true, prev: true, next: true, inner: true, minMoveSize: 5, borderMax: 10, borderMin: -5, maxShowNodeNum: 5, autoOpenTime: 500 } }, view: { addHoverDom: null, removeHoverDom: null }, callback: { beforeDrag: null, beforeDragOpen: null, beforeDrop: null, beforeEditName: null, beforeRename: null, onDrag: null, onDragMove: null, onDrop: null, onRename: null } }, //default root of exedit _initRoot = function (setting) { var r = data.getRoot(setting), rs = data.getRoots(); r.curEditNode = null; r.curEditInput = null; r.curHoverNode = null; r.dragFlag = 0; r.dragNodeShowBefore = []; r.dragMaskList = new Array(); rs.showHoverDom = true; }, //default cache of exedit _initCache = function (treeId) { }, //default bind event of exedit _bindEvent = function (setting) { var o = setting.treeObj; var c = consts.event; o.bind(c.RENAME, function (event, treeId, treeNode, isCancel) { tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]); }); o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) { tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]); }); o.bind(c.DRAGMOVE, function (event, srcEvent, treeId, treeNodes) { tools.apply(setting.callback.onDragMove, [srcEvent, treeId, treeNodes]); }); o.bind(c.DROP, function (event, srcEvent, treeId, treeNodes, targetNode, moveType, isCopy) { tools.apply(setting.callback.onDrop, [srcEvent, treeId, treeNodes, targetNode, moveType, isCopy]); }); }, _unbindEvent = function (setting) { var o = setting.treeObj; var c = consts.event; o.unbind(c.RENAME); o.unbind(c.DRAG); o.unbind(c.DRAGMOVE); o.unbind(c.DROP); }, //default event proxy of exedit _eventProxy = function (e) { var target = e.target, setting = data.getSetting(e.data.treeId), relatedTarget = e.relatedTarget, tId = "", node = null, nodeEventType = "", treeEventType = "", nodeEventCallback = null, treeEventCallback = null, tmp = null; if (tools.eqs(e.type, "mouseover")) { tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); if (tmp) { tId = tools.getNodeMainDom(tmp).id; nodeEventType = "hoverOverNode"; } } else if (tools.eqs(e.type, "mouseout")) { tmp = tools.getMDom(setting, relatedTarget, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); if (!tmp) { tId = "remove"; nodeEventType = "hoverOutNode"; } } else if (tools.eqs(e.type, "mousedown")) { tmp = tools.getMDom(setting, target, [{tagName: "a", attrName: "treeNode" + consts.id.A}]); if (tmp) { tId = tools.getNodeMainDom(tmp).id; nodeEventType = "mousedownNode"; } } if (tId.length > 0) { node = data.getNodeCache(setting, tId); switch (nodeEventType) { case "mousedownNode" : nodeEventCallback = _handler.onMousedownNode; break; case "hoverOverNode" : nodeEventCallback = _handler.onHoverOverNode; break; case "hoverOutNode" : nodeEventCallback = _handler.onHoverOutNode; break; } } var proxyResult = { stop: false, node: node, nodeEventType: nodeEventType, nodeEventCallback: nodeEventCallback, treeEventType: treeEventType, treeEventCallback: treeEventCallback }; return proxyResult }, //default init node of exedit _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { if (!n) return; n.isHover = false; n.editNameFlag = false; }, //update zTreeObj, add method of edit _zTreeTools = function (setting, zTreeTools) { zTreeTools.cancelEditName = function (newName) { var root = data.getRoot(this.setting); if (!root.curEditNode) return; view.cancelCurEditNode(this.setting, newName ? newName : null, true); } zTreeTools.copyNode = function (targetNode, node, moveType, isSilent) { if (!node) return null; var isParent = data.nodeIsParent(setting, targetNode); if (targetNode && !isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) return null; var _this = this, newNode = tools.clone(node); if (!targetNode) { targetNode = null; moveType = consts.move.TYPE_INNER; } if (moveType == consts.move.TYPE_INNER) { function copyCallback() { view.addNodes(_this.setting, targetNode, -1, [newNode], isSilent); } if (tools.canAsync(this.setting, targetNode)) { view.asyncNode(this.setting, targetNode, isSilent, copyCallback); } else { copyCallback(); } } else { view.addNodes(this.setting, targetNode.parentNode, -1, [newNode], isSilent); view.moveNode(this.setting, targetNode, newNode, moveType, false, isSilent); } return newNode; } zTreeTools.editName = function (node) { if (!node || !node.tId || node !== data.getNodeCache(this.setting, node.tId)) return; if (node.parentTId) view.expandCollapseParentNode(this.setting, node.getParentNode(), true); view.editNode(this.setting, node) } zTreeTools.moveNode = function (targetNode, node, moveType, isSilent) { if (!node) return node; var isParent = data.nodeIsParent(setting, targetNode); if (targetNode && !isParent && this.setting.data.keep.leaf && moveType === consts.move.TYPE_INNER) { return null; } else if (targetNode && ((node.parentTId == targetNode.tId && moveType == consts.move.TYPE_INNER) || $$(node, this.setting).find("#" + targetNode.tId).length > 0)) { return null; } else if (!targetNode) { targetNode = null; } var _this = this; function moveCallback() { view.moveNode(_this.setting, targetNode, node, moveType, false, isSilent); } if (tools.canAsync(this.setting, targetNode) && moveType === consts.move.TYPE_INNER) { view.asyncNode(this.setting, targetNode, isSilent, moveCallback); } else { moveCallback(); } return node; } zTreeTools.setEditable = function (editable) { this.setting.edit.enable = editable; return this.refresh(); } }, //method of operate data _data = { setSonNodeLevel: function (setting, parentNode, node) { if (!node) return; var children = data.nodeChildren(setting, node); var oldLevel = node.level; node.level = (parentNode) ? parentNode.level + 1 : 0; view.repairNodeLevelClass(setting, node, oldLevel); if (!children) return; for (var i = 0, l = children.length; i < l; i++) { if (children[i]) data.setSonNodeLevel(setting, node, children[i]); } } }, //method of event proxy _event = {}, //method of event handler _handler = { onHoverOverNode: function (event, node) { var setting = data.getSetting(event.data.treeId), root = data.getRoot(setting); if (root.curHoverNode != node) { _handler.onHoverOutNode(event); } root.curHoverNode = node; view.addHoverDom(setting, node); }, onHoverOutNode: function (event, node) { var setting = data.getSetting(event.data.treeId), root = data.getRoot(setting); if (root.curHoverNode && !data.isSelectedNode(setting, root.curHoverNode)) { view.removeTreeDom(setting, root.curHoverNode); root.curHoverNode = null; } }, onMousedownNode: function (eventMouseDown, _node) { var i, l, setting = data.getSetting(eventMouseDown.data.treeId), root = data.getRoot(setting), roots = data.getRoots(); //right click can't drag & drop if (eventMouseDown.button == 2 || !setting.edit.enable || (!setting.edit.drag.isCopy && !setting.edit.drag.isMove)) return true; //input of edit node name can't drag & drop var target = eventMouseDown.target, _nodes = data.getRoot(setting).curSelectedList, nodes = []; if (!data.isSelectedNode(setting, _node)) { nodes = [_node]; } else { for (i = 0, l = _nodes.length; i < l; i++) { if (_nodes[i].editNameFlag && tools.eqs(target.tagName, "input") && target.getAttribute("treeNode" + consts.id.INPUT) !== null) { return true; } nodes.push(_nodes[i]); if (nodes[0].parentTId !== _nodes[i].parentTId) { nodes = [_node]; break; } } } view.editNodeBlur = true; view.cancelCurEditNode(setting); var doc = $(setting.treeObj.get(0).ownerDocument), body = $(setting.treeObj.get(0).ownerDocument.body), curNode, tmpArrow, tmpTarget, isOtherTree = false, targetSetting = setting, sourceSetting = setting, preNode, nextNode, preTmpTargetNodeId = null, preTmpMoveType = null, tmpTargetNodeId = null, moveType = consts.move.TYPE_INNER, mouseDownX = eventMouseDown.clientX, mouseDownY = eventMouseDown.clientY, startTime = (new Date()).getTime(); if (tools.uCanDo(setting)) { doc.bind("mousemove", _docMouseMove); } function _docMouseMove(event) { //avoid start drag after click node if (root.dragFlag == 0 && Math.abs(mouseDownX - event.clientX) < setting.edit.drag.minMoveSize && Math.abs(mouseDownY - event.clientY) < setting.edit.drag.minMoveSize) { return true; } var i, l, tmpNode, tmpDom, tmpNodes; body.css("cursor", "pointer"); if (root.dragFlag == 0) { if (tools.apply(setting.callback.beforeDrag, [setting.treeId, nodes], true) == false) { _docMouseUp(event); return true; } for (i = 0, l = nodes.length; i < l; i++) { if (i == 0) { root.dragNodeShowBefore = []; } tmpNode = nodes[i]; if (data.nodeIsParent(setting, tmpNode) && tmpNode.open) { view.expandCollapseNode(setting, tmpNode, !tmpNode.open); root.dragNodeShowBefore[tmpNode.tId] = true; } else { root.dragNodeShowBefore[tmpNode.tId] = false; } } root.dragFlag = 1; roots.showHoverDom = false; tools.showIfameMask(setting, true); //sort var isOrder = true, lastIndex = -1; if (nodes.length > 1) { var pNodes = nodes[0].parentTId ? data.nodeChildren(setting, nodes[0].getParentNode()) : data.getNodes(setting); tmpNodes = []; for (i = 0, l = pNodes.length; i < l; i++) { if (root.dragNodeShowBefore[pNodes[i].tId] !== undefined) { if (isOrder && lastIndex > -1 && (lastIndex + 1) !== i) { isOrder = false; } tmpNodes.push(pNodes[i]); lastIndex = i; } if (nodes.length === tmpNodes.length) { nodes = tmpNodes; break; } } } if (isOrder) { preNode = nodes[0].getPreNode(); nextNode = nodes[nodes.length - 1].getNextNode(); } //set node in selected curNode = $$("<ul class='zTreeDragUL'></ul>", setting); for (i = 0, l = nodes.length; i < l; i++) { tmpNode = nodes[i]; tmpNode.editNameFlag = false; view.selectNode(setting, tmpNode, i > 0); view.removeTreeDom(setting, tmpNode); if (i > setting.edit.drag.maxShowNodeNum - 1) { continue; } tmpDom = $$("<li id='" + tmpNode.tId + "_tmp'></li>", setting); tmpDom.append($$(tmpNode, consts.id.A, setting).clone()); tmpDom.css("padding", "0"); tmpDom.children("#" + tmpNode.tId + consts.id.A).removeClass(consts.node.CURSELECTED); curNode.append(tmpDom); if (i == setting.edit.drag.maxShowNodeNum - 1) { tmpDom = $$("<li id='" + tmpNode.tId + "_moretmp'><a> ... </a></li>", setting); curNode.append(tmpDom); } } curNode.attr("id", nodes[0].tId + consts.id.UL + "_tmp"); curNode.addClass(setting.treeObj.attr("class")); curNode.appendTo(body); tmpArrow = $$("<span class='tmpzTreeMove_arrow'></span>", setting); tmpArrow.attr("id", "zTreeMove_arrow_tmp"); tmpArrow.appendTo(body); setting.treeObj.trigger(consts.event.DRAG, [event, setting.treeId, nodes]); } if (root.dragFlag == 1) { if (tmpTarget && tmpArrow.attr("id") == event.target.id && tmpTargetNodeId && (event.clientX + doc.scrollLeft() + 2) > ($("#" + tmpTargetNodeId + consts.id.A, tmpTarget).offset().left)) { var xT = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget); event.target = (xT.length > 0) ? xT.get(0) : event.target; } else if (tmpTarget) { tmpTarget.removeClass(consts.node.TMPTARGET_TREE); if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); } tmpTarget = null; tmpTargetNodeId = null; //judge drag & drop in multi ztree isOtherTree = false; targetSetting = setting; var settings = data.getSettings(); for (var s in settings) { if (settings[s].treeId && settings[s].edit.enable && settings[s].treeId != setting.treeId && (event.target.id == settings[s].treeId || $(event.target).parents("#" + settings[s].treeId).length > 0)) { isOtherTree = true; targetSetting = settings[s]; } } var docScrollTop = doc.scrollTop(), docScrollLeft = doc.scrollLeft(), treeOffset = targetSetting.treeObj.offset(), scrollHeight = targetSetting.treeObj.get(0).scrollHeight, scrollWidth = targetSetting.treeObj.get(0).scrollWidth, dTop = (event.clientY + docScrollTop - treeOffset.top), dBottom = (targetSetting.treeObj.height() + treeOffset.top - event.clientY - docScrollTop), dLeft = (event.clientX + docScrollLeft - treeOffset.left), dRight = (targetSetting.treeObj.width() + treeOffset.left - event.clientX - docScrollLeft), isTop = (dTop < setting.edit.drag.borderMax && dTop > setting.edit.drag.borderMin), isBottom = (dBottom < setting.edit.drag.borderMax && dBottom > setting.edit.drag.borderMin), isLeft = (dLeft < setting.edit.drag.borderMax && dLeft > setting.edit.drag.borderMin), isRight = (dRight < setting.edit.drag.borderMax && dRight > setting.edit.drag.borderMin), isTreeInner = dTop > setting.edit.drag.borderMin && dBottom > setting.edit.drag.borderMin && dLeft > setting.edit.drag.borderMin && dRight > setting.edit.drag.borderMin, isTreeTop = (isTop && targetSetting.treeObj.scrollTop() <= 0), isTreeBottom = (isBottom && (targetSetting.treeObj.scrollTop() + targetSetting.treeObj.height() + 10) >= scrollHeight), isTreeLeft = (isLeft && targetSetting.treeObj.scrollLeft() <= 0), isTreeRight = (isRight && (targetSetting.treeObj.scrollLeft() + targetSetting.treeObj.width() + 10) >= scrollWidth); if (event.target && tools.isChildOrSelf(event.target, targetSetting.treeId)) { //get node <li> dom var targetObj = event.target; while (targetObj && targetObj.tagName && !tools.eqs(targetObj.tagName, "li") && targetObj.id != targetSetting.treeId) { targetObj = targetObj.parentNode; } var canMove = true; //don't move to self or children of self for (i = 0, l = nodes.length; i < l; i++) { tmpNode = nodes[i]; if (targetObj.id === tmpNode.tId) { canMove = false; break; } else if ($$(tmpNode, setting).find("#" + targetObj.id).length > 0) { canMove = false; break; } } if (canMove && event.target && tools.isChildOrSelf(event.target, targetObj.id + consts.id.A)) { tmpTarget = $(targetObj); tmpTargetNodeId = targetObj.id; } } //the mouse must be in zTree tmpNode = nodes[0]; if (isTreeInner && tools.isChildOrSelf(event.target, targetSetting.treeId)) { //judge mouse move in root of ztree if (!tmpTarget && (event.target.id == targetSetting.treeId || isTreeTop || isTreeBottom || isTreeLeft || isTreeRight) && (isOtherTree || (!isOtherTree && tmpNode.parentTId))) { tmpTarget = targetSetting.treeObj; } //auto scroll top if (isTop) { targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop() - 10); } else if (isBottom) { targetSetting.treeObj.scrollTop(targetSetting.treeObj.scrollTop() + 10); } if (isLeft) { targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft() - 10); } else if (isRight) { targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft() + 10); } //auto scroll left if (tmpTarget && tmpTarget != targetSetting.treeObj && tmpTarget.offset().left < targetSetting.treeObj.offset().left) { targetSetting.treeObj.scrollLeft(targetSetting.treeObj.scrollLeft() + tmpTarget.offset().left - targetSetting.treeObj.offset().left); } } curNode.css({ "top": (event.clientY + docScrollTop + 3) + "px", "left": (event.clientX + docScrollLeft + 3) + "px" }); var dX = 0; var dY = 0; if (tmpTarget && tmpTarget.attr("id") != targetSetting.treeId) { var tmpTargetNode = tmpTargetNodeId == null ? null : data.getNodeCache(targetSetting, tmpTargetNodeId), isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy), isPrev = !!(preNode && tmpTargetNodeId === preNode.tId), isNext = !!(nextNode && tmpTargetNodeId === nextNode.tId), isInner = (tmpNode.parentTId && tmpNode.parentTId == tmpTargetNodeId), canPrev = (isCopy || !isNext) && tools.apply(targetSetting.edit.drag.prev, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.prev), canNext = (isCopy || !isPrev) && tools.apply(targetSetting.edit.drag.next, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.next), canInner = (isCopy || !isInner) && !(targetSetting.data.keep.leaf && !data.nodeIsParent(setting, tmpTargetNode)) && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, tmpTargetNode], !!targetSetting.edit.drag.inner); function clearMove() { tmpTarget = null; tmpTargetNodeId = ""; moveType = consts.move.TYPE_INNER; tmpArrow.css({ "display": "none" }); if (window.zTreeMoveTimer) { clearTimeout(window.zTreeMoveTimer); window.zTreeMoveTargetNodeTId = null } } if (!canPrev && !canNext && !canInner) { clearMove(); } else { var tmpTargetA = $("#" + tmpTargetNodeId + consts.id.A, tmpTarget), tmpNextA = tmpTargetNode.isLastNode ? null : $("#" + tmpTargetNode.getNextNode().tId + consts.id.A, tmpTarget.next()), tmpTop = tmpTargetA.offset().top, tmpLeft = tmpTargetA.offset().left, prevPercent = canPrev ? (canInner ? 0.25 : (canNext ? 0.5 : 1)) : -1, nextPercent = canNext ? (canInner ? 0.75 : (canPrev ? 0.5 : 0)) : -1, dY_percent = (event.clientY + docScrollTop - tmpTop) / tmpTargetA.height(); if ((prevPercent == 1 || dY_percent <= prevPercent && dY_percent >= -.2) && canPrev) { dX = 1 - tmpArrow.width(); dY = tmpTop - tmpArrow.height() / 2; moveType = consts.move.TYPE_PREV; } else if ((nextPercent == 0 || dY_percent >= nextPercent && dY_percent <= 1.2) && canNext) { dX = 1 - tmpArrow.width(); dY = (tmpNextA == null || (data.nodeIsParent(setting, tmpTargetNode) && tmpTargetNode.open)) ? (tmpTop + tmpTargetA.height() - tmpArrow.height() / 2) : (tmpNextA.offset().top - tmpArrow.height() / 2); moveType = consts.move.TYPE_NEXT; } else if (canInner) { dX = 5 - tmpArrow.width(); dY = tmpTop; moveType = consts.move.TYPE_INNER; } else { clearMove(); } if (tmpTarget) { tmpArrow.css({ "display": "block", "top": dY + "px", "left": (tmpLeft + dX) + "px" }); tmpTargetA.addClass(consts.node.TMPTARGET_NODE + "_" + moveType); if (preTmpTargetNodeId != tmpTargetNodeId || preTmpMoveType != moveType) { startTime = (new Date()).getTime(); } if (tmpTargetNode && data.nodeIsParent(setting, tmpTargetNode) && moveType == consts.move.TYPE_INNER) { var startTimer = true; if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId !== tmpTargetNode.tId) { clearTimeout(window.zTreeMoveTimer); window.zTreeMoveTargetNodeTId = null; } else if (window.zTreeMoveTimer && window.zTreeMoveTargetNodeTId === tmpTargetNode.tId) { startTimer = false; } if (startTimer) { window.zTreeMoveTimer = setTimeout(function () { if (moveType != consts.move.TYPE_INNER) return; if (tmpTargetNode && data.nodeIsParent(setting, tmpTargetNode) && !tmpTargetNode.open && (new Date()).getTime() - startTime > targetSetting.edit.drag.autoOpenTime && tools.apply(targetSetting.callback.beforeDragOpen, [targetSetting.treeId, tmpTargetNode], true)) { view.switchNode(targetSetting, tmpTargetNode); if (targetSetting.edit.drag.autoExpandTrigger) { targetSetting.treeObj.trigger(consts.event.EXPAND, [targetSetting.treeId, tmpTargetNode]); } } }, targetSetting.edit.drag.autoOpenTime + 50); window.zTreeMoveTargetNodeTId = tmpTargetNode.tId; } } } } } else { moveType = consts.move.TYPE_INNER; if (tmpTarget && tools.apply(targetSetting.edit.drag.inner, [targetSetting.treeId, nodes, null], !!targetSetting.edit.drag.inner)) { tmpTarget.addClass(consts.node.TMPTARGET_TREE); } else { tmpTarget = null; } tmpArrow.css({ "display": "none" }); if (window.zTreeMoveTimer) { clearTimeout(window.zTreeMoveTimer); window.zTreeMoveTargetNodeTId = null; } } preTmpTargetNodeId = tmpTargetNodeId; preTmpMoveType = moveType; setting.treeObj.trigger(consts.event.DRAGMOVE, [event, setting.treeId, nodes]); } return false; } doc.bind("mouseup", _docMouseUp); function _docMouseUp(event) { if (window.zTreeMoveTimer) { clearTimeout(window.zTreeMoveTimer); window.zTreeMoveTargetNodeTId = null; } preTmpTargetNodeId = null; preTmpMoveType = null; doc.unbind("mousemove", _docMouseMove); doc.unbind("mouseup", _docMouseUp); doc.unbind("selectstart", _docSelect); body.css("cursor", ""); if (tmpTarget) { tmpTarget.removeClass(consts.node.TMPTARGET_TREE); if (tmpTargetNodeId) $("#" + tmpTargetNodeId + consts.id.A, tmpTarget).removeClass(consts.node.TMPTARGET_NODE + "_" + consts.move.TYPE_PREV) .removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_NEXT).removeClass(consts.node.TMPTARGET_NODE + "_" + _consts.move.TYPE_INNER); } tools.showIfameMask(setting, false); roots.showHoverDom = true; if (root.dragFlag == 0) return; root.dragFlag = 0; var i, l, tmpNode; for (i = 0, l = nodes.length; i < l; i++) { tmpNode = nodes[i]; if (data.nodeIsParent(setting, tmpNode) && root.dragNodeShowBefore[tmpNode.tId] && !tmpNode.open) { view.expandCollapseNode(setting, tmpNode, !tmpNode.open); delete root.dragNodeShowBefore[tmpNode.tId]; } } if (curNode) curNode.remove(); if (tmpArrow) tmpArrow.remove(); var isCopy = ((event.ctrlKey || event.metaKey) && setting.edit.drag.isMove && setting.edit.drag.isCopy) || (!setting.edit.drag.isMove && setting.edit.drag.isCopy); if (!isCopy && tmpTarget && tmpTargetNodeId && nodes[0].parentTId && tmpTargetNodeId == nodes[0].parentTId && moveType == consts.move.TYPE_INNER) { tmpTarget = null; } if (tmpTarget) { var dragTargetNode = tmpTargetNodeId == null ? null : data.getNodeCache(targetSetting, tmpTargetNodeId); if (tools.apply(setting.callback.beforeDrop, [targetSetting.treeId, nodes, dragTargetNode, moveType, isCopy], true) == false) { view.selectNodes(sourceSetting, nodes); return; } var newNodes = isCopy ? tools.clone(nodes) : nodes; function dropCallback() { if (isOtherTree) { if (!isCopy) { for (var i = 0, l = nodes.length; i < l; i++) { view.removeNode(setting, nodes[i]); } } if (moveType == consts.move.TYPE_INNER) { view.addNodes(targetSetting, dragTargetNode, -1, newNodes); } else { view.addNodes(targetSetting, dragTargetNode.getParentNode(), moveType == consts.move.TYPE_PREV ? dragTargetNode.getIndex() : dragTargetNode.getIndex() + 1, newNodes); } } else { if (isCopy && moveType == consts.move.TYPE_INNER) { view.addNodes(targetSetting, dragTargetNode, -1, newNodes); } else if (isCopy) { view.addNodes(targetSetting, dragTargetNode.getParentNode(), moveType == consts.move.TYPE_PREV ? dragTargetNode.getIndex() : dragTargetNode.getIndex() + 1, newNodes); } else { if (moveType != consts.move.TYPE_NEXT) { for (i = 0, l = newNodes.length; i < l; i++) { view.moveNode(targetSetting, dragTargetNode, newNodes[i], moveType, false); } } else { for (i = -1, l = newNodes.length - 1; i < l; l--) { view.moveNode(targetSetting, dragTargetNode, newNodes[l], moveType, false); } } } } view.selectNodes(targetSetting, newNodes); var a = $$(newNodes[0], setting).get(0); view.scrollIntoView(setting, a); setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]); } if (moveType == consts.move.TYPE_INNER && tools.canAsync(targetSetting, dragTargetNode)) { view.asyncNode(targetSetting, dragTargetNode, false, dropCallback); } else { dropCallback(); } } else { view.selectNodes(sourceSetting, nodes); setting.treeObj.trigger(consts.event.DROP, [event, setting.treeId, nodes, null, null, null]); } } doc.bind("selectstart", _docSelect); function _docSelect() { return false; } // 2018-03-30 FireFox has fixed this issue. //Avoid FireFox's Bug //If zTree Div CSS set 'overflow', so drag node outside of zTree, and event.target is error. // if(eventMouseDown.preventDefault) { // eventMouseDown.preventDefault(); // } return true; } }, //method of tools for zTree _tools = { getAbs: function (obj) { var oRect = obj.getBoundingClientRect(), scrollTop = document.body.scrollTop + document.documentElement.scrollTop, scrollLeft = document.body.scrollLeft + document.documentElement.scrollLeft; return [oRect.left + scrollLeft, oRect.top + scrollTop]; }, inputFocus: function (inputObj) { if (inputObj.get(0)) { inputObj.focus(); tools.setCursorPosition(inputObj.get(0), inputObj.val().length); } }, inputSelect: function (inputObj) { if (inputObj.get(0)) { inputObj.focus(); inputObj.select(); } }, setCursorPosition: function (obj, pos) { if (obj.setSelectionRange) { obj.focus(); obj.setSelectionRange(pos, pos); } else if (obj.createTextRange) { var range = obj.createTextRange(); range.collapse(true); range.moveEnd('character', pos); range.moveStart('character', pos); range.select(); } }, showIfameMask: function (setting, showSign) { var root = data.getRoot(setting); //clear full mask while (root.dragMaskList.length > 0) { root.dragMaskList[0].remove(); root.dragMaskList.shift(); } if (showSign) { //show mask var iframeList = $$("iframe", setting); for (var i = 0, l = iframeList.length; i < l; i++) { var obj = iframeList.get(i), r = tools.getAbs(obj), dragMask = $$("<div id='zTreeMask_" + i + "' class='zTreeMask' style='top:" + r[1] + "px; left:" + r[0] + "px; width:" + obj.offsetWidth + "px; height:" + obj.offsetHeight + "px;'></div>", setting); dragMask.appendTo($$("body", setting)); root.dragMaskList.push(dragMask); } } } }, //method of operate ztree dom _view = { addEditBtn: function (setting, node) { if (node.editNameFlag || $$(node, consts.id.EDIT, setting).length > 0) { return; } if (!tools.apply(setting.edit.showRenameBtn, [setting.treeId, node], setting.edit.showRenameBtn)) { return; } var aObj = $$(node, consts.id.A, setting), editStr = "<span class='" + consts.className.BUTTON + " edit' id='" + node.tId + consts.id.EDIT + "' title='" + tools.apply(setting.edit.renameTitle, [setting.treeId, node], setting.edit.renameTitle) + "' treeNode" + consts.id.EDIT + " style='display:none;'></span>"; aObj.append(editStr); $$(node, consts.id.EDIT, setting).bind('click', function () { if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeEditName, [setting.treeId, node], true) == false) return false; view.editNode(setting, node); return false; } ).show(); }, addRemoveBtn: function (setting, node) { if (node.editNameFlag || $$(node, consts.id.REMOVE, setting).length > 0) { return; } if (!tools.apply(setting.edit.showRemoveBtn, [setting.treeId, node], setting.edit.showRemoveBtn)) { return; } var aObj = $$(node, consts.id.A, setting), removeStr = "<span class='" + consts.className.BUTTON + " remove' id='" + node.tId + consts.id.REMOVE + "' title='" + tools.apply(setting.edit.removeTitle, [setting.treeId, node], setting.edit.removeTitle) + "' treeNode" + consts.id.REMOVE + " style='display:none;'></span>"; aObj.append(removeStr); $$(node, consts.id.REMOVE, setting).bind('click', function () { if (!tools.uCanDo(setting) || tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return false; view.removeNode(setting, node); setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]); return false; } ).bind('mousedown', function (eventMouseDown) { return true; } ).show(); }, addHoverDom: function (setting, node) { if (data.getRoots().showHoverDom) { node.isHover = true; if (setting.edit.enable) { view.addEditBtn(setting, node); view.addRemoveBtn(setting, node); } tools.apply(setting.view.addHoverDom, [setting.treeId, node]); } }, cancelCurEditNode: function (setting, forceName, isCancel) { var root = data.getRoot(setting), node = root.curEditNode; if (node) { var inputObj = root.curEditInput, newName = forceName ? forceName : (isCancel ? data.nodeName(setting, node) : inputObj.val()); if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) { return false; } data.nodeName(setting, node, newName); var aObj = $$(node, consts.id.A, setting); aObj.removeClass(consts.node.CURSELECTED_EDIT); inputObj.unbind(); view.setNodeName(setting, node); node.editNameFlag = false; root.curEditNode = null; root.curEditInput = null; view.selectNode(setting, node, false); setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); } root.noSelection = true; return true; }, editNode: function (setting, node) { var root = data.getRoot(setting); view.editNodeBlur = false; if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) { setTimeout(function () { tools.inputFocus(root.curEditInput); }, 0); return; } node.editNameFlag = true; view.removeTreeDom(setting, node); view.cancelCurEditNode(setting); view.selectNode(setting, node, false); $$(node, consts.id.SPAN, setting).html("<input type=text class='rename' id='" + node.tId + consts.id.INPUT + "' treeNode" + consts.id.INPUT + " >"); var inputObj = $$(node, consts.id.INPUT, setting); inputObj.attr("value", data.nodeName(setting, node)); if (setting.edit.editNameSelectAll) { tools.inputSelect(inputObj); } else { tools.inputFocus(inputObj); } inputObj.bind('blur', function (event) { if (!view.editNodeBlur) { view.cancelCurEditNode(setting); } }).bind('keydown', function (event) { if (event.keyCode == "13") { view.editNodeBlur = true; view.cancelCurEditNode(setting); } else if (event.keyCode == "27") { view.cancelCurEditNode(setting, null, true); } }).bind('click', function (event) { return false; }).bind('dblclick', function (event) { return false; }); $$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED_EDIT); root.curEditInput = inputObj; root.noSelection = false; root.curEditNode = node; }, moveNode: function (setting, targetNode, node, moveType, animateFlag, isSilent) { var root = data.getRoot(setting); if (targetNode == node) return; if (setting.data.keep.leaf && targetNode && !data.nodeIsParent(setting, targetNode) && moveType == consts.move.TYPE_INNER) return; var oldParentNode = (node.parentTId ? node.getParentNode() : root), targetNodeIsRoot = (targetNode === null || targetNode == root); if (targetNodeIsRoot && targetNode === null) targetNode = root; if (targetNodeIsRoot) moveType = consts.move.TYPE_INNER; var targetParentNode = (targetNode.parentTId ? targetNode.getParentNode() : root); if (moveType != consts.move.TYPE_PREV && moveType != consts.move.TYPE_NEXT) { moveType = consts.move.TYPE_INNER; } if (moveType == consts.move.TYPE_INNER) { if (targetNodeIsRoot) { //parentTId of root node is null node.parentTId = null; } else { if (!data.nodeIsParent(setting, targetNode)) { data.nodeIsParent(setting, targetNode, true); targetNode.open = !!targetNode.open; view.setNodeLineIcos(setting, targetNode); } node.parentTId = targetNode.tId; } } //move node Dom var targetObj, target_ulObj; if (targetNodeIsRoot) { targetObj = setting.treeObj; target_ulObj = targetObj; } else { if (!isSilent && moveType == consts.move.TYPE_INNER) { view.expandCollapseNode(setting, targetNode, true, false); } else if (!isSilent) { view.expandCollapseNode(setting, targetNode.getParentNode(), true, false); } targetObj = $$(targetNode, setting); target_ulObj = $$(targetNode, consts.id.UL, setting); if (!!targetObj.get(0) && !target_ulObj.get(0)) { var ulstr = []; view.makeUlHtml(setting, targetNode, ulstr, ''); targetObj.append(ulstr.join('')); } target_ulObj = $$(targetNode, consts.id.UL, setting); } var nodeDom = $$(node, setting); if (!nodeDom.get(0)) { nodeDom = view.appendNodes(setting, node.level, [node], null, -1, false, true).join(''); } else if (!targetObj.get(0)) { nodeDom.remove(); } if (target_ulObj.get(0) && moveType == consts.move.TYPE_INNER) { target_ulObj.append(nodeDom); } else if (targetObj.get(0) && moveType == consts.move.TYPE_PREV) { targetObj.before(nodeDom); } else if (targetObj.get(0) && moveType == consts.move.TYPE_NEXT) { targetObj.after(nodeDom); } //repair the data after move var i, l, tmpSrcIndex = -1, tmpTargetIndex = 0, oldNeighbor = null, newNeighbor = null, oldLevel = node.level; var oldChildren = data.nodeChildren(setting, oldParentNode); var targetParentChildren = data.nodeChildren(setting, targetParentNode); var targetChildren = data.nodeChildren(setting, targetNode); if (node.isFirstNode) { tmpSrcIndex = 0; if (oldChildren.length > 1) { oldNeighbor = oldChildren[1]; oldNeighbor.isFirstNode = true; } } else if (node.isLastNode) { tmpSrcIndex = oldChildren.length - 1; oldNeighbor = oldChildren[tmpSrcIndex - 1]; oldNeighbor.isLastNode = true; } else { for (i = 0, l = oldChildren.length; i < l; i++) { if (oldChildren[i].tId == node.tId) { tmpSrcIndex = i; break; } } } if (tmpSrcIndex >= 0) { oldChildren.splice(tmpSrcIndex, 1); } if (moveType != consts.move.TYPE_INNER) { for (i = 0, l = targetParentChildren.length; i < l; i++) { if (targetParentChildren[i].tId == targetNode.tId) tmpTargetIndex = i; } } if (moveType == consts.move.TYPE_INNER) { if (!targetChildren) { targetChildren = data.nodeChildren(setting, targetNode, []); } if (targetChildren.length > 0) { newNeighbor = targetChildren[targetChildren.length - 1]; newNeighbor.isLastNode = false; } targetChildren.splice(targetChildren.length, 0, node); node.isLastNode = true; node.isFirstNode = (targetChildren.length == 1); } else if (targetNode.isFirstNode && moveType == consts.move.TYPE_PREV) { targetParentChildren.splice(tmpTargetIndex, 0, node); newNeighbor = targetNode; newNeighbor.isFirstNode = false; node.parentTId = targetNode.parentTId; node.isFirstNode = true; node.isLastNode = false; } else if (targetNode.isLastNode && moveType == consts.move.TYPE_NEXT) { targetParentChildren.splice(tmpTargetIndex + 1, 0, node); newNeighbor = targetNode; newNeighbor.isLastNode = false; node.parentTId = targetNode.parentTId; node.isFirstNode = false; node.isLastNode = true; } else { if (moveType == consts.move.TYPE_PREV) { targetParentChildren.splice(tmpTargetIndex, 0, node); } else { targetParentChildren.splice(tmpTargetIndex + 1, 0, node); } node.parentTId = targetNode.parentTId; node.isFirstNode = false; node.isLastNode = false; } data.fixPIdKeyValue(setting, node); data.setSonNodeLevel(setting, node.getParentNode(), node); //repair node what been moved view.setNodeLineIcos(setting, node); view.repairNodeLevelClass(setting, node, oldLevel); //repair node's old parentNode dom if (!setting.data.keep.parent && oldChildren.length < 1) { //old parentNode has no child nodes data.nodeIsParent(setting, oldParentNode, false); oldParentNode.open = false; var tmp_ulObj = $$(oldParentNode, consts.id.UL, setting), tmp_switchObj = $$(oldParentNode, consts.id.SWITCH, setting), tmp_icoObj = $$(oldParentNode, consts.id.ICON, setting); view.replaceSwitchClass(oldParentNode, tmp_switchObj, consts.folder.DOCU); view.replaceIcoClass(oldParentNode, tmp_icoObj, consts.folder.DOCU); tmp_ulObj.css("display", "none"); } else if (oldNeighbor) { //old neighbor node view.setNodeLineIcos(setting, oldNeighbor); } //new neighbor node if (newNeighbor) { view.setNodeLineIcos(setting, newNeighbor); } //repair checkbox / radio if (!!setting.check && setting.check.enable && view.repairChkClass) { view.repairChkClass(setting, oldParentNode); view.repairParentChkClassWithSelf(setting, oldParentNode); if (oldParentNode != node.parent) view.repairParentChkClassWithSelf(setting, node); } //expand parents after move if (!isSilent) { view.expandCollapseParentNode(setting, node.getParentNode(), true, animateFlag); } }, removeEditBtn: function (setting, node) { $$(node, consts.id.EDIT, setting).unbind().remove(); }, removeRemoveBtn: function (setting, node) { $$(node, consts.id.REMOVE, setting).unbind().remove(); }, removeTreeDom: function (setting, node) { node.isHover = false; view.removeEditBtn(setting, node); view.removeRemoveBtn(setting, node); tools.apply(setting.view.removeHoverDom, [setting.treeId, node]); }, repairNodeLevelClass: function (setting, node, oldLevel) { if (oldLevel === node.level) return; var liObj = $$(node, setting), aObj = $$(node, consts.id.A, setting), ulObj = $$(node, consts.id.UL, setting), oldClass = consts.className.LEVEL + oldLevel, newClass = consts.className.LEVEL + node.level; liObj.removeClass(oldClass); liObj.addClass(newClass); aObj.removeClass(oldClass); aObj.addClass(newClass); ulObj.removeClass(oldClass); ulObj.addClass(newClass); }, selectNodes: function (setting, nodes) { for (var i = 0, l = nodes.length; i < l; i++) { view.selectNode(setting, nodes[i], i > 0); } } }, _z = { tools: _tools, view: _view, event: _event, data: _data }; $.extend(true, $.fn.zTree.consts, _consts); $.extend(true, $.fn.zTree._z, _z); var zt = $.fn.zTree, tools = zt._z.tools, consts = zt.consts, view = zt._z.view, data = zt._z.data, event = zt._z.event, $$ = tools.$; data.exSetting(_setting); data.addInitBind(_bindEvent); data.addInitUnBind(_unbindEvent); data.addInitCache(_initCache); data.addInitNode(_initNode); data.addInitProxy(_eventProxy); data.addInitRoot(_initRoot); data.addZTreeTools(_zTreeTools); var _cancelPreSelectedNode = view.cancelPreSelectedNode; view.cancelPreSelectedNode = function (setting, node) { var list = data.getRoot(setting).curSelectedList; for (var i = 0, j = list.length; i < j; i++) { if (!node || node === list[i]) { view.removeTreeDom(setting, list[i]); if (node) break; } } if (_cancelPreSelectedNode) _cancelPreSelectedNode.apply(view, arguments); } var _createNodes = view.createNodes; view.createNodes = function (setting, level, nodes, parentNode, index) { if (_createNodes) { _createNodes.apply(view, arguments); } if (!nodes) return; if (view.repairParentChkClassWithSelf) { view.repairParentChkClassWithSelf(setting, parentNode); } } var _makeNodeUrl = view.makeNodeUrl; view.makeNodeUrl = function (setting, node) { return setting.edit.enable ? null : (_makeNodeUrl.apply(view, arguments)); } var _removeNode = view.removeNode; view.removeNode = function (setting, node) { var root = data.getRoot(setting); if (root.curEditNode === node) root.curEditNode = null; if (_removeNode) { _removeNode.apply(view, arguments); } } var _selectNode = view.selectNode; view.selectNode = function (setting, node, addFlag) { var root = data.getRoot(setting); if (data.isSelectedNode(setting, node) && root.curEditNode == node && node.editNameFlag) { return false; } if (_selectNode) _selectNode.apply(view, arguments); view.addHoverDom(setting, node); return true; } var _uCanDo = tools.uCanDo; tools.uCanDo = function (setting, e) { var root = data.getRoot(setting); if (e && (tools.eqs(e.type, "mouseover") || tools.eqs(e.type, "mouseout") || tools.eqs(e.type, "mousedown") || tools.eqs(e.type, "mouseup"))) { return true; } if (root.curEditNode) { view.editNodeBlur = false; root.curEditInput.focus(); } return (!root.curEditNode) && (_uCanDo ? _uCanDo.apply(view, arguments) : true); } })(jQuery); /***/ }), /***/ "f5df": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee"); var isCallable = __webpack_require__("1626"); var classofRaw = __webpack_require__("c6b6"); var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var Object = global.Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; /***/ }), /***/ "f772": /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__("5692"); var uid = __webpack_require__("90e3"); var keys = shared('keys'); module.exports = function (key) { return keys[key] || (keys[key] = uid(key)); }; /***/ }), /***/ "fb15": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js // This file is imported into lib/wc client bundles. if (typeof window !== 'undefined') { var currentScript = window.document.currentScript if (true) { var getCurrentScript = __webpack_require__("8875") currentScript = getCurrentScript() // for backward compatibility, because previously we directly included the polyfill if (!('currentScript' in document)) { Object.defineProperty(document, 'currentScript', { get: getCurrentScript }) } } var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/) if (src) { __webpack_require__.p = src[1] // eslint-disable-line } } // Indicate to webpack that this file can be concatenated /* harmony default export */ var setPublicPath = (null); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5788c3ac-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ztree.vue?vue&type=template&id=2deb67ae&scoped=true& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ztree",attrs:{"id":_vm.ztreeId}})} var staticRenderFns = [] // CONCATENATED MODULE: ./src/components/ztree.vue?vue&type=template&id=2deb67ae&scoped=true& // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js var es_array_concat = __webpack_require__("99af"); // EXTERNAL MODULE: ./node_modules/jquery/dist/jquery.js var jquery = __webpack_require__("1157"); // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ztree.vue?vue&type=script&lang=js& // // // // var $ = jquery; if (window.jQuery) { $ = window.jQuery; } else { window.jQuery = $; } __webpack_require__("a632"); __webpack_require__("43b2"); __webpack_require__("effb"); __webpack_require__("5aa5"); /* harmony default export */ var ztreevue_type_script_lang_js_ = ({ props: { setting: { type: Object, require: false, default: function _default() { return {}; } }, nodes: { type: Array, require: true, default: function _default() { return []; } } }, data: function data() { var _this = this; return { ztreeId: "ztree_" + parseInt(Math.random() * 1e10), ztreeObj: null, list: [], ztreeSetting: { view: { showIcon: false // default to hide icon }, callback: { onAsyncError: function onAsyncError() { for (var _len = arguments.length, arg = new Array(_len), _key = 0; _key < _len; _key++) { arg[_key] = arguments[_key]; } _this.$emit.apply(_this, ["onAsyncError"].concat(arg)); }, onAsyncSuccess: function onAsyncSuccess() { for (var _len2 = arguments.length, arg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { arg[_key2] = arguments[_key2]; } _this.$emit.apply(_this, ["onAsyncSuccess"].concat(arg)); }, onCheck: function onCheck() { for (var _len3 = arguments.length, arg = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { arg[_key3] = arguments[_key3]; } _this.$emit.apply(_this, ["onCheck"].concat(arg)); }, onClick: function onClick() { for (var _len4 = arguments.length, arg = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { arg[_key4] = arguments[_key4]; } _this.$emit.apply(_this, ["onClick"].concat(arg)); }, onCollapse: function onCollapse() { for (var _len5 = arguments.length, arg = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { arg[_key5] = arguments[_key5]; } _this.$emit.apply(_this, ["onCollapse"].concat(arg)); }, onDblClick: function onDblClick() { for (var _len6 = arguments.length, arg = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { arg[_key6] = arguments[_key6]; } _this.$emit.apply(_this, ["onDblClick"].concat(arg)); }, onDrag: function onDrag() { for (var _len7 = arguments.length, arg = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { arg[_key7] = arguments[_key7]; } _this.$emit.apply(_this, ["onDrag"].concat(arg)); }, onDragMove: function onDragMove() { for (var _len8 = arguments.length, arg = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { arg[_key8] = arguments[_key8]; } _this.$emit.apply(_this, ["onDragMove"].concat(arg)); }, onDrop: function onDrop() { for (var _len9 = arguments.length, arg = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { arg[_key9] = arguments[_key9]; } _this.$emit.apply(_this, ["onDrop"].concat(arg)); }, onExpand: function onExpand() { for (var _len10 = arguments.length, arg = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { arg[_key10] = arguments[_key10]; } _this.$emit.apply(_this, ["onExpand"].concat(arg)); }, onMouseDown: function onMouseDown() { for (var _len11 = arguments.length, arg = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) { arg[_key11] = arguments[_key11]; } _this.$emit.apply(_this, ["onMouseDown"].concat(arg)); }, onMouseUp: function onMouseUp() { for (var _len12 = arguments.length, arg = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) { arg[_key12] = arguments[_key12]; } _this.$emit.apply(_this, ["onMouseUp"].concat(arg)); }, onRemove: function onRemove() { for (var _len13 = arguments.length, arg = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) { arg[_key13] = arguments[_key13]; } _this.$emit.apply(_this, ["onRemove"].concat(arg)); }, onRename: function onRename() { for (var _len14 = arguments.length, arg = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) { arg[_key14] = arguments[_key14]; } _this.$emit.apply(_this, ["onRename"].concat(arg)); }, onRightClick: function onRightClick() { for (var _len15 = arguments.length, arg = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) { arg[_key15] = arguments[_key15]; } _this.$emit.apply(_this, ["onRightClick"].concat(arg)); } } } }; }, watch: { nodes: { handler: function handler(nodes) { var _this2 = this; this.list = nodes; // update tree if (this.ztreeObj) { this.ztreeObj.destroy(); } this.$nextTick(function () { _this2.ztreeObj = $.fn.zTree.init($("#" + _this2.ztreeId), Object.assign({}, _this2.ztreeSetting, _this2.setting), _this2.list); _this2.$emit("onCreated", _this2.ztreeObj); }); }, deep: true, immediate: true } } }); // CONCATENATED MODULE: ./src/components/ztree.vue?vue&type=script&lang=js& /* harmony default export */ var components_ztreevue_type_script_lang_js_ = (ztreevue_type_script_lang_js_); // EXTERNAL MODULE: ./src/components/ztree.vue?vue&type=style&index=0&id=2deb67ae&scoped=true&lang=css& var ztreevue_type_style_index_0_id_2deb67ae_scoped_true_lang_css_ = __webpack_require__("3089"); // EXTERNAL MODULE: ./src/components/ztree.vue?vue&type=style&index=1&lang=css& var ztreevue_type_style_index_1_lang_css_ = __webpack_require__("8f68"); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call( this, (options.functional ? this.parent : this).$root.$options.shadowRoot ) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functional component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } } // CONCATENATED MODULE: ./src/components/ztree.vue /* normalize component */ var component = normalizeComponent( components_ztreevue_type_script_lang_js_, render, staticRenderFns, false, null, "2deb67ae", null ) /* harmony default export */ var ztree = (component.exports); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (ztree); /***/ }), /***/ "fc6a": /***/ (function(module, exports, __webpack_require__) { // toObject with fallback for non-array-like ES3 strings var IndexedObject = __webpack_require__("44ad"); var requireObjectCoercible = __webpack_require__("1d80"); module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; /***/ }), /***/ "fdbf": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL = __webpack_require__("4930"); module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol'; /***/ }) /******/ })["default"]; //# sourceMappingURL=tnt-vue-ztree.common.js.map
import React, { Component } from 'react'; import Slick from 'react-slick'; import '../../../node_modules/slick-carousel/slick/slick-theme.css'; import '../../../node_modules/slick-carousel/slick/slick.css'; import './style.scss'; const defaultSettings = { adaptiveHeight: true, arrows: false, dots: true, infinite: true, lazyLoad: true, speed: 500, slidesToShow: 1, slidesToScroll: 1, fade: true } class Carousel extends Component { render() { const { settings, children, getRef = () => ({}), ...props } = this.props const blendedSettings = { ...defaultSettings, ...settings } return ( <Slick {...blendedSettings} ref={slider => getRef(slider)} > { children } </Slick> ) } } export default Carousel
const {GuildMember} = require('discord.js'); module.exports = { name: 'resume', description: 'Resume current song!', async execute(interaction, player) { if (!(interaction.member instanceof GuildMember) || !interaction.member.voice.channel) { return void interaction.reply({ content: 'Você não esta em nenhum canal de voz', ephemeral: true, }); } if ( interaction.guild.me.voice.channelId && interaction.member.voice.channelId !== interaction.guild.me.voice.channelId ) { return void interaction.reply({ content: 'Você não esta em nenhum canal de voz', ephemeral: true, }); } await interaction.deferReply(); const queue = player.getQueue(interaction.guildId); if (!queue || !queue.playing) return void interaction.followUp({content: '❌ | Nenhuma música está sendo tocada!'}); const success = queue.setPaused(false); return void interaction.followUp({ content: success ? '▶️ | Continuando!' : '❌ | Algo deu errado!', }); }, };
!function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};n.m=t,n.c=r,n.i=function(t){return t},n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=4)}([function(t,n,r){t.exports=r(2)},function(t,n,r){"use strict"},function(t,n,r){"use strict";t.exports=r(3)},function(t,n,r){"use strict"},function(t,n,r){r(0),t.exports=r(1)}]);
module.exports = { siteMetadata: { title: `Pandas Eating Lots`, description: `A simple description about pandas eating lots...`, author: `gatsbyjs`, }, plugins: [ { resolve: `gatsby-source-filesystem`, options: { name: `src`, path: `${__dirname}/src/`, }, }, `gatsby-transformer-remark`, `gatsby-plugin-emotion`, { resolve: `gatsby-plugin-typography`, options: { pathToConfigModule: `src/utils/typography`, }, }, { resolve: `gatsby-plugin-manifest`, options: { name: `GatsbyJS`, short_name: `GatsbyJS`, start_url: `/`, background_color: `#6b37bf`, theme_color: `#6b37bf`, // Enables "Add to Homescreen" prompt and disables browser UI (including back button) // see https://developers.google.com/web/fundamentals/web-app-manifest/#display display: `standalone`, icon: `src/images/icon.png`, // This path is relative to the root of the site. }, }, `gatsby-plugin-offline`, `gatsby-plugin-react-helmet`, ], }
(()=>{var Ui=Object.defineProperty;var Ln=i=>Ui(i,"__esModule",{value:!0});var $n=(i,t)=>{Ln(i);for(var e in t)Ui(i,e,{get:t[e],enumerable:!0})};var We={};$n(We,{afterMain:()=>Zi,afterRead:()=>Gi,afterWrite:()=>es,applyStyles:()=>Yt,arrow:()=>Ie,auto:()=>ee,basePlacements:()=>rt,beforeMain:()=>Xi,beforeRead:()=>zi,beforeWrite:()=>Ji,bottom:()=>P,clippingParents:()=>oi,computeStyles:()=>Ft,createPopper:()=>Be,createPopperBase:()=>cs,createPopperLite:()=>fs,detectOverflow:()=>B,end:()=>ie,eventListeners:()=>Ut,flip:()=>Me,hide:()=>ke,left:()=>D,main:()=>Qi,modifierPhases:()=>ai,offset:()=>Ve,placements:()=>ne,popper:()=>Tt,popperGenerator:()=>Ct,popperOffsets:()=>Gt,preventOverflow:()=>He,read:()=>qi,reference:()=>ri,right:()=>C,start:()=>J,top:()=>w,variationPlacements:()=>$e,viewport:()=>se,write:()=>ts});var w="top",P="bottom",C="right",D="left",ee="auto",rt=[w,P,C,D],J="start",ie="end",oi="clippingParents",se="viewport",Tt="popper",ri="reference",$e=rt.reduce(function(i,t){return i.concat([t+"-"+J,t+"-"+ie])},[]),ne=[].concat(rt,[ee]).reduce(function(i,t){return i.concat([t,t+"-"+J,t+"-"+ie])},[]),zi="beforeRead",qi="read",Gi="afterRead",Xi="beforeMain",Qi="main",Zi="afterMain",Ji="beforeWrite",ts="write",es="afterWrite",ai=[zi,qi,Gi,Xi,Qi,Zi,Ji,ts,es];function I(i){return i?(i.nodeName||"").toLowerCase():null}function S(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function at(i){var t=S(i).Element;return i instanceof t||i instanceof Element}function L(i){var t=S(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function Pe(i){if(typeof ShadowRoot=="undefined")return!1;var t=S(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function Pn(i){var t=i.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];!L(o)||!I(o)||(Object.assign(o.style,s),Object.keys(n).forEach(function(r){var a=n[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function In(i){var t=i.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var n=t.elements[s],o=t.attributes[s]||{},r=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),a=r.reduce(function(c,u){return c[u]="",c},{});!L(n)||!I(n)||(Object.assign(n.style,a),Object.keys(o).forEach(function(c){n.removeAttribute(c)}))})}}var Yt={name:"applyStyles",enabled:!0,phase:"write",fn:Pn,effect:In,requires:["computeStyles"]};function x(i){return i.split("-")[0]}var ct=Math.round;function U(i,t){t===void 0&&(t=!1);var e=i.getBoundingClientRect(),s=1,n=1;return L(i)&&t&&(s=e.width/i.offsetWidth||1,n=e.height/i.offsetHeight||1),{width:ct(e.width/s),height:ct(e.height/n),top:ct(e.top/n),right:ct(e.right/s),bottom:ct(e.bottom/n),left:ct(e.left/s),x:ct(e.left/s),y:ct(e.top/n)}}function At(i){var t=U(i),e=i.offsetWidth,s=i.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:i.offsetLeft,y:i.offsetTop,width:e,height:s}}function oe(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&Pe(e)){var s=t;do{if(s&&i.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function H(i){return S(i).getComputedStyle(i)}function li(i){return["table","td","th"].indexOf(I(i))>=0}function R(i){return((at(i)?i.ownerDocument:i.document)||window.document).documentElement}function lt(i){return I(i)==="html"?i:i.assignedSlot||i.parentNode||(Pe(i)?i.host:null)||R(i)}function is(i){return!L(i)||H(i).position==="fixed"?null:i.offsetParent}function xn(i){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,e=navigator.userAgent.indexOf("Trident")!==-1;if(e&&L(i)){var s=H(i);if(s.position==="fixed")return null}for(var n=lt(i);L(n)&&["html","body"].indexOf(I(n))<0;){var o=H(n);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return n;n=n.parentNode}return null}function Q(i){for(var t=S(i),e=is(i);e&&li(e)&&H(e).position==="static";)e=is(e);return e&&(I(e)==="html"||I(e)==="body"&&H(e).position==="static")?t:e||xn(i)||t}function yt(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}var z=Math.max,ft=Math.min,re=Math.round;function Ot(i,t,e){return z(i,ft(t,e))}function ae(){return{top:0,right:0,bottom:0,left:0}}function le(i){return Object.assign({},ae(),i)}function ce(i,t){return t.reduce(function(e,s){return e[s]=i,e},{})}var jn=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,le(typeof t!="number"?t:ce(t,rt))};function Rn(i){var t,e=i.state,s=i.name,n=i.options,o=e.elements.arrow,r=e.modifiersData.popperOffsets,a=x(e.placement),c=yt(a),u=[D,C].indexOf(a)>=0,f=u?"height":"width";if(!(!o||!r)){var d=jn(n.padding,e),h=At(o),_=c==="y"?w:D,g=c==="y"?P:C,E=e.rects.reference[f]+e.rects.reference[c]-r[c]-e.rects.popper[f],v=r[c]-e.rects.reference[c],N=Q(o),T=N?c==="y"?N.clientHeight||0:N.clientWidth||0:0,$=E/2-v/2,m=d[_],y=T-h[f]-d[g],b=T/2-h[f]/2+$,O=Ot(m,b,y),A=c;e.modifiersData[s]=(t={},t[A]=O,t.centerOffset=O-b,t)}}function Mn(i){var t=i.state,e=i.options,s=e.element,n=s===void 0?"[data-popper-arrow]":s;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||!oe(t.elements.popper,n)||(t.elements.arrow=n))}var Ie={name:"arrow",enabled:!0,phase:"main",fn:Rn,effect:Mn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var kn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vn(i){var t=i.x,e=i.y,s=window,n=s.devicePixelRatio||1;return{x:re(re(t*n)/n)||0,y:re(re(e*n)/n)||0}}function ss(i){var t,e=i.popper,s=i.popperRect,n=i.placement,o=i.offsets,r=i.position,a=i.gpuAcceleration,c=i.adaptive,u=i.roundOffsets,f=u===!0?Vn(o):typeof u=="function"?u(o):o,d=f.x,h=d===void 0?0:d,_=f.y,g=_===void 0?0:_,E=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),N=D,T=w,$=window;if(c){var m=Q(e),y="clientHeight",b="clientWidth";m===S(e)&&(m=R(e),H(m).position!=="static"&&(y="scrollHeight",b="scrollWidth")),m=m,n===w&&(T=P,g-=m[y]-s.height,g*=a?1:-1),n===D&&(N=C,h-=m[b]-s.width,h*=a?1:-1)}var O=Object.assign({position:r},c&&kn);if(a){var A;return Object.assign({},O,(A={},A[T]=v?"0":"",A[N]=E?"0":"",A.transform=($.devicePixelRatio||1)<2?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",A))}return Object.assign({},O,(t={},t[T]=v?g+"px":"",t[N]=E?h+"px":"",t.transform="",t))}function Hn(i){var t=i.state,e=i.options,s=e.gpuAcceleration,n=s===void 0?!0:s,o=e.adaptive,r=o===void 0?!0:o,a=e.roundOffsets,c=a===void 0?!0:a;if(!1)var u;var f={placement:x(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ss(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ss(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ft={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hn,data:{}};var xe={passive:!0};function Bn(i){var t=i.state,e=i.instance,s=i.options,n=s.scroll,o=n===void 0?!0:n,r=s.resize,a=r===void 0?!0:r,c=S(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(f){f.addEventListener("scroll",e.update,xe)}),a&&c.addEventListener("resize",e.update,xe),function(){o&&u.forEach(function(f){f.removeEventListener("scroll",e.update,xe)}),a&&c.removeEventListener("resize",e.update,xe)}}var Ut={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bn,data:{}};var Wn={left:"right",right:"left",bottom:"top",top:"bottom"};function zt(i){return i.replace(/left|right|bottom|top/g,function(t){return Wn[t]})}var Kn={start:"end",end:"start"};function je(i){return i.replace(/start|end/g,function(t){return Kn[t]})}function wt(i){var t=S(i),e=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:e,scrollTop:s}}function St(i){return U(R(i)).left+wt(i).scrollLeft}function ci(i){var t=S(i),e=R(i),s=t.visualViewport,n=e.clientWidth,o=e.clientHeight,r=0,a=0;return s&&(n=s.width,o=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=s.offsetLeft,a=s.offsetTop)),{width:n,height:o,x:r+St(i),y:a}}function fi(i){var t,e=R(i),s=wt(i),n=(t=i.ownerDocument)==null?void 0:t.body,o=z(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=z(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-s.scrollLeft+St(i),c=-s.scrollTop;return H(n||e).direction==="rtl"&&(a+=z(e.clientWidth,n?n.clientWidth:0)-o),{width:o,height:r,x:a,y:c}}function Nt(i){var t=H(i),e=t.overflow,s=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+n+s)}function Re(i){return["html","body","#document"].indexOf(I(i))>=0?i.ownerDocument.body:L(i)&&Nt(i)?i:Re(lt(i))}function ut(i,t){var e;t===void 0&&(t=[]);var s=Re(i),n=s===((e=i.ownerDocument)==null?void 0:e.body),o=S(s),r=n?[o].concat(o.visualViewport||[],Nt(s)?s:[]):s,a=t.concat(r);return n?a:a.concat(ut(lt(r)))}function qt(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Yn(i){var t=U(i);return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function ns(i,t){return t===se?qt(ci(i)):L(t)?Yn(t):qt(fi(R(i)))}function Fn(i){var t=ut(lt(i)),e=["absolute","fixed"].indexOf(H(i).position)>=0,s=e&&L(i)?Q(i):i;return at(s)?t.filter(function(n){return at(n)&&oe(n,s)&&I(n)!=="body"}):[]}function ui(i,t,e){var s=t==="clippingParents"?Fn(i):[].concat(t),n=[].concat(s,[e]),o=n[0],r=n.reduce(function(a,c){var u=ns(i,c);return a.top=z(u.top,a.top),a.right=ft(u.right,a.right),a.bottom=ft(u.bottom,a.bottom),a.left=z(u.left,a.left),a},ns(i,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function tt(i){return i.split("-")[1]}function fe(i){var t=i.reference,e=i.element,s=i.placement,n=s?x(s):null,o=s?tt(s):null,r=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,c;switch(n){case w:c={x:r,y:t.y-e.height};break;case P:c={x:r,y:t.y+t.height};break;case C:c={x:t.x+t.width,y:a};break;case D:c={x:t.x-e.width,y:a};break;default:c={x:t.x,y:t.y}}var u=n?yt(n):null;if(u!=null){var f=u==="y"?"height":"width";switch(o){case J:c[u]=c[u]-(t[f]/2-e[f]/2);break;case ie:c[u]=c[u]+(t[f]/2-e[f]/2);break;default:}}return c}function B(i,t){t===void 0&&(t={});var e=t,s=e.placement,n=s===void 0?i.placement:s,o=e.boundary,r=o===void 0?oi:o,a=e.rootBoundary,c=a===void 0?se:a,u=e.elementContext,f=u===void 0?Tt:u,d=e.altBoundary,h=d===void 0?!1:d,_=e.padding,g=_===void 0?0:_,E=le(typeof g!="number"?g:ce(g,rt)),v=f===Tt?ri:Tt,N=i.elements.reference,T=i.rects.popper,$=i.elements[h?v:f],m=ui(at($)?$:$.contextElement||R(i.elements.popper),r,c),y=U(N),b=fe({reference:y,element:T,strategy:"absolute",placement:n}),O=qt(Object.assign({},T,b)),A=f===Tt?O:y,k={top:m.top-A.top+E.top,bottom:A.bottom-m.bottom+E.bottom,left:m.left-A.left+E.left,right:A.right-m.right+E.right},j=i.modifiersData.offset;if(f===Tt&&j){var V=j[n];Object.keys(k).forEach(function(ot){var W=[C,P].indexOf(ot)>=0?1:-1,Et=[w,P].indexOf(ot)>=0?"y":"x";k[ot]+=V[Et]*W})}return k}function di(i,t){t===void 0&&(t={});var e=t,s=e.placement,n=e.boundary,o=e.rootBoundary,r=e.padding,a=e.flipVariations,c=e.allowedAutoPlacements,u=c===void 0?ne:c,f=tt(s),d=f?a?$e:$e.filter(function(g){return tt(g)===f}):rt,h=d.filter(function(g){return u.indexOf(g)>=0});h.length===0&&(h=d);var _=h.reduce(function(g,E){return g[E]=B(i,{placement:E,boundary:n,rootBoundary:o,padding:r})[x(E)],g},{});return Object.keys(_).sort(function(g,E){return _[g]-_[E]})}function Un(i){if(x(i)===ee)return[];var t=zt(i);return[je(i),t,je(t)]}function zn(i){var t=i.state,e=i.options,s=i.name;if(!t.modifiersData[s]._skip){for(var n=e.mainAxis,o=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!0:r,c=e.fallbackPlacements,u=e.padding,f=e.boundary,d=e.rootBoundary,h=e.altBoundary,_=e.flipVariations,g=_===void 0?!0:_,E=e.allowedAutoPlacements,v=t.options.placement,N=x(v),T=N===v,$=c||(T||!g?[zt(v)]:Un(v)),m=[v].concat($).reduce(function(bt,Z){return bt.concat(x(Z)===ee?di(t,{placement:Z,boundary:f,rootBoundary:d,padding:u,flipVariations:g,allowedAutoPlacements:E}):Z)},[]),y=t.rects.reference,b=t.rects.popper,O=new Map,A=!0,k=m[0],j=0;j<m.length;j++){var V=m[j],ot=x(V),W=tt(V)===J,Et=[w,P].indexOf(ot)>=0,te=Et?"width":"height",Ht=B(t,{placement:V,boundary:f,rootBoundary:d,altBoundary:h,padding:u}),vt=Et?W?C:D:W?P:w;y[te]>b[te]&&(vt=zt(vt));var ei=zt(vt),Bt=[];if(o&&Bt.push(Ht[ot]<=0),a&&Bt.push(Ht[vt]<=0,Ht[ei]<=0),Bt.every(function(bt){return bt})){k=V,A=!1;break}O.set(V,Bt)}if(A)for(var Ne=g?3:1,ii=function(Z){var De=m.find(function(si){var Kt=O.get(si);if(Kt)return Kt.slice(0,Z).every(function(ni){return ni})});if(De)return k=De,"break"},Wt=Ne;Wt>0;Wt--){var Ce=ii(Wt);if(Ce==="break")break}t.placement!==k&&(t.modifiersData[s]._skip=!0,t.placement=k,t.reset=!0)}}var Me={name:"flip",enabled:!0,phase:"main",fn:zn,requiresIfExists:["offset"],data:{_skip:!1}};function os(i,t,e){return e===void 0&&(e={x:0,y:0}),{top:i.top-t.height-e.y,right:i.right-t.width+e.x,bottom:i.bottom-t.height+e.y,left:i.left-t.width-e.x}}function rs(i){return[w,C,P,D].some(function(t){return i[t]>=0})}function qn(i){var t=i.state,e=i.name,s=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,r=B(t,{elementContext:"reference"}),a=B(t,{altBoundary:!0}),c=os(r,s),u=os(a,n,o),f=rs(c),d=rs(u);t.modifiersData[e]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}var ke={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qn};function Gn(i,t,e){var s=x(i),n=[D,w].indexOf(s)>=0?-1:1,o=typeof e=="function"?e(Object.assign({},t,{placement:i})):e,r=o[0],a=o[1];return r=r||0,a=(a||0)*n,[D,C].indexOf(s)>=0?{x:a,y:r}:{x:r,y:a}}function Xn(i){var t=i.state,e=i.options,s=i.name,n=e.offset,o=n===void 0?[0,0]:n,r=ne.reduce(function(f,d){return f[d]=Gn(d,t.rects,o),f},{}),a=r[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[s]=r}var Ve={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Xn};function Qn(i){var t=i.state,e=i.name;t.modifiersData[e]=fe({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Gt={name:"popperOffsets",enabled:!0,phase:"read",fn:Qn,data:{}};function pi(i){return i==="x"?"y":"x"}function Zn(i){var t=i.state,e=i.options,s=i.name,n=e.mainAxis,o=n===void 0?!0:n,r=e.altAxis,a=r===void 0?!1:r,c=e.boundary,u=e.rootBoundary,f=e.altBoundary,d=e.padding,h=e.tether,_=h===void 0?!0:h,g=e.tetherOffset,E=g===void 0?0:g,v=B(t,{boundary:c,rootBoundary:u,padding:d,altBoundary:f}),N=x(t.placement),T=tt(t.placement),$=!T,m=yt(N),y=pi(m),b=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,k=typeof E=="function"?E(Object.assign({},t.rects,{placement:t.placement})):E,j={x:0,y:0};if(!!b){if(o||a){var V=m==="y"?w:D,ot=m==="y"?P:C,W=m==="y"?"height":"width",Et=b[m],te=b[m]+v[V],Ht=b[m]-v[ot],vt=_?-A[W]/2:0,ei=T===J?O[W]:A[W],Bt=T===J?-A[W]:-O[W],Ne=t.elements.arrow,ii=_&&Ne?At(Ne):{width:0,height:0},Wt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ae(),Ce=Wt[V],bt=Wt[ot],Z=Ot(0,O[W],ii[W]),De=$?O[W]/2-vt-Z-Ce-k:ei-Z-Ce-k,si=$?-O[W]/2+vt+Z+bt+k:Bt+Z+bt+k,Kt=t.elements.arrow&&Q(t.elements.arrow),ni=Kt?m==="y"?Kt.clientTop||0:Kt.clientLeft||0:0,Vi=t.modifiersData.offset?t.modifiersData.offset[t.placement][m]:0,Hi=b[m]+De-Vi-ni,Bi=b[m]+si-Vi;if(o){var Wi=Ot(_?ft(te,Hi):te,Et,_?z(Ht,Bi):Ht);b[m]=Wi,j[m]=Wi-Et}if(a){var Cn=m==="x"?w:D,Dn=m==="x"?P:C,Le=b[y],Ki=Le+v[Cn],Yi=Le-v[Dn],Fi=Ot(_?ft(Ki,Hi):Ki,Le,_?z(Yi,Bi):Yi);b[y]=Fi,j[y]=Fi-Le}}t.modifiersData[s]=j}}var He={name:"preventOverflow",enabled:!0,phase:"main",fn:Zn,requiresIfExists:["offset"]};function hi(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function mi(i){return i===S(i)||!L(i)?wt(i):hi(i)}function Jn(i){var t=i.getBoundingClientRect(),e=t.width/i.offsetWidth||1,s=t.height/i.offsetHeight||1;return e!==1||s!==1}function _i(i,t,e){e===void 0&&(e=!1);var s=L(t),n=L(t)&&Jn(t),o=R(t),r=U(i,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!e)&&((I(t)!=="body"||Nt(o))&&(a=mi(t)),L(t)?(c=U(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=St(o))),{x:r.left+a.scrollLeft-c.x,y:r.top+a.scrollTop-c.y,width:r.width,height:r.height}}function to(i){var t=new Map,e=new Set,s=[];i.forEach(function(o){t.set(o.name,o)});function n(o){e.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!e.has(a)){var c=t.get(a);c&&n(c)}}),s.push(o)}return i.forEach(function(o){e.has(o.name)||n(o)}),s}function gi(i){var t=to(i);return ai.reduce(function(e,s){return e.concat(t.filter(function(n){return n.phase===s}))},[])}function Ei(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function vi(i){var t=i.reduce(function(e,s){var n=e[s.name];return e[s.name]=n?Object.assign({},n,s,{options:Object.assign({},n.options,s.options),data:Object.assign({},n.data,s.data)}):s,e},{});return Object.keys(t).map(function(e){return t[e]})}var as={placement:"bottom",modifiers:[],strategy:"absolute"};function ls(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];return!t.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function Ct(i){i===void 0&&(i={});var t=i,e=t.defaultModifiers,s=e===void 0?[]:e,n=t.defaultOptions,o=n===void 0?as:n;return function(a,c,u){u===void 0&&(u=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},as,o),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},d=[],h=!1,_={state:f,setOptions:function(N){E(),f.options=Object.assign({},o,f.options,N),f.scrollParents={reference:at(a)?ut(a):a.contextElement?ut(a.contextElement):[],popper:ut(c)};var T=gi(vi([].concat(s,f.options.modifiers)));if(f.orderedModifiers=T.filter(function(j){return j.enabled}),!1){var $;if(getBasePlacement(f.options.placement)===auto)var m;var y,b,O,A,k}return g(),_.update()},forceUpdate:function(){if(!h){var N=f.elements,T=N.reference,$=N.popper;if(!!ls(T,$)){f.rects={reference:_i(T,Q($),f.options.strategy==="fixed"),popper:At($)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(V){return f.modifiersData[V.name]=Object.assign({},V.data)});for(var m=0,y=0;y<f.orderedModifiers.length;y++){if(f.reset===!0){f.reset=!1,y=-1;continue}var b=f.orderedModifiers[y],O=b.fn,A=b.options,k=A===void 0?{}:A,j=b.name;typeof O=="function"&&(f=O({state:f,options:k,name:j,instance:_})||f)}}}},update:Ei(function(){return new Promise(function(v){_.forceUpdate(),v(f)})}),destroy:function(){E(),h=!0}};if(!ls(a,c))return _;_.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function g(){f.orderedModifiers.forEach(function(v){var N=v.name,T=v.options,$=T===void 0?{}:T,m=v.effect;if(typeof m=="function"){var y=m({state:f,name:N,instance:_,options:$}),b=function(){};d.push(y||b)}})}function E(){d.forEach(function(v){return v()}),d=[]}return _}}var cs=Ct();var eo=[Ut,Gt,Ft,Yt],fs=Ct({defaultModifiers:eo});var io=[Ut,Gt,Ft,Yt,Ve,Me,He,Ie,ke],Be=Ct({defaultModifiers:io});var so=1e6,no=1e3,bi="transitionend",oo=i=>i==null?`${i}`:{}.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase(),ro=i=>{do i+=Math.floor(Math.random()*so);while(document.getElementById(i));return i},us=i=>{let t=i.getAttribute("data-bs-target");if(!t||t==="#"){let e=i.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),t=e&&e!=="#"?e.trim():null}return t},Ti=i=>{let t=us(i);return t&&document.querySelector(t)?t:null},dt=i=>{let t=us(i);return t?document.querySelector(t):null},ao=i=>{if(!i)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(i),s=Number.parseFloat(t),n=Number.parseFloat(e);return!s&&!n?0:(t=t.split(",")[0],e=e.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(e))*no)},ds=i=>{i.dispatchEvent(new Event(bi))},Dt=i=>!i||typeof i!="object"?!1:(typeof i.jquery!="undefined"&&(i=i[0]),typeof i.nodeType!="undefined"),pt=i=>Dt(i)?i.jquery?i[0]:i:typeof i=="string"&&i.length>0?document.querySelector(i):null,et=(i,t,e)=>{Object.keys(e).forEach(s=>{let n=e[s],o=t[s],r=o&&Dt(o)?"element":oo(o);if(!new RegExp(n).test(r))throw new TypeError(`${i.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)})},ue=i=>!Dt(i)||i.getClientRects().length===0?!1:getComputedStyle(i).getPropertyValue("visibility")==="visible",Lt=i=>!i||i.nodeType!==Node.ELEMENT_NODE||i.classList.contains("disabled")?!0:typeof i.disabled!="undefined"?i.disabled:i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false",ps=i=>{if(!document.documentElement.attachShadow)return null;if(typeof i.getRootNode=="function"){let t=i.getRootNode();return t instanceof ShadowRoot?t:null}return i instanceof ShadowRoot?i:i.parentNode?ps(i.parentNode):null},Ke=()=>{},Xt=i=>{i.offsetHeight},hs=()=>{let{jQuery:i}=window;return i&&!document.body.hasAttribute("data-bs-no-jquery")?i:null},Ai=[],lo=i=>{document.readyState==="loading"?(Ai.length||document.addEventListener("DOMContentLoaded",()=>{Ai.forEach(t=>t())}),Ai.push(i)):i()},K=()=>document.documentElement.dir==="rtl",q=i=>{lo(()=>{let t=hs();if(t){let e=i.NAME,s=t.fn[e];t.fn[e]=i.jQueryInterface,t.fn[e].Constructor=i,t.fn[e].noConflict=()=>(t.fn[e]=s,i.jQueryInterface)}})},$t=i=>{typeof i=="function"&&i()},ms=(i,t,e=!0)=>{if(!e){$t(i);return}let s=5,n=ao(t)+s,o=!1,r=({target:a})=>{a===t&&(o=!0,t.removeEventListener(bi,r),$t(i))};t.addEventListener(bi,r),setTimeout(()=>{o||ds(t)},n)},_s=(i,t,e,s)=>{let n=i.indexOf(t);if(n===-1)return i[!e&&s?i.length-1:0];let o=i.length;return n+=e?1:-1,s&&(n=(n+o)%o),i[Math.max(0,Math.min(n,o-1))]},co=/[^.]*(?=\..*)\.|.*/,fo=/\..*/,uo=/::\d+$/,yi={},gs=1,po={mouseenter:"mouseover",mouseleave:"mouseout"},ho=/^(mouseenter|mouseleave)/i,Es=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function vs(i,t){return t&&`${t}::${gs++}`||i.uidEvent||gs++}function bs(i){let t=vs(i);return i.uidEvent=t,yi[t]=yi[t]||{},yi[t]}function mo(i,t){return function e(s){return s.delegateTarget=i,e.oneOff&&l.off(i,s.type,t),t.apply(i,[s])}}function _o(i,t,e){return function s(n){let o=i.querySelectorAll(t);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return n.delegateTarget=r,s.oneOff&&l.off(i,n.type,t,e),e.apply(r,[n]);return null}}function Ts(i,t,e=null){let s=Object.keys(i);for(let n=0,o=s.length;n<o;n++){let r=i[s[n]];if(r.originalHandler===t&&r.delegationSelector===e)return r}return null}function As(i,t,e){let s=typeof t=="string",n=s?e:t,o=Os(i);return Es.has(o)||(o=i),[s,n,o]}function ys(i,t,e,s,n){if(typeof t!="string"||!i)return;if(e||(e=s,s=null),ho.test(t)){let _=g=>function(E){if(!E.relatedTarget||E.relatedTarget!==E.delegateTarget&&!E.delegateTarget.contains(E.relatedTarget))return g.call(this,E)};s?s=_(s):e=_(e)}let[o,r,a]=As(t,e,s),c=bs(i),u=c[a]||(c[a]={}),f=Ts(u,r,o?e:null);if(f){f.oneOff=f.oneOff&&n;return}let d=vs(r,t.replace(co,"")),h=o?_o(i,e,s):mo(i,e);h.delegationSelector=o?e:null,h.originalHandler=r,h.oneOff=n,h.uidEvent=d,u[d]=h,i.addEventListener(a,h,o)}function Oi(i,t,e,s,n){let o=Ts(t[e],s,n);!o||(i.removeEventListener(e,o,Boolean(n)),delete t[e][o.uidEvent])}function go(i,t,e,s){let n=t[e]||{};Object.keys(n).forEach(o=>{if(o.includes(s)){let r=n[o];Oi(i,t,e,r.originalHandler,r.delegationSelector)}})}function Os(i){return i=i.replace(fo,""),po[i]||i}var l={on(i,t,e,s){ys(i,t,e,s,!1)},one(i,t,e,s){ys(i,t,e,s,!0)},off(i,t,e,s){if(typeof t!="string"||!i)return;let[n,o,r]=As(t,e,s),a=r!==t,c=bs(i),u=t.startsWith(".");if(typeof o!="undefined"){if(!c||!c[r])return;Oi(i,c,r,o,n?e:null);return}u&&Object.keys(c).forEach(d=>{go(i,c,d,t.slice(1))});let f=c[r]||{};Object.keys(f).forEach(d=>{let h=d.replace(uo,"");if(!a||t.includes(h)){let _=f[d];Oi(i,c,r,_.originalHandler,_.delegationSelector)}})},trigger(i,t,e){if(typeof t!="string"||!i)return null;let s=hs(),n=Os(t),o=t!==n,r=Es.has(n),a,c=!0,u=!0,f=!1,d=null;return o&&s&&(a=s.Event(t,e),s(i).trigger(a),c=!a.isPropagationStopped(),u=!a.isImmediatePropagationStopped(),f=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(n,c,!0)):d=new CustomEvent(t,{bubbles:c,cancelable:!0}),typeof e!="undefined"&&Object.keys(e).forEach(h=>{Object.defineProperty(d,h,{get(){return e[h]}})}),f&&d.preventDefault(),u&&i.dispatchEvent(d),d.defaultPrevented&&typeof a!="undefined"&&a.preventDefault(),d}},ht=new Map,de={set(i,t,e){ht.has(i)||ht.set(i,new Map);let s=ht.get(i);if(!s.has(t)&&s.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`);return}s.set(t,e)},get(i,t){return ht.has(i)&&ht.get(i).get(t)||null},remove(i,t){if(!ht.has(i))return;let e=ht.get(i);e.delete(t),e.size===0&&ht.delete(i)}},Eo="5.1.0",G=class{constructor(t){t=pt(t),!!t&&(this._element=t,de.set(this._element,this.constructor.DATA_KEY,this))}dispose(){de.remove(this._element,this.constructor.DATA_KEY),l.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,s=!0){ms(t,e,s)}static getInstance(t){return de.get(pt(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}static get VERSION(){return Eo}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}},Ye=(i,t="hide")=>{let e=`click.dismiss${i.EVENT_KEY}`,s=i.NAME;l.on(document,e,`[data-bs-dismiss="${s}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Lt(this))return;let o=dt(this)||this.closest(`.${s}`);i.getOrCreateInstance(o)[t]()})},vo="alert",bo="bs.alert",ws=`.${bo}`,To=`close${ws}`,Ao=`closed${ws}`,yo="fade",Oo="show",pe=class extends G{static get NAME(){return vo}close(){if(l.trigger(this._element,To).defaultPrevented)return;this._element.classList.remove(Oo);let e=this._element.classList.contains(yo);this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),l.trigger(this._element,Ao),this.dispose()}static jQueryInterface(t){return this.each(function(){let e=pe.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}};Ye(pe,"close");q(pe);var wo="button",So="bs.button",No=`.${So}`,Co=".data-api",Do="active",Ss='[data-bs-toggle="button"]',Lo=`click${No}${Co}`,he=class extends G{static get NAME(){return wo}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Do))}static jQueryInterface(t){return this.each(function(){let e=he.getOrCreateInstance(this);t==="toggle"&&e[t]()})}};l.on(document,Lo,Ss,i=>{i.preventDefault();let t=i.target.closest(Ss);he.getOrCreateInstance(t).toggle()});q(he);function Ns(i){return i==="true"?!0:i==="false"?!1:i===Number(i).toString()?Number(i):i===""||i==="null"?null:i}function wi(i){return i.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var M={setDataAttribute(i,t,e){i.setAttribute(`data-bs-${wi(t)}`,e)},removeDataAttribute(i,t){i.removeAttribute(`data-bs-${wi(t)}`)},getDataAttributes(i){if(!i)return{};let t={};return Object.keys(i.dataset).filter(e=>e.startsWith("bs")).forEach(e=>{let s=e.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),t[s]=Ns(i.dataset[e])}),t},getDataAttribute(i,t){return Ns(i.getAttribute(`data-bs-${wi(t)}`))},offset(i){let t=i.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},position(i){return{top:i.offsetTop,left:i.offsetLeft}}},$o=3,p={find(i,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,i))},findOne(i,t=document.documentElement){return Element.prototype.querySelector.call(t,i)},children(i,t){return[].concat(...i.children).filter(e=>e.matches(t))},parents(i,t){let e=[],s=i.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&s.nodeType!==$o;)s.matches(t)&&e.push(s),s=s.parentNode;return e},prev(i,t){let e=i.previousElementSibling;for(;e;){if(e.matches(t))return[e];e=e.previousElementSibling}return[]},next(i,t){let e=i.nextElementSibling;for(;e;){if(e.matches(t))return[e];e=e.nextElementSibling}return[]},focusableChildren(i){let t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(", ");return this.find(t,i).filter(e=>!Lt(e)&&ue(e))}},Cs="carousel",Po="bs.carousel",Y=`.${Po}`,Ds=".data-api",Io="ArrowLeft",xo="ArrowRight",jo=500,Ro=40,Ls={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Mo={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Pt="next",It="prev",xt="left",me="right",ko={[Io]:me,[xo]:xt},Vo=`slide${Y}`,$s=`slid${Y}`,Ho=`keydown${Y}`,Bo=`mouseenter${Y}`,Wo=`mouseleave${Y}`,Ko=`touchstart${Y}`,Yo=`touchmove${Y}`,Fo=`touchend${Y}`,Uo=`pointerdown${Y}`,zo=`pointerup${Y}`,qo=`dragstart${Y}`,Go=`load${Y}${Ds}`,Xo=`click${Y}${Ds}`,Qo="carousel",jt="active",Zo="slide",Jo="carousel-item-end",tr="carousel-item-start",er="carousel-item-next",ir="carousel-item-prev",sr="pointer-event",nr=".active",Fe=".active.carousel-item",or=".carousel-item",rr=".carousel-item img",ar=".carousel-item-next, .carousel-item-prev",lr=".carousel-indicators",cr="[data-bs-target]",fr="[data-bs-slide], [data-bs-slide-to]",ur='[data-bs-ride="carousel"]',Ps="touch",Is="pen",it=class extends G{constructor(t,e){super(t);this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=p.findOne(lr,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Ls}static get NAME(){return Cs}next(){this._slide(Pt)}nextWhenVisible(){!document.hidden&&ue(this._element)&&this.next()}prev(){this._slide(It)}pause(t){t||(this._isPaused=!0),p.findOne(ar,this._element)&&(ds(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=p.findOne(Fe,this._element);let e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding){l.one(this._element,$s,()=>this.to(t));return}if(e===t){this.pause(),this.cycle();return}let s=t>e?Pt:It;this._slide(s,this._items[t])}_getConfig(t){return t={...Ls,...M.getDataAttributes(this._element),...typeof t=="object"?t:{}},et(Cs,t,Mo),t}_handleSwipe(){let t=Math.abs(this.touchDeltaX);if(t<=Ro)return;let e=t/this.touchDeltaX;this.touchDeltaX=0,!!e&&this._slide(e>0?me:xt)}_addEventListeners(){this._config.keyboard&&l.on(this._element,Ho,t=>this._keydown(t)),this._config.pause==="hover"&&(l.on(this._element,Bo,t=>this.pause(t)),l.on(this._element,Wo,t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){let t=n=>{this._pointerEvent&&(n.pointerType===Is||n.pointerType===Ps)?this.touchStartX=n.clientX:this._pointerEvent||(this.touchStartX=n.touches[0].clientX)},e=n=>{this.touchDeltaX=n.touches&&n.touches.length>1?0:n.touches[0].clientX-this.touchStartX},s=n=>{this._pointerEvent&&(n.pointerType===Is||n.pointerType===Ps)&&(this.touchDeltaX=n.clientX-this.touchStartX),this._handleSwipe(),this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(o=>this.cycle(o),jo+this._config.interval))};p.find(rr,this._element).forEach(n=>{l.on(n,qo,o=>o.preventDefault())}),this._pointerEvent?(l.on(this._element,Uo,n=>t(n)),l.on(this._element,zo,n=>s(n)),this._element.classList.add(sr)):(l.on(this._element,Ko,n=>t(n)),l.on(this._element,Yo,n=>e(n)),l.on(this._element,Fo,n=>s(n)))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;let e=ko[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?p.find(or,t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){let s=t===Pt;return _s(this._items,e,s,this._config.wrap)}_triggerSlideEvent(t,e){let s=this._getItemIndex(t),n=this._getItemIndex(p.findOne(Fe,this._element));return l.trigger(this._element,Vo,{relatedTarget:t,direction:e,from:n,to:s})}_setActiveIndicatorElement(t){if(this._indicatorsElement){let e=p.findOne(nr,this._indicatorsElement);e.classList.remove(jt),e.removeAttribute("aria-current");let s=p.find(cr,this._indicatorsElement);for(let n=0;n<s.length;n++)if(Number.parseInt(s[n].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){s[n].classList.add(jt),s[n].setAttribute("aria-current","true");break}}}_updateInterval(){let t=this._activeElement||p.findOne(Fe,this._element);if(!t)return;let e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){let s=this._directionToOrder(t),n=p.findOne(Fe,this._element),o=this._getItemIndex(n),r=e||this._getItemByOrder(s,n),a=this._getItemIndex(r),c=Boolean(this._interval),u=s===Pt,f=u?tr:Jo,d=u?er:ir,h=this._orderToDirection(s);if(r&&r.classList.contains(jt)){this._isSliding=!1;return}if(this._isSliding||this._triggerSlideEvent(r,h).defaultPrevented||!n||!r)return;this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(r),this._activeElement=r;let g=()=>{l.trigger(this._element,$s,{relatedTarget:r,direction:h,from:o,to:a})};if(this._element.classList.contains(Zo)){r.classList.add(d),Xt(r),n.classList.add(f),r.classList.add(f);let E=()=>{r.classList.remove(f,d),r.classList.add(jt),n.classList.remove(jt,d,f),this._isSliding=!1,setTimeout(g,0)};this._queueCallback(E,n,!0)}else n.classList.remove(jt),r.classList.add(jt),this._isSliding=!1,g();c&&this.cycle()}_directionToOrder(t){return[me,xt].includes(t)?K()?t===xt?It:Pt:t===xt?Pt:It:t}_orderToDirection(t){return[Pt,It].includes(t)?K()?t===It?xt:me:t===It?me:xt:t}static carouselInterface(t,e){let s=it.getOrCreateInstance(t,e),{_config:n}=s;typeof e=="object"&&(n={...n,...e});let o=typeof e=="string"?e:n.slide;if(typeof e=="number")s.to(e);else if(typeof o=="string"){if(typeof s[o]=="undefined")throw new TypeError(`No method named "${o}"`);s[o]()}else n.interval&&n.ride&&(s.pause(),s.cycle())}static jQueryInterface(t){return this.each(function(){it.carouselInterface(this,t)})}static dataApiClickHandler(t){let e=dt(this);if(!e||!e.classList.contains(Qo))return;let s={...M.getDataAttributes(e),...M.getDataAttributes(this)},n=this.getAttribute("data-bs-slide-to");n&&(s.interval=!1),it.carouselInterface(e,s),n&&it.getInstance(e).to(n),t.preventDefault()}};l.on(document,Xo,fr,it.dataApiClickHandler);l.on(window,Go,()=>{let i=p.find(ur);for(let t=0,e=i.length;t<e;t++)it.carouselInterface(i[t],it.getInstance(i[t]))});q(it);var xs="collapse",js="bs.collapse",_e=`.${js}`,dr=".data-api",Rs={toggle:!0,parent:null},pr={toggle:"boolean",parent:"(null|element)"},hr=`show${_e}`,mr=`shown${_e}`,_r=`hide${_e}`,gr=`hidden${_e}`,Er=`click${_e}${dr}`,Si="show",mt="collapse",Ue="collapsing",Ms="collapsed",vr="collapse-horizontal",br="width",Tr="height",Ar=".show, .collapsing",Ni='[data-bs-toggle="collapse"]',Rt=class extends G{constructor(t,e){super(t);this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];let s=p.find(Ni);for(let n=0,o=s.length;n<o;n++){let r=s[n],a=Ti(r),c=p.find(a).filter(u=>u===this._element);a!==null&&c.length&&(this._selector=a,this._triggerArray.push(r))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Rs}static get NAME(){return xs}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[],e;if(this._config.parent){let u=p.find(`.${mt} .${mt}`,this._config.parent);t=p.find(Ar,this._config.parent).filter(f=>!u.includes(f))}let s=p.findOne(this._selector);if(t.length){let u=t.find(f=>s!==f);if(e=u?Rt.getInstance(u):null,e&&e._isTransitioning)return}if(l.trigger(this._element,hr).defaultPrevented)return;t.forEach(u=>{s!==u&&Rt.getOrCreateInstance(u,{toggle:!1}).hide(),e||de.set(u,js,null)});let o=this._getDimension();this._element.classList.remove(mt),this._element.classList.add(Ue),this._element.style[o]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let r=()=>{this._isTransitioning=!1,this._element.classList.remove(Ue),this._element.classList.add(mt,Si),this._element.style[o]="",l.trigger(this._element,mr)},c=`scroll${o[0].toUpperCase()+o.slice(1)}`;this._queueCallback(r,this._element,!0),this._element.style[o]=`${this._element[c]}px`}hide(){if(this._isTransitioning||!this._isShown()||l.trigger(this._element,_r).defaultPrevented)return;let e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Xt(this._element),this._element.classList.add(Ue),this._element.classList.remove(mt,Si);let s=this._triggerArray.length;for(let o=0;o<s;o++){let r=this._triggerArray[o],a=dt(r);a&&!this._isShown(a)&&this._addAriaAndCollapsedClass([r],!1)}this._isTransitioning=!0;let n=()=>{this._isTransitioning=!1,this._element.classList.remove(Ue),this._element.classList.add(mt),l.trigger(this._element,gr)};this._element.style[e]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Si)}_getConfig(t){return t={...Rs,...M.getDataAttributes(this._element),...t},t.toggle=Boolean(t.toggle),t.parent=pt(t.parent),et(xs,t,pr),t}_getDimension(){return this._element.classList.contains(vr)?br:Tr}_initializeChildren(){if(!this._config.parent)return;let t=p.find(`.${mt} .${mt}`,this._config.parent);p.find(Ni,this._config.parent).filter(e=>!t.includes(e)).forEach(e=>{let s=dt(e);s&&this._addAriaAndCollapsedClass([e],this._isShown(s))})}_addAriaAndCollapsedClass(t,e){!t.length||t.forEach(s=>{e?s.classList.remove(Ms):s.classList.add(Ms),s.setAttribute("aria-expanded",e)})}static jQueryInterface(t){return this.each(function(){let e={};typeof t=="string"&&/show|hide/.test(t)&&(e.toggle=!1);let s=Rt.getOrCreateInstance(this,e);if(typeof t=="string"){if(typeof s[t]=="undefined")throw new TypeError(`No method named "${t}"`);s[t]()}})}};l.on(document,Er,Ni,function(i){(i.target.tagName==="A"||i.delegateTarget&&i.delegateTarget.tagName==="A")&&i.preventDefault();let t=Ti(this);p.find(t).forEach(s=>{Rt.getOrCreateInstance(s,{toggle:!1}).toggle()})});q(Rt);var Ci="dropdown",yr="bs.dropdown",Mt=`.${yr}`,Di=".data-api",ze="Escape",ks="Space",Vs="Tab",Li="ArrowUp",qe="ArrowDown",Or=2,wr=new RegExp(`${Li}|${qe}|${ze}`),Sr=`hide${Mt}`,Nr=`hidden${Mt}`,Cr=`show${Mt}`,Dr=`shown${Mt}`,Hs=`click${Mt}${Di}`,Bs=`keydown${Mt}${Di}`,Lr=`keyup${Mt}${Di}`,Qt="show",$r="dropup",Pr="dropend",Ir="dropstart",xr="navbar",ge='[data-bs-toggle="dropdown"]',$i=".dropdown-menu",jr=".navbar-nav",Rr=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Mr=K()?"top-end":"top-start",kr=K()?"top-start":"top-end",Vr=K()?"bottom-end":"bottom-start",Hr=K()?"bottom-start":"bottom-end",Br=K()?"left-start":"right-start",Wr=K()?"right-start":"left-start",Kr={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},Yr={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"},F=class extends G{constructor(t,e){super(t);this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return Kr}static get DefaultType(){return Yr}static get NAME(){return Ci}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Lt(this._element)||this._isShown(this._menu))return;let t={relatedTarget:this._element};if(l.trigger(this._element,Cr,t).defaultPrevented)return;let s=F.getParentFromElement(this._element);this._inNavbar?M.setDataAttribute(this._menu,"popper","none"):this._createPopper(s),"ontouchstart"in document.documentElement&&!s.closest(jr)&&[].concat(...document.body.children).forEach(n=>l.on(n,"mouseover",Ke)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Qt),this._element.classList.add(Qt),l.trigger(this._element,Dr,t)}hide(){if(Lt(this._element)||!this._isShown(this._menu))return;let t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){l.trigger(this._element,Sr,t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(s=>l.off(s,"mouseover",Ke)),this._popper&&this._popper.destroy(),this._menu.classList.remove(Qt),this._element.classList.remove(Qt),this._element.setAttribute("aria-expanded","false"),M.removeDataAttribute(this._menu,"popper"),l.trigger(this._element,Nr,t))}_getConfig(t){if(t={...this.constructor.Default,...M.getDataAttributes(this._element),...t},et(Ci,t,this.constructor.DefaultType),typeof t.reference=="object"&&!Dt(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${Ci.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(typeof We=="undefined")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=t:Dt(this._config.reference)?e=pt(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);let s=this._getPopperConfig(),n=s.modifiers.find(o=>o.name==="applyStyles"&&o.enabled===!1);this._popper=Be(e,this._menu,s),n&&M.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Qt)}_getMenuElement(){return p.next(this._element,$i)[0]}_getPlacement(){let t=this._element.parentNode;if(t.classList.contains(Pr))return Br;if(t.classList.contains(Ir))return Wr;let e=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains($r)?e?kr:Mr:e?Hr:Vr}_detectNavbar(){return this._element.closest(`.${xr}`)!==null}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_getPopperConfig(){let t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return this._config.display==="static"&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...typeof this._config.popperConfig=="function"?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){let s=p.find(Rr,this._menu).filter(ue);!s.length||_s(s,e,t===qe,!s.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){let e=F.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]=="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t&&(t.button===Or||t.type==="keyup"&&t.key!==Vs))return;let e=p.find(ge);for(let s=0,n=e.length;s<n;s++){let o=F.getInstance(e[s]);if(!o||o._config.autoClose===!1||!o._isShown())continue;let r={relatedTarget:o._element};if(t){let a=t.composedPath(),c=a.includes(o._menu);if(a.includes(o._element)||o._config.autoClose==="inside"&&!c||o._config.autoClose==="outside"&&c||o._menu.contains(t.target)&&(t.type==="keyup"&&t.key===Vs||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;t.type==="click"&&(r.clickEvent=t)}o._completeHide(r)}}static getParentFromElement(t){return dt(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?t.key===ks||t.key!==ze&&(t.key!==qe&&t.key!==Li||t.target.closest($i)):!wr.test(t.key))return;let e=this.classList.contains(Qt);if(!e&&t.key===ze||(t.preventDefault(),t.stopPropagation(),Lt(this)))return;let s=this.matches(ge)?this:p.prev(this,ge)[0],n=F.getOrCreateInstance(s);if(t.key===ze){n.hide();return}if(t.key===Li||t.key===qe){e||n.show(),n._selectMenuItem(t);return}(!e||t.key===ks)&&F.clearMenus()}};l.on(document,Bs,ge,F.dataApiKeydownHandler);l.on(document,Bs,$i,F.dataApiKeydownHandler);l.on(document,Hs,F.clearMenus);l.on(document,Lr,F.clearMenus);l.on(document,Hs,ge,function(i){i.preventDefault(),F.getOrCreateInstance(this).toggle()});q(F);var Ws=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ks=".sticky-top",Ge=class{constructor(){this._element=document.body}getWidth(){let t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){let t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",e=>e+t),this._setElementAttributes(Ws,"paddingRight",e=>e+t),this._setElementAttributes(Ks,"marginRight",e=>e-t)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){let n=this.getWidth(),o=r=>{if(r!==this._element&&window.innerWidth>r.clientWidth+n)return;this._saveInitialAttribute(r,e);let a=window.getComputedStyle(r)[e];r.style[e]=`${s(Number.parseFloat(a))}px`};this._applyManipulationCallback(t,o)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(Ws,"paddingRight"),this._resetElementAttributes(Ks,"marginRight")}_saveInitialAttribute(t,e){let s=t.style[e];s&&M.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){let s=n=>{let o=M.getDataAttribute(n,e);typeof o=="undefined"?n.style.removeProperty(e):(M.removeDataAttribute(n,e),n.style[e]=o)};this._applyManipulationCallback(t,s)}_applyManipulationCallback(t,e){Dt(t)?e(t):p.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}},Fr={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Ur={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},Ys="backdrop",zr="fade",Fs="show",Us=`mousedown.bs.${Ys}`,Pi=class{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){if(!this._config.isVisible){$t(t);return}this._append(),this._config.isAnimated&&Xt(this._getElement()),this._getElement().classList.add(Fs),this._emulateAnimation(()=>{$t(t)})}hide(t){if(!this._config.isVisible){$t(t);return}this._getElement().classList.remove(Fs),this._emulateAnimation(()=>{this.dispose(),$t(t)})}_getElement(){if(!this._element){let t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(zr),this._element=t}return this._element}_getConfig(t){return t={...Fr,...typeof t=="object"?t:{}},t.rootElement=pt(t.rootElement),et(Ys,t,Ur),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),l.on(this._getElement(),Us,()=>{$t(this._config.clickCallback)}),this._isAppended=!0)}dispose(){!this._isAppended||(l.off(this._element,Us),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){ms(t,this._getElement(),this._config.isAnimated)}},qr={trapElement:null,autofocus:!0},Gr={trapElement:"element",autofocus:"boolean"},Xr="focustrap",Qr="bs.focustrap",Xe=`.${Qr}`,Zr=`focusin${Xe}`,Jr=`keydown.tab${Xe}`,ta="Tab",ea="forward",zs="backward",Ii=class{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){let{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),l.off(document,Xe),l.on(document,Zr,s=>this._handleFocusin(s)),l.on(document,Jr,s=>this._handleKeydown(s)),this._isActive=!0)}deactivate(){!this._isActive||(this._isActive=!1,l.off(document,Xe))}_handleFocusin(t){let{target:e}=t,{trapElement:s}=this._config;if(e===document||e===s||s.contains(e))return;let n=p.focusableChildren(s);n.length===0?s.focus():this._lastTabNavDirection===zs?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){t.key===ta&&(this._lastTabNavDirection=t.shiftKey?zs:ea)}_getConfig(t){return t={...qr,...typeof t=="object"?t:{}},et(Xr,t,Gr),t}},qs="modal",ia="bs.modal",X=`.${ia}`,sa=".data-api",Gs="Escape",Xs={backdrop:!0,keyboard:!0,focus:!0},na={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},oa=`hide${X}`,ra=`hidePrevented${X}`,Qs=`hidden${X}`,Zs=`show${X}`,aa=`shown${X}`,Js=`resize${X}`,tn=`click.dismiss${X}`,en=`keydown.dismiss${X}`,la=`mouseup.dismiss${X}`,sn=`mousedown.dismiss${X}`,ca=`click${X}${sa}`,nn="modal-open",fa="fade",on="show",xi="modal-static",ua=".modal-dialog",da=".modal-body",pa='[data-bs-toggle="modal"]',Zt=class extends G{constructor(t,e){super(t);this._config=this._getConfig(e),this._dialog=p.findOne(ua,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new Ge}static get Default(){return Xs}static get NAME(){return qs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||l.trigger(this._element,Zs,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(nn),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),l.on(this._dialog,sn,()=>{l.one(this._element,la,s=>{s.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning||l.trigger(this._element,oa).defaultPrevented)return;this._isShown=!1;let e=this._isAnimated();e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(on),l.off(this._element,tn),l.off(this._dialog,sn),this._queueCallback(()=>this._hideModal(),this._element,e)}dispose(){[window,this._dialog].forEach(t=>l.off(t,X)),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Pi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ii({trapElement:this._element})}_getConfig(t){return t={...Xs,...M.getDataAttributes(this._element),...typeof t=="object"?t:{}},et(qs,t,na),t}_showElement(t){let e=this._isAnimated(),s=p.findOne(da,this._dialog);(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE)&&document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,s&&(s.scrollTop=0),e&&Xt(this._element),this._element.classList.add(on);let n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,l.trigger(this._element,aa,{relatedTarget:t})};this._queueCallback(n,this._dialog,e)}_setEscapeEvent(){this._isShown?l.on(this._element,en,t=>{this._config.keyboard&&t.key===Gs?(t.preventDefault(),this.hide()):!this._config.keyboard&&t.key===Gs&&this._triggerBackdropTransition()}):l.off(this._element,en)}_setResizeEvent(){this._isShown?l.on(window,Js,()=>this._adjustDialog()):l.off(window,Js)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(nn),this._resetAdjustments(),this._scrollBar.reset(),l.trigger(this._element,Qs)})}_showBackdrop(t){l.on(this._element,tn,e=>{if(this._ignoreBackdropClick){this._ignoreBackdropClick=!1;return}e.target===e.currentTarget&&(this._config.backdrop===!0?this.hide():this._config.backdrop==="static"&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains(fa)}_triggerBackdropTransition(){if(l.trigger(this._element,ra).defaultPrevented)return;let{classList:e,scrollHeight:s,style:n}=this._element,o=s>document.documentElement.clientHeight;!o&&n.overflowY==="hidden"||e.contains(xi)||(o||(n.overflowY="hidden"),e.add(xi),this._queueCallback(()=>{e.remove(xi),o||this._queueCallback(()=>{n.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),s=e>0;(!s&&t&&!K()||s&&!t&&K())&&(this._element.style.paddingLeft=`${e}px`),(s&&!t&&!K()||!s&&t&&K())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){let s=Zt.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof s[t]=="undefined")throw new TypeError(`No method named "${t}"`);s[t](e)}})}};l.on(document,ca,pa,function(i){let t=dt(this);["A","AREA"].includes(this.tagName)&&i.preventDefault(),l.one(t,Zs,s=>{s.defaultPrevented||l.one(t,Qs,()=>{ue(this)&&this.focus()})}),Zt.getOrCreateInstance(t).toggle(this)});Ye(Zt);q(Zt);var rn="offcanvas",ha="bs.offcanvas",kt=`.${ha}`,an=".data-api",ma=`load${kt}${an}`,_a="Escape",ln={backdrop:!0,keyboard:!0,scroll:!1},ga={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},cn="show",Ea="offcanvas-backdrop",fn=".offcanvas.show",va=`show${kt}`,ba=`shown${kt}`,Ta=`hide${kt}`,un=`hidden${kt}`,Aa=`click${kt}${an}`,ya=`keydown.dismiss${kt}`,Oa='[data-bs-toggle="offcanvas"]',_t=class extends G{constructor(t,e){super(t);this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return rn}static get Default(){return ln}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||l.trigger(this._element,va,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||new Ge().hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(cn);let s=()=>{this._config.scroll||this._focustrap.activate(),l.trigger(this._element,ba,{relatedTarget:t})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||l.trigger(this._element,Ta).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(cn),this._backdrop.hide();let e=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||new Ge().reset(),l.trigger(this._element,un)};this._queueCallback(e,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...ln,...M.getDataAttributes(this._element),...typeof t=="object"?t:{}},et(rn,t,ga),t}_initializeBackDrop(){return new Pi({className:Ea,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ii({trapElement:this._element})}_addEventListeners(){l.on(this._element,ya,t=>{this._config.keyboard&&t.key===_a&&this.hide()})}static jQueryInterface(t){return this.each(function(){let e=_t.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}};l.on(document,Aa,Oa,function(i){let t=dt(this);if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Lt(this))return;l.one(t,un,()=>{ue(this)&&this.focus()});let e=p.findOne(fn);e&&e!==t&&_t.getInstance(e).hide(),_t.getOrCreateInstance(t).toggle(this)});l.on(window,ma,()=>p.find(fn).forEach(i=>_t.getOrCreateInstance(i).show()));Ye(_t);q(_t);var wa=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Sa=/^aria-[\w-]*$/i,Na=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,Ca=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Da=(i,t)=>{let e=i.nodeName.toLowerCase();if(t.includes(e))return wa.has(e)?Boolean(Na.test(i.nodeValue)||Ca.test(i.nodeValue)):!0;let s=t.filter(n=>n instanceof RegExp);for(let n=0,o=s.length;n<o;n++)if(s[n].test(e))return!0;return!1},La={"*":["class","dir","id","lang","role",Sa],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function dn(i,t,e){if(!i.length)return i;if(e&&typeof e=="function")return e(i);let n=new window.DOMParser().parseFromString(i,"text/html"),o=Object.keys(t),r=[].concat(...n.body.querySelectorAll("*"));for(let a=0,c=r.length;a<c;a++){let u=r[a],f=u.nodeName.toLowerCase();if(!o.includes(f)){u.remove();continue}let d=[].concat(...u.attributes),h=[].concat(t["*"]||[],t[f]||[]);d.forEach(_=>{Da(_,h)||u.removeAttribute(_.nodeName)})}return n.body.innerHTML}var pn="tooltip",$a="bs.tooltip",st=`.${$a}`,Pa="bs-tooltip",Ia=new Set(["sanitize","allowList","sanitizeFn"]),xa={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},ja={AUTO:"auto",TOP:"top",RIGHT:K()?"left":"right",BOTTOM:"bottom",LEFT:K()?"right":"left"},Ra={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:La,popperConfig:null},Ma={HIDE:`hide${st}`,HIDDEN:`hidden${st}`,SHOW:`show${st}`,SHOWN:`shown${st}`,INSERTED:`inserted${st}`,CLICK:`click${st}`,FOCUSIN:`focusin${st}`,FOCUSOUT:`focusout${st}`,MOUSEENTER:`mouseenter${st}`,MOUSELEAVE:`mouseleave${st}`},Qe="fade",ka="modal",Ee="show",ve="show",ji="out",Va=".tooltip-inner",hn=`.${ka}`,mn="hide.bs.modal",be="hover",Ri="focus",Ha="click",Ba="manual",Vt=class extends G{constructor(t,e){if(typeof We=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t);this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Ra}static get NAME(){return pn}static get Event(){return Ma}static get DefaultType(){return xa}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(!!this._isEnabled)if(t){let e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Ee)){this._leave(null,this);return}this._enter(null,this)}}dispose(){clearTimeout(this._timeout),l.off(this._element.closest(hn),mn,this._hideModalHandler),this.tip&&this.tip.remove(),this._popper&&this._popper.destroy(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this.isWithContent()&&this._isEnabled))return;let t=l.trigger(this._element,this.constructor.Event.SHOW),e=ps(this._element),s=e===null?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!s)return;let n=this.getTipElement(),o=ro(this.constructor.NAME);n.setAttribute("id",o),this._element.setAttribute("aria-describedby",o),this._config.animation&&n.classList.add(Qe);let r=typeof this._config.placement=="function"?this._config.placement.call(this,n,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);let{container:c}=this._config;de.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(c.append(n),l.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Be(this._element,n,this._getPopperConfig(a)),n.classList.add(Ee);let u=this._resolvePossibleFunction(this._config.customClass);u&&n.classList.add(...u.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(h=>{l.on(h,"mouseover",Ke)});let f=()=>{let h=this._hoverState;this._hoverState=null,l.trigger(this._element,this.constructor.Event.SHOWN),h===ji&&this._leave(null,this)},d=this.tip.classList.contains(Qe);this._queueCallback(f,this.tip,d)}hide(){if(!this._popper)return;let t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==ve&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),l.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null))};if(l.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Ee),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(o=>l.off(o,"mouseover",Ke)),this._activeTrigger[Ha]=!1,this._activeTrigger[Ri]=!1,this._activeTrigger[be]=!1;let n=this.tip.classList.contains(Qe);this._queueCallback(e,this.tip,n),this._hoverState=""}update(){this._popper!==null&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;let t=document.createElement("div");t.innerHTML=this._config.template;let e=t.children[0];return this.setContent(e),e.classList.remove(Qe,Ee),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Va)}_sanitizeAndSetContent(t,e,s){let n=p.findOne(s,t);if(!e&&n){n.remove();return}this.setElementContent(n,e)}setElementContent(t,e){if(t!==null){if(Dt(e)){e=pt(e),this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent;return}this._config.html?(this._config.sanitize&&(e=dn(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e}}getTitle(){let t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return t==="right"?"end":t==="left"?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return typeof t=="function"?t.call(this._element):t}_getPopperConfig(t){let e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:s=>this._handlePopperPlacementChange(s)}],onFirstUpdate:s=>{s.options.placement!==s.placement&&this._handlePopperPlacementChange(s)}};return{...e,...typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return ja[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(e=>{if(e==="click")l.on(this._element,this.constructor.Event.CLICK,this._config.selector,s=>this.toggle(s));else if(e!==Ba){let s=e===be?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,n=e===be?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;l.on(this._element,s,this._config.selector,o=>this._enter(o)),l.on(this._element,n,this._config.selector,o=>this._leave(o))}}),this._hideModalHandler=()=>{this._element&&this.hide()},l.on(this._element.closest(hn),mn,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){let t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||e!=="string")&&(this._element.setAttribute("data-bs-original-title",t||""),t&&!this._element.getAttribute("aria-label")&&!this._element.textContent&&this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusin"?Ri:be]=!0),e.getTipElement().classList.contains(Ee)||e._hoverState===ve){e._hoverState=ve;return}if(clearTimeout(e._timeout),e._hoverState=ve,!e._config.delay||!e._config.delay.show){e.show();return}e._timeout=setTimeout(()=>{e._hoverState===ve&&e.show()},e._config.delay.show)}_leave(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusout"?Ri:be]=e._element.contains(t.relatedTarget)),!e._isWithActiveTrigger()){if(clearTimeout(e._timeout),e._hoverState=ji,!e._config.delay||!e._config.delay.hide){e.hide();return}e._timeout=setTimeout(()=>{e._hoverState===ji&&e.hide()},e._config.delay.hide)}}_isWithActiveTrigger(){for(let t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){let e=M.getDataAttributes(this._element);return Object.keys(e).forEach(s=>{Ia.has(s)&&delete e[s]}),t={...this.constructor.Default,...e,...typeof t=="object"&&t?t:{}},t.container=t.container===!1?document.body:pt(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),et(pn,t,this.constructor.DefaultType),t.sanitize&&(t.template=dn(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){let t={};for(let e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){let t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),s=t.getAttribute("class").match(e);s!==null&&s.length>0&&s.map(n=>n.trim()).forEach(n=>t.classList.remove(n))}_getBasicClassPrefix(){return Pa}_handlePopperPlacementChange(t){let{state:e}=t;!e||(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}static jQueryInterface(t){return this.each(function(){let e=Vt.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]=="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}})}};q(Vt);var Wa="popover",Ka="bs.popover",nt=`.${Ka}`,Ya="bs-popover",Fa={...Vt.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},Ua={...Vt.DefaultType,content:"(string|element|function)"},za={HIDE:`hide${nt}`,HIDDEN:`hidden${nt}`,SHOW:`show${nt}`,SHOWN:`shown${nt}`,INSERTED:`inserted${nt}`,CLICK:`click${nt}`,FOCUSIN:`focusin${nt}`,FOCUSOUT:`focusout${nt}`,MOUSEENTER:`mouseenter${nt}`,MOUSELEAVE:`mouseleave${nt}`},qa=".popover-header",Ga=".popover-body",Ze=class extends Vt{static get Default(){return Fa}static get NAME(){return Wa}static get Event(){return za}static get DefaultType(){return Ua}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),qa),this._sanitizeAndSetContent(t,this._getContent(),Ga)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return Ya}static jQueryInterface(t){return this.each(function(){let e=Ze.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]=="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}})}};q(Ze);var _n="scrollspy",Xa="bs.scrollspy",Je=`.${Xa}`,Qa=".data-api",gn={offset:10,method:"auto",target:""},Za={offset:"number",method:"string",target:"(string|element)"},Ja=`activate${Je}`,tl=`scroll${Je}`,el=`load${Je}${Qa}`,En="dropdown-item",Jt="active",il='[data-bs-spy="scroll"]',sl=".nav, .list-group",Mi=".nav-link",nl=".nav-item",vn=".list-group-item",ki=`${Mi}, ${vn}, .${En}`,ol=".dropdown",rl=".dropdown-toggle",al="offset",bn="position",Te=class extends G{constructor(t,e){super(t);this._scrollElement=this._element.tagName==="BODY"?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,l.on(this._scrollElement,tl,()=>this._process()),this.refresh(),this._process()}static get Default(){return gn}static get NAME(){return _n}refresh(){let t=this._scrollElement===this._scrollElement.window?al:bn,e=this._config.method==="auto"?t:this._config.method,s=e===bn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),p.find(ki,this._config.target).map(o=>{let r=Ti(o),a=r?p.findOne(r):null;if(a){let c=a.getBoundingClientRect();if(c.width||c.height)return[M[e](a).top+s,r]}return null}).filter(o=>o).sort((o,r)=>o[0]-r[0]).forEach(o=>{this._offsets.push(o[0]),this._targets.push(o[1])})}dispose(){l.off(this._scrollElement,Je),super.dispose()}_getConfig(t){return t={...gn,...M.getDataAttributes(this._element),...typeof t=="object"&&t?t:{}},t.target=pt(t.target)||document.documentElement,et(_n,t,Za),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){let t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),s=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=s){let n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n);return}if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0){this._activeTarget=null,this._clear();return}for(let n=this._offsets.length;n--;)this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&(typeof this._offsets[n+1]=="undefined"||t<this._offsets[n+1])&&this._activate(this._targets[n])}_activate(t){this._activeTarget=t,this._clear();let e=ki.split(",").map(n=>`${n}[data-bs-target="${t}"],${n}[href="${t}"]`),s=p.findOne(e.join(","),this._config.target);s.classList.add(Jt),s.classList.contains(En)?p.findOne(rl,s.closest(ol)).classList.add(Jt):p.parents(s,sl).forEach(n=>{p.prev(n,`${Mi}, ${vn}`).forEach(o=>o.classList.add(Jt)),p.prev(n,nl).forEach(o=>{p.children(o,Mi).forEach(r=>r.classList.add(Jt))})}),l.trigger(this._scrollElement,Ja,{relatedTarget:t})}_clear(){p.find(ki,this._config.target).filter(t=>t.classList.contains(Jt)).forEach(t=>t.classList.remove(Jt))}static jQueryInterface(t){return this.each(function(){let e=Te.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]=="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}})}};l.on(window,el,()=>{p.find(il).forEach(i=>new Te(i))});q(Te);var ll="tab",cl="bs.tab",Ae=`.${cl}`,fl=".data-api",ul=`hide${Ae}`,dl=`hidden${Ae}`,pl=`show${Ae}`,hl=`shown${Ae}`,ml=`click${Ae}${fl}`,_l="dropdown-menu",ye="active",Tn="fade",An="show",gl=".dropdown",El=".nav, .list-group",yn=".active",On=":scope > li > .active",vl='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',bl=".dropdown-toggle",Tl=":scope > .dropdown-menu .active",Oe=class extends G{static get NAME(){return ll}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(ye))return;let t,e=dt(this._element),s=this._element.closest(El);if(s){let a=s.nodeName==="UL"||s.nodeName==="OL"?On:yn;t=p.find(a,s),t=t[t.length-1]}let n=t?l.trigger(t,ul,{relatedTarget:this._element}):null;if(l.trigger(this._element,pl,{relatedTarget:t}).defaultPrevented||n!==null&&n.defaultPrevented)return;this._activate(this._element,s);let r=()=>{l.trigger(t,dl,{relatedTarget:this._element}),l.trigger(this._element,hl,{relatedTarget:t})};e?this._activate(e,e.parentNode,r):r()}_activate(t,e,s){let o=(e&&(e.nodeName==="UL"||e.nodeName==="OL")?p.find(On,e):p.children(e,yn))[0],r=s&&o&&o.classList.contains(Tn),a=()=>this._transitionComplete(t,o,s);o&&r?(o.classList.remove(An),this._queueCallback(a,t,!0)):a()}_transitionComplete(t,e,s){if(e){e.classList.remove(ye);let o=p.findOne(Tl,e.parentNode);o&&o.classList.remove(ye),e.getAttribute("role")==="tab"&&e.setAttribute("aria-selected",!1)}t.classList.add(ye),t.getAttribute("role")==="tab"&&t.setAttribute("aria-selected",!0),Xt(t),t.classList.contains(Tn)&&t.classList.add(An);let n=t.parentNode;if(n&&n.nodeName==="LI"&&(n=n.parentNode),n&&n.classList.contains(_l)){let o=t.closest(gl);o&&p.find(bl,o).forEach(r=>r.classList.add(ye)),t.setAttribute("aria-expanded",!0)}s&&s()}static jQueryInterface(t){return this.each(function(){let e=Oe.getOrCreateInstance(this);if(typeof t=="string"){if(typeof e[t]=="undefined")throw new TypeError(`No method named "${t}"`);e[t]()}})}};l.on(document,ml,vl,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Lt(this))return;Oe.getOrCreateInstance(this).show()});q(Oe);var wn="toast",Al="bs.toast",gt=`.${Al}`,yl=`mouseover${gt}`,Ol=`mouseout${gt}`,wl=`focusin${gt}`,Sl=`focusout${gt}`,Nl=`hide${gt}`,Cl=`hidden${gt}`,Dl=`show${gt}`,Ll=`shown${gt}`,$l="fade",Sn="hide",we="show",ti="showing",Pl={animation:"boolean",autohide:"boolean",delay:"number"},Nn={animation:!0,autohide:!0,delay:5e3},Se=class extends G{constructor(t,e){super(t);this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return Pl}static get Default(){return Nn}static get NAME(){return wn}show(){if(l.trigger(this._element,Dl).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add($l);let e=()=>{this._element.classList.remove(ti),l.trigger(this._element,Ll),this._maybeScheduleHide()};this._element.classList.remove(Sn),Xt(this._element),this._element.classList.add(we),this._element.classList.add(ti),this._queueCallback(e,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(we)||l.trigger(this._element,Nl).defaultPrevented)return;let e=()=>{this._element.classList.add(Sn),this._element.classList.remove(ti),this._element.classList.remove(we),l.trigger(this._element,Cl)};this._element.classList.add(ti),this._queueCallback(e,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(we)&&this._element.classList.remove(we),super.dispose()}_getConfig(t){return t={...Nn,...M.getDataAttributes(this._element),...typeof t=="object"&&t?t:{}},et(wn,t,this.constructor.DefaultType),t}_maybeScheduleHide(){!this._config.autohide||this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e;break}if(e){this._clearTimeout();return}let s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){l.on(this._element,yl,t=>this._onInteraction(t,!0)),l.on(this._element,Ol,t=>this._onInteraction(t,!1)),l.on(this._element,wl,t=>this._onInteraction(t,!0)),l.on(this._element,Sl,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){let e=Se.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]=="undefined")throw new TypeError(`No method named "${t}"`);e[t](this)}})}};Ye(Se);q(Se);window.addEventListener("DOMContentLoaded",i=>{console.log("DOM fully loaded and parsed",i)});})(); /*! * Bootstrap v5.1.0 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */
// Dependencies import React, {Component} from 'react'; import KeyVal from './keyval'; // Helpers import colors from './helpers/colors.js'; import types from './helpers/types.js'; // Export Component export default class Type extends Component { constructor(props) { super(props); this.data = this.props.data; this.color = colors[this.data][0]; this.logo = types[this.data]; } render() { return <KeyVal k="type" v={this.data} c={this.color} i={this.logo}></KeyVal>; } }
/** * Export slider types. * * @author Naotoshi Fujita * @copyright Naotoshi Fujita. All rights reserved. */ /** * Normal slider. * * @type {string} */ export const SLIDE = 'slide'; /** * Loop after the last slide and before the first one. * * @type {string} */ export const LOOP = 'loop'; /** * The track doesn't move. * * @type {string} */ export const FADE = 'fade';
import React from "react"; import "./footer.css"; import styled from "styled-components"; import { Link } from "gatsby"; import LogoGreen from "../NavBar/LogoGreen"; const FooterWrap = styled.div` padding-top: 3%; padding-bottom: 2%; display: flex; width: 100%; height: 100%; padding-left: 13%; padding-right: 14%; background-color: rgb(248,248,255); font-family: "ITCKabelStd-Book"; #address-title { font-family: "ITCKabelStd-Demi"; } #contact-title { font-family: "ITCKabelStd-Demi"; } #footer-links { font-family: "ITCKabelStd-Demi"; justify-content: space-evenly; } /* Extra large TV screens */ @media screen and (min-width: 1200px) { } /* Desktops, large screens */ @media screen and (max-width: 1200px) { } /* Small screens, laptops */ @media screen and (max-width: 1024px) { #footer-logo { display: none; } justify-content: center; align-items: flex-start } /* iPads & Tablets */ @media screen and (max-width: 768px) { #footer-logo { display: none; } justify-content: center; align-items: flex-start } /* Mobile */ @media screen and (max-width: 480px) { #footer-logo { display: none; } justify-content: center; align-items: flex-start; } ` const Footer = () => { return ( <> <FooterWrap> <div id="footer-logo"> <LogoGreen></LogoGreen> </div> <div id="footer-links"> <Link to="/about" className="footer-link" activeClassName="active-link">ABOUT US</Link> <Link to="/projects" className="footer-link" activeClassName="active-link">PROJECTS</Link> <Link to="/research" className="footer-link" activeClassName="active-link">RESEARCH</Link> <Link to="/news" className="footer-link" activeClassName="active-link">NEWS</Link> <Link to="/contact" className="footer-link" activeClassName="active-link">CONTACT US</Link> </div> <div id="address-div"> <p id="address-title"><strong>Address</strong></p> <p id="address-info">Building 7, 2241 Ping Liang Road, Yangpu District, Shanghai, PRC 200090</p> </div> <div id="contact-div"> <p id="contact-title"><strong>Contact Us</strong></p> <p id="contact-info">Occaecat anim amet laborum magna officia ipsum.</p> </div> </FooterWrap> </> ) } export default Footer
const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const MiniCSSExtractPlugin = require("mini-css-extract-plugin"); const webpack = require('webpack') module.exports = { entry: [__dirname + "/src/main.js", __dirname + "/src/sass/main.scss"], output: { path: path.resolve(__dirname, "dist"), filename: "main.js", }, mode: "production", module: { rules: [ { test: /\.scss$/, use: [MiniCSSExtractPlugin.loader, "css-loader", "sass-loader"], }, { test: /\.(png|jpg|gif|svg)$/i, use: [ { loader: 'url-loader', options: { limit: 8192, }, }, ], }, { test: /\.(js)$/, exclude: /node_modules/, use: ['babel-loader'] } ], }, plugins: [ new HtmlWebpackPlugin({ filename: "index.html", template: "src/index.html" }), new MiniCSSExtractPlugin(), new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", }), ] };
import React from 'react' import PropTypes from 'prop-types' import Image from './Image' import Content from './Content' import './PageHeader.css' const PageHeader = ({ title, subtitle, backgroundImage, large, className = '' }) => { if (large) className += ' PageHeader-large' return ( <div className={`PageHeader relative ${className}`}> {backgroundImage && ( <Image background resolutions="large" src={backgroundImage} alt={title} size="cover" /> )} <div className="container--background relative"> <h1 className="PageHeader--Title">{title}</h1> {subtitle && ( <Content className="PageHeader--Subtitle" src={subtitle} /> )} </div> </div> ) } PageHeader.propTypes = { title: PropTypes.string, subtitle: PropTypes.string } export default PageHeader
import React from 'react'; import { NavLink } from 'react-router-dom'; import Logo from '../../assets/images/Logo.png'; import Logo2 from '../../assets/images/Logo2.png'; import classes from './Logo.css'; const logo = (props) => ( <NavLink to="/" exact> <div className={classes.Logo} style={{height: props.height}}> <img src={Logo} alt="ProjectLogo" /> </div> <div className={classes.Logo2} style={{height: props.height}}> <img src={Logo2} alt="ProjectLogo" /> </div> </NavLink> ); export default logo;
import WebError from './WebError'; export default class NotFound extends WebError { constructor(...args) { super(404, ...args); } } NotFound.prototype.name = 'NotFound';
module.exports={A:{A:{"2":"H E G D A B pB"},B:{"1":"EB M","2":"9 C N I J K L"},C:{"1":"0 1 2 3 4 5 6 7 8 9 q H E G D A B C N I J K L g R o S T U V W X Y Z a b c d e f CB h i j k l m n Q p O r s t u v w x y z FB HB DB AB IB JB KB LB MB NB OB PB","2":"mB RB fB eB","33":"F"},D:{"1":"0 1 2 3 4 5 6 7 8 9 F q H E G D A B C N I J K L g R o S T U V W X Y Z a b c d e f CB h i j k l m n Q p O r s t u v w x y z FB HB DB AB IB JB KB LB MB NB OB PB dB YB EB M VB vB WB"},E:{"1":"F q H E G D A B C N ZB aB bB cB SB P BB gB hB","2":"XB TB"},F:{"1":"0 1 2 3 4 5 6 7 8 I J K L g R o S T U V W X Y Z a b c d e f CB h i j k l m n Q p O r s t u v w x y z","2":"D B C iB jB kB lB P QB nB","132":"BB"},G:{"2":"G TB oB GB qB rB sB tB uB UB wB xB yB zB 0B 1B 2B 3B 4B 5B"},H:{"2":"6B"},I:{"1":"M","2":"RB F 7B 8B 9B AC GB BC CC"},J:{"2":"E A"},K:{"1":"O","2":"A B C P QB BB"},L:{"1":"M"},M:{"1":"AB"},N:{"2":"A B"},O:{"1":"DC"},P:{"1":"EC FC GC HC IC SB P","2":"F"},Q:{"1":"JC"},R:{"1":"KC"},S:{"2":"LC"}},B:4,C:"CSS resize property"};
import React from "react"; import PropTypes, { string } from "prop-types"; const ErrorPresent = ({ errorMessages }) => { return ( <div className="ErrorPresent"> <h2 className="ErrorPresentHeader">Please correct the following issues:</h2> <ul className="ErrorPresentList"> {errorMessages.map((errorMessage, index) => <li key={index} className="ErrorPresentListItem">{errorMessage}</li>)} </ul> </div> ); } ErrorPresent.propTypes = { errorMessages: PropTypes.arrayOf(string).isRequired } export default ErrorPresent;
import axios from 'axios' import qs from 'qs' import config from './config.js' import NProgress from 'nprogress' import store from '../store' import router from '../router' var api = axios.create(config) api.interceptors.request.use(config => { NProgress.start() return config }, error => { return Promise.reject(error) }) api.interceptors.response.use(response => { NProgress.done() return response.data }, error => { NProgress.done() if (error.response.status === 401) { store.dispatch('clearToken') router.push('/login') } return Promise.reject(error) }) const getHeader = () => { var headers = {} if (store.state.global.token) { headers['Authorization'] = store.state.global.token } return headers } export default { put (url, params) { return api({ method: 'put', url, data: params, headers: getHeader() }) }, delete (url, params) { return api({ method: 'delete', url, data: params, headers: getHeader() }) }, post (url, params) { return api({ method: 'post', url, data: params, headers: getHeader() }) }, postForm (url, params) { var headers = getHeader() headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8' return api({ method: 'post', url, data: qs.stringify(params), headers }) }, get (url, params) { return api({ method: 'get', url, params, headers: getHeader() }) } }
const fs = require('fs'); const wget = require('node-wget'); const KMZtoGeoJson = require('./helpers/KMZtoGeoJson'); module.exports = { kmzToGeojsonLines: (usr, data) => new Promise((resolve, reject) => { // con el enlace vamos a crear un stream de lectura wget({ url: data.link, dest: './temp/' }, async (error, response, body) => { await KMZtoGeoJson.toGeoJSON(response.filepath, async (err, geoJson) => { if (err) reject({ m: err }); let geoJsonFormated = { type: 'FeatureCollection', features: [] }; await Object.keys(geoJson.features).map(async (key) => { if (geoJson.features[key].geometry.coordinates !== undefined) { if (isNaN(geoJson.features[key].geometry.coordinates[0][0]) === false && geoJson.features[key].geometry.coordinates[0][0] !== null && geoJson.features[key].geometry.coordinates[0][0] !== undefined){ if (Array.isArray(geoJson.features[key].geometry.coordinates)) { geoJson.features[key].id = key; geoJson.features[key].geometry.coordinates = await geoJson.features[key].geometry.coordinates.map((coordinante) => ((coordinante.length > 2 ) ? [coordinante[0], coordinante[1]] : coordinante)); geoJson.features[key].properties = { _id: key, name: (geoJson.features[key].properties.name !== undefined && geoJson.features[key].properties.name !== '') ? geoJson.features[key].properties.name : `Segment ${key}`, status: true, stroke: '#fdf72d', 'stroke-width': 1, 'stroke-opacity': 1 }; geoJsonFormated.features.push(geoJson.features[key]); } } } }); fs.unlink(response.filepath, async () => { resolve({ m: 'Loaded', r: geoJsonFormated }); }); }); }); }), kmzToGeojsonPoints: (usr, data) => new Promise((resolve, reject) => { // con el enlace vamos a crear un stream de lectura wget({ url: data.link, dest: './temp/' }, async (error, response, body) => { await KMZtoGeoJson.toGeoJSON(response.filepath, async (err, geoJson) => { if (err) reject({ m: err }); let geoJsonFormated = { type: 'FeatureCollection', features: [] }; await Object.keys(geoJson.features).map(async (key) => { geoJson.features[key].id = key; geoJson.features[key].properties = { _id: key, name: (geoJson.features[key].properties.name !== undefined && geoJson.features[key].properties.name !== '') ? geoJson.features[key].properties.name : `CLS ${key}` }; geoJsonFormated.features.push(geoJson.features[key]); }); fs.unlink(response.filepath, async () => { resolve({ m: 'Loaded', r: geoJsonFormated }); }); }); }); }), };
/////////////////////////////////////////Entry point////////////////////////////////////////// ////Require statements///////////////////////////////////////////// //Require statements allow developers to pull in exported modules //from either current code base or third party saved modules. //Third part modules are brought in by placing them in the package.json //file and then running npm install. You can also run npm install (package) --save //to have the package information stored in package.json for you. const express = require('express'); //express module (third party) const path = require('path'); //used for hosting webpage files from dist into express (third party) const favicon = require('serve-favicon'); //webpage facivon (third party) const logger = require('winston'); //logging module (third party) const bodyParser = require('body-parser'); //module to allow json body to be parsed (mainly used in middleware) (third party) const http = require('http'); //node specific module (used for http based module services) const config = require('config'); //configuartion module. Allows for adding in properties in json format. Can have overrides (third party) const mongoose = require('mongoose'); //mongo module for handling connections with mongo server (third party) const app = express(); const socketServer = require("./lib/socket/socketServer"); mongoose.connect('mongodb://'+ config.get('mongo.hostname') + ':'+config.get('mongo.port')+ '/' + config.get('mongo.db')); //mongoose let db = mongoose.connection; //links in connection with mongo db.on('error', function(err){ logger.error(err); }); db.once('open', function() { logger.info("Connection to Mongo has been opened"); const mongoModels = require('./lib/data/mongo/models'); mongoModels.initialize(); //initializes all mongo models with their schemas app.use(bodyParser.json()); //load in json parsing into the middleware on all routes (express) app.use(express.static(path.join(__dirname, 'dist'))); //setting up routes and tying them to express const scrapper = require('./routes/scrapper'); const newsProfile = require('./routes/profile'); const records = require('./routes/records'); app.use('/scrapper', scrapper); app.use('/newsProfile', newsProfile); app.use('/records', records); app.set('port', 3000); //sets express port to use same as server var server = http.createServer(app); //Creates the node server server.listen(3000); //tells the server to listen on that port socketServer.initializeServer(); }); module.exports = app;
import { createAppContainer, createStackNavigator } from 'react-navigation'; // createSwitchNavigator import Home from '~/pages/home'; import Mesa from '~/pages/mesa'; import Grupo from '~/pages/grupos'; import SubGrupo from '~/pages/subgrupos'; import Produto from '~/pages/produtos'; import Pedido from '~/pages/pedido'; const Routes = createStackNavigator( { HomePage: Home, MesaPage: Mesa, GrupoPage: Grupo, SubGrupoPage: SubGrupo, ProdutoPage: Produto, PedidoPage: Pedido, }, { initialRouteName: 'HomePage', }, ); export default createAppContainer(Routes);
(function(){ /* your code goes here */ $(document).ready(function(){ // create an instance of the Jobs class and use getPositions to send AJAX request to get job listings information window.app.model = new window.app.Jobs(); window.app.model.getPositions(); // these are for use in the 'load more' functionality and the addJobs function so we don't attempt to display // more jobs than what we have stored. var numJobsDisplayed = 0; var totalJobs = 0; /* The main position rendering function. Takes two arguments, searching and searchTerms * searching is true if we're rendering jobs because a search query has occurred. The searchTerms * argument is an array containing the actual search terms. * */ var addJobs = function(searching, searchTerms) { // uses the model to retrieve positions var positions = window.app.model.returnPositions(); // use handlebars to render page templates var template = Handlebars.compile($('#positions_template').html()); var loadMoreTemplate = Handlebars.compile($('#load_more_template').html()); totalJobs = positions.length; var html = "" // if its a normal render without search terms, add ten positions to the page and ten more // with every click on 'show more jobs' card. if (searching === false) { var max = numJobsDisplayed + 10; var limitedPositions = []; // pushes a limited number of positions to an array so that not all positions are rendered at once for (var i = numJobsDisplayed; i < max; i++) { limitedPositions.push(positions[i]); } // handlebars templates require object keys, we need to make the array a value of an object key html = template({positions: limitedPositions}); $('#job-postings').append(html); $('#job-postings').append(loadMoreTemplate); } else { var max = positions.length; var foundMatches = []; // compare each search term with each position title. For each match found, add to the array for (var i = 0; i < max; i++){ for (var j = 0; j < searchTerms.length; j++) { if (positions[i].title.toLowerCase().indexOf(searchTerms[j].toLowerCase()) >= 0){ foundMatches.push(positions[i]); } } } // render the template to show the search matches found html = template({positions: foundMatches}); $('#job-postings').html(html); // if no matches are found, show a helpful message. if (foundMatches.length === 0){ $('#job-postings').append('<h3 class="mt-3">Oh no! No matches found :( try again.</h3>'); } } // Adds a little effect that changes the vertical heading to be whatever the current title is of // the job the user is hovering over. It is a purely aesthetic function. $('.card').on("mouseenter", function(){ var text = $(this).find('h3').text(); $('#job-title-heading').text(text); }); var activeCard = null; /* Listens for a user's click on a card (each job listing is shown on a card) and adds styling * to show which card has been clicked on. Then opens up the left pane to show more details * for that position. Then add's the job's id to the application form so that the form submission * knows which job is being applied for */ $('.job-card').on("click", function(e){ // cache the card activeCard = $(this); // add caret to the current card, remove it from any previous active card. Style card to look active. activeCard.siblings().find('.triangle').addClass('hidden'); activeCard.siblings().removeClass('stay-hovered'); activeCard.addClass('stay-hovered'); activeCard.find('.triangle').removeClass('hidden'); // cache the left pane and make it slide out. Slide animation is done using CSS keyframes. var leftPane = $('#left-pane'); leftPane.removeClass('slideout'); leftPane.addClass('slidein'); $('#more-details').removeClass('hidden'); var cardToRender; // tell the application form which job we're looking at for (var i = 0; i < positions.length; i ++) { if (activeCard.attr('id') === positions[i].id){ cardToRender = positions[i]; $('#position_id').val(positions[i].id); } } var template = Handlebars.compile($('#more_details_template').html()); $('#job-details').html(template(cardToRender)); // if previous application forms have had incomplete submission warnings or completion messages, // we need to remove these to have a fresh application form var invalidInput = $('#invalid-input'); var applicationForm = $('#application-form'); if (!invalidInput.hasClass('hidden')){ invalidInput.addClass('hidden'); } if (applicationForm.hasClass('hidden')){ applicationForm.removeClass('hidden'); } $('#success-message').addClass('hidden'); // listen for a click on the close button and apply the slide animation to the left pane to hide it. // remove styling that makes the clicked-on card appear active. $('#close-button').on("click", function(){ $('#more-details').addClass('hidden'); $('#left-pane').removeClass('slidein'); $('#left-pane').addClass('slideout'); activeCard.find('.triangle').addClass('hidden'); activeCard.removeClass('stay-hovered'); }); }); /* Get the applied-for positions and display them in the briefcase dropdown icon */ $('#my-jobs').on('click', function(){ // Uses the Jobs class in the model.js file to retrieve application data using AJAX window.app.model.getApplications(); // Only do this once we've received data back. $(window).on("fetchedApplications", function(){ var temp = window.app.model.returnApplications(); var applications = temp.applications; var jobids = []; var myjobs = []; var html = "<h4 class='form-label'>My Jobs:</h4>"; // get the positions that have been applied for for (var i = 0; i < applications.length; i++){ jobids.push(applications[i].position_id); } /* compare the applied-for job id's with all of the job id's. if backend were to be refactored, the job title being stored would make this much more efficient */ for (var i = 0; i < jobids.length; i++ ){ console.log(jobids[i]); for (var j = 0; j < positions.length; j++){ if (jobids[i] == positions[j].id){ myjobs.push(positions[j].title); } } } // Add <li> tags (I deemed this too trivial to require a handlebars template) for (var i = 0; i < myjobs.length; i++){ console.log(myjobs[i]); html += "<li>" + myjobs[i] + "</li>"; } // Insert the position titles into the dropdown $('#my-jobs-dropdown').html(html); }); // Show/hide the dropdown menu when briefcase icon clicked. $('#my-jobs-dropdown').toggleClass('hidden'); }); }; /* Listens for submission of an application form, validates that all fields has been entered * and prepares data for post request. Then makes post request to application endpoint '/apply'. * Prevents the browser's default refresh mechanism and calls the clearForm function to reset the * form */ $('#application-form').submit(function(e){ var formData = $( this ).serialize(); // select all children of the type input of the application form var inputs = $('#application-form > input'); // reset the form validation warning message in case it was previously showing, then check for // blank inputs and re-show the warning if blanks are found. var invalidInput = $('#invalid-input'); invalidInput.addClass('hidden'); var hasInvalidInput = false; for (var i = 0; i < inputs.length; i ++){ if (inputs[i].value === ""){ hasInvalidInput = true; } } if (hasInvalidInput) { $('#invalid-input').removeClass('hidden'); } // send AJAX request to /apply and clear the form data on completion. else { $.post({ url: '/apply', data: formData, success: function(data){ clearForm(inputs); } }); } e.preventDefault(); }); // clears application form function clearForm(inputs){ for (var i = 0; i < inputs.length-1; i++){ inputs[i].value = ""; } $('#application-form').addClass('hidden'); $('#success-message').removeClass('hidden'); } /* The initial render function when the job data is first received by the window */ $(window).on("fetchedPositions", function(){ addJobs(false, false); }); /* listens for a click on the outer element, but applies listener to the load more card because when listener is applied, load more card doesn't yet exist because it is created after the job positions are loaded. */ $('#job-postings').on('click', '#load-more-card', function(){ // make sure we don't try to load 10 more if we've loaded all jobs if (numJobsDisplayed < totalJobs-10) { numJobsDisplayed += 10; // Removes the load more card because a new one is appended after more jobs // Have been loaded to avoid having random 'load more' cards throughout results $('#load-more-card').remove(); // Loads more jobs (false, false) means that we are loading normally, not searching. addJobs(false, false); } else { $('#load-more-card').html("<div class='card-details'><h4>Sorry, no jobs found.</h4></div>"); } // Smoothly scrolls the view down to where the newly loaded jobs are $('#right-pane').animate({ scrollTop: $("#right-pane").prop("scrollHeight") }, 1000); }); /* Handles the search box submissions. It finds and prepares the values from the search box to be sent to the * addJobs function to display the found positions on the page. */ $('#search-box').submit(function(e){ // Make sure page doesn't refresh on submission. e.preventDefault(); var searching = true; // get values and trim any white space from the ends var values = $('#search').val().trim() // split the search terms into separate array values because that is what the addJobs function expects var searchTerms = values.split(" "); // reset the search box to be blank $('#search-box').find('input:text').val(''); // hides the search box and reveal the 'search again' button to prevent strange behaviour, // these are toggled in the #search-again event handler below $('#search-box').addClass('hidden'); $('#search-again').removeClass('hidden'); // use the addJobs function to render the search items to the page. addJobs(searching, searchTerms); }); $('#search-again').on('click', function(){ // fix for strange search behaviour $('#search-again').addClass('hidden'); $('#search-box').removeClass('hidden'); $('#job-postings').html(""); addJobs(false, false); }) }); })();
#!/usr/bin/nodejs /* Mashes together a bunch of different apps into a big binary blob. We then store this *inside* the Bangle.js firmware and can use it to populate Storage initially. Bangle.js 1 doesn't really have anough flash space for this, but we have enough on v2. */ var SETTINGS = { pretokenise : true }; var DEVICE = process.argv[2]; var path = require('path'); var ROOTDIR = path.join(__dirname, '..'); var APPDIR = ROOTDIR+'/apps'; var MINIFY = true; var OUTFILE, APPS; if (DEVICE=="BANGLEJS") { var OUTFILE = path.join(ROOTDIR, '../Espruino/libs/banglejs/banglejs1_storage_default.c'); var APPS = [ // IDs of apps to install "boot","launch","mclock","setting", "about","alarm","widbat","widbt","welcome" ]; } else if (DEVICE=="BANGLEJS2") { var OUTFILE = path.join(ROOTDIR, '../Espruino/libs/banglejs/banglejs2_storage_default.c'); var APPS = [ // IDs of apps to install "boot","launch","antonclk","setting", "about","alarm","health","widlock","widbat","widbt","widid","welcome" ]; } else { console.log("USAGE:"); console.log(" bin/firmwaremaker_c.js BANGLEJS"); console.log(" bin/firmwaremaker_c.js BANGLEJS2"); process.exit(1); } console.log("Device = ",DEVICE); var fs = require("fs"); global.Const = { /* Are we only putting a single app on a device? If so apps should all be saved as .bootcde and we write info about the current app into app.info */ SINGLE_APP_ONLY : false, }; function atob(input) { // Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149 // This code was written by Tyler Akins and has been placed in the // public domain. It would be nice if you left this header intact. // Base64 code from Tyler Akins -- http://rumkin.com var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; var output = []; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; // remove all characters that are not A-Z, a-z, 0-9, +, /, or = input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); do { enc1 = keyStr.indexOf(input.charAt(i++)); enc2 = keyStr.indexOf(input.charAt(i++)); enc3 = keyStr.indexOf(input.charAt(i++)); enc4 = keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output.push(chr1); if (enc3 !== 64) { output.push(chr2); } if (enc4 !== 64) { output.push(chr3); } } while (i < input.length); return new Uint8Array(output); } var AppInfo = require(ROOTDIR+"/core/js/appinfo.js"); var appfiles = []; function fileGetter(url) { console.log("Loading "+url) if (MINIFY) { if (url.endsWith(".json")) { var f = url.slice(0,-5); console.log("MINIFYING JSON "+f); var j = eval("("+fs.readFileSync(url).toString("binary")+")"); var code = JSON.stringify(j); //console.log(code); url = f+".min.json"; fs.writeFileSync(url, code); } } var blob = fs.readFileSync(url); var data; if (url.endsWith(".js") || url.endsWith(".json")) data = blob.toString(); // allow JS/etc to be written in UTF-8 else data = blob.toString("binary") return Promise.resolve(data); } // If file should be evaluated, try and do it... function evaluateFile(file) { var hsStart = 'require("heatshrink").decompress(atob("'; var hsEnd = '"))'; if (file.content.startsWith(hsStart) && file.content.endsWith(hsEnd)) { var heatshrink = require(ROOTDIR+"/core/lib/heatshrink.js"); var b64 = file.content.slice(hsStart.length, -hsEnd.length); var decompressed = heatshrink.decompress(atob(b64)); file.content = ""; for (var i=0;i<decompressed.length;i++) file.content += String.fromCharCode(decompressed[i]); return; } // if JSON just pass through. We could try and minify. if (file.name.endsWith(".json")) { return; } // else... uh-oh console.log(file); throw new Error("Unable to evaluate "+file.name); } Promise.all(APPS.map(appid => { try { var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "/metadata.json").toString()); } catch (e) { throw new Error(`App ${appid} not found`); } return AppInfo.getFiles(app, { fileGetter : fileGetter, settings : SETTINGS, device : { id : DEVICE } }).then(files => { appfiles = appfiles.concat(files); }); })).then(() => { // work out what goes in storage var storageContent = ""; appfiles.forEach((file) => { //console.log(file); if (file.evaluate) evaluateFile(file); var fileLength = file.content.length; console.log(file.name+" -> "+fileLength+"b"); // set up header var header = new Uint8Array(32); header.fill(0); header.set([fileLength,fileLength>>8,fileLength>>16,fileLength>>24],0); // length for (var i=0;i<file.name.length;i++) header[4+i] = file.name.charCodeAt(i); // add header and file content storageContent += String.fromCharCode.apply(String, header); storageContent += file.content; // pad length while (fileLength&3) { storageContent += "\xff"; fileLength++; } }); // work out file contents var cfile = `// Initial storage contents for Bangle.js 2.0 // Generated by BangleApps/bin/build_bangles_c.js const int jsfStorageInitialContentLength = ${storageContent.length}; const char jsfStorageInitialContents[] = { `; for (var i=0;i<storageContent.length;i+=32) { var chunk = storageContent.substr(i,32); cfile += chunk.split("").map(c=>c.charCodeAt()).join(",")+",\n"; } cfile += `}; `; fs.writeFileSync(OUTFILE, cfile); console.log("Output written to "+OUTFILE); });
'use strict'; import {ColorSlider,Slider,ColorGradient,Parent,LContainer} from '../src/index.js'; const cg1 =new ColorGradient({height:100,width:10,sliders:{ s1: new Slider({ value:0.5, r:5, type:'y', con:'mid', isexterior:false, isinterior:false, iscursor:true, callbacks:{ value:(value)=>console.log('value'), color:()=>console.log('color')} }), }}); const cg2 =new ColorGradient({height:20,width:100,sliders:{ s1: new Slider({ value:0.5, r:5, type:'x', con:'mid', isexterior:false, isinterior:false, iscursor:true, callbacks:{ value:(value)=>console.log('value'), color:()=>console.log('color')} }), }}); const cg3 =new ColorGradient({height:100,width:10,sliders:{ s1: new Slider({ value:1, r:5, type:'y', con:'mid', isexterior:false, isinterior:false, iscursor:false, iscursorcircle:true, callbacks:{ value:(value)=>console.log('value'), color:()=>console.log('color')} }), s2: new Slider({ value:0, r:5, type:'y', con:'mid', isexterior:false, isinterior:false, iscursor:false, iscursorcircle:true, callbacks:{ value:(value)=>console.log('value'), color:()=>console.log('color')} }), }}); const cg4 =new ColorGradient({ addable:true, height:150, width:10, sliders:{ s1: new ColorSlider({ rgba:{r:255,g:0,b:0,a:1}, value:0, r:5, type:'y', con:'mid', isexterior:false, isinterior:false, iscursor:false, iscursorcircle:true, callbacks:{ value:(value)=>console.log('value'), color:()=>console.log('color')} }), s2: new ColorSlider({ rgba:{r:255,g:255,b:0,a:1}, value:1, r:5, type:'y', con:'mid', isexterior:false, isinterior:false, iscursor:false, iscursorcircle:true, callbacks:{ value:(value)=>console.log('value'), color:()=>console.log('color')} }), }}); cg1.render(Parent); cg2.render(Parent); cg3.render(Parent); cg4.render(Parent);
const { compose, head, map, nth } = require('ramda'); const Task = require('folktale/concurrency/task'); const { fromNullable } = require('folktale/maybe'); const logTaskProgress = require('../utils/logTaskProgress'); const { truncateTable, insertAllMinuteCandles, insertAllCandles, selectCandlesByMinute, insertOrUpdateCandles, selectLastCandle, selectLastExchangeTx, insertOrUpdateCandlesFromShortInterval, selectMinTimestampFromHeight, } = require('./sql/query'); /** for combining candles */ const intervalPairs = [ [60, 300], // 1m -> 5m [300, 900], // 5m -> 15m [900, 1800], // 15m -> 30m [1800, 3600], // 30m -> 1h [3600, 10800], // 1h -> 3h [10800, 21600], // 3h -> 6h [21600, 43200], // 6h -> 12h [43200, 86400], // 12h -> 24h ]; /** getStartBlock :: (Object, Object) -> Number */ const getStartBlock = (exchangeTx, candle) => { if (candle && exchangeTx) { if (candle.max_height > exchangeTx.height) { return exchangeTx.height - 2000; // handle rollback } else { return candle.max_height - 1; } } return 1; }; /** updateCandlesLoop :: (LogTask, Pg, String) -> Task */ const updateCandlesLoop = (logTask, pg, tableName) => { const logMessages = { start: timeStart => ({ message: '[CANDLES] start updating candles', time: timeStart, }), error: (e, timeTaken) => { return { message: '[CANDLES] update error', time: timeTaken, error: e, }; }, success: (_, timeTaken) => ({ message: '[CANDLES] update successful', time: timeTaken, }), }; const pgPromiseUpdateCandles = (t, fromTimetamp) => t .any(selectCandlesByMinute(fromTimetamp)) .then(candles => t.any(insertOrUpdateCandles(tableName, candles))); return logTask( logMessages, pg.tx(t => t .batch([ t.any(selectLastExchangeTx()), t.any(selectLastCandle(tableName)), ]) .then(([lastTx, candle]) => { const startHeight = getStartBlock(head(lastTx), head(candle)); return t .one(selectMinTimestampFromHeight(startHeight)) .then(row => row.time_stamp); }) .then(timestamp => { const nextInterval = compose( m => m.getOrElse(undefined), map(interval => t.any( insertOrUpdateCandlesFromShortInterval( tableName, timestamp, interval[0], interval[1] ) ) ), fromNullable, index => nth(index, intervalPairs) ); return pgPromiseUpdateCandles(t, timestamp).then(() => t.sequence(nextInterval) ); }) ) ); }; /** fillCandlesDBAll :: (LogTask, Pg, String) -> Task */ const fillCandlesDBAll = (logTask, pg, tableName) => logTask( { start: timeStart => ({ message: '[DB] start filling', time: timeStart, }), error: (e, timeTaken) => ({ message: '[DB] fill error', time: timeTaken, error: e, }), success: (_, timeTaken) => ({ message: '[DB] fill successful', time: timeTaken, }), }, pg.tx(t => t.batch([ t.any(truncateTable(tableName)), t.any(insertAllMinuteCandles(tableName)), ...intervalPairs.map(([shorter, longer]) => t.any(insertAllCandles(tableName, shorter, longer)) ), ]) ) ); module.exports = ({ logger, pg }, configuration) => { const unsafeLogTaskProgress = logTaskProgress(logger); return { init: () => { if (configuration.candlesTruncateTable) return fillCandlesDBAll( unsafeLogTaskProgress, pg, configuration.candlesTableName ); else return Task.of(); }, loop: () => updateCandlesLoop( unsafeLogTaskProgress, pg, configuration.candlesTableName ), }; };
/** * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ /** * @fileOverview Defines the {@link CKEDITOR.lang} object, for the * Chinese Traditional language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang[ 'zh' ] = { /** * The language reading direction. Possible values are "rtl" for * Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right * languages (like English). * @default 'ltr' */ dir: 'ltr', // ARIA description. editor: '富文本編輯器', // Common messages and labels. common: { // Screenreader titles. Please note that screenreaders are not always capable // of reading non-English words. So be careful while translating it. editorHelp: '按 ALT+0 以獲得幫助', browseServer: '瀏覽伺服器端', url: 'URL', protocol: '通訊協定', upload: '上傳', uploadSubmit: '上傳至伺服器', image: '影像', flash: 'Flash', form: '表單', checkbox: '核取方塊', radio: '選項按鈕', textField: '文字方塊', textarea: '文字區域', hiddenField: '隱藏欄位', button: '按鈕', select: '清單/選單', imageButton: '影像按鈕', notSet: '<尚未設定>', id: 'ID', name: '名稱', langDir: '語言方向', langDirLtr: '由左而右 (LTR)', langDirRtl: '由右而左 (RTL)', langCode: '語言代碼', longDescr: '詳細 URL', cssClass: '樣式表類別', advisoryTitle: '標題', cssStyle: '樣式', ok: '確定', cancel: '取消', close: '关闭', preview: '预览', resize: '拖拽改變大小', generalTab: '一般', advancedTab: '進階', validateNumberFailed: '需要輸入數字格式', confirmNewPage: '現存的修改尚未儲存,要開新檔案?', confirmCancel: '部份選項尚未儲存,要關閉對話盒?', options: '选项', target: '目标', targetNew: '新窗口(_blank)', targetTop: '整页(_top)', targetSelf: '本窗口(_self)', targetParent: '父窗口(_parent)', langDirLTR: '由左而右 (LTR)', langDirRTL: '由右而左 (RTL)', styles: '樣式', cssClasses: '樣式表類別', width: '寬度', height: '高度', align: '對齊', alignLeft: '靠左對齊', alignRight: '靠右對齊', alignCenter: '置中', alignTop: '靠上對齊', alignMiddle: '置中對齊', alignBottom: '靠下對齊', invalidValue : 'Invalid value.', // MISSING invalidHeight: '高度必須為數字格式', invalidWidth: '寬度必須為數字格式', invalidCssLength: 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING invalidHtmlLength: 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING invalidInlineStyle: 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING cssLengthTooltip: 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING // Put the voice-only part of the label in the span. unavailable: '%1<span class="cke_accessibility">, 已關閉</span>' } };
import React, {useState} from 'react'; import {useSelector, useDispatch} from 'react-redux'; import {sortedCopy, byIndex} from 'utils/mahjong/helper'; import scoreMove from 'utils/mahjong/scoreTileEfficiency'; import {discardTile, drawTile} from 'slices/game'; import TileGroup from 'components/TileGroup'; import Tile from 'components/Tile'; import GameOver from 'components/modals/GameOver'; import styles from './Game.module.scss'; function ukeireTiles(tiles, count) { return ( <span> <TileGroup tiles={tiles} /> ({count} tiles) </span> ); } function explanation(move) { if (!move || !move.ideal) return <></>; if ( move.ideal.shanten >= move.player.shanten && move.ideal.ukeireCount <= move.player.ukeireCount ) return ( <span> Hand improved by{' '} {ukeireTiles(move.player.ukeireTiles, move.player.ukeireCount)}. </span> ); else if (move.ideal.shanten < move.player.shanten) { return ( <span> Discarding <Tile id={move.ideal.discard} /> would have resulted in{' '} {move.ideal.shanten} shanten, improved by{' '} {ukeireTiles(move.ideal.ukeireTiles, move.ideal.ukeireCount)} Your move: {move.player.shanten} shanten, improved by {ukeireTiles(move.player.ukeireTiles, move.player.ukeireCount)}. </span> ); } else if (move.ideal.ukeireCount > move.player.ukeireCount) { return ( <span> Discarding <Tile id={move.ideal.discard} /> would result in hand improved by{' '} {ukeireTiles(move.ideal.ukeireTiles, move.ideal.ukeireCount)}. Your move improved by{' '} {ukeireTiles(move.player.ukeireTiles, move.player.ukeireCount)} </span> ); } } export default function Game() { const [gameOver, setGameOver] = useState(false); const toggleGameOver = () => setGameOver(!gameOver); const game = useSelector((state) => state.game); const seenTiles = byIndex(game.seenTiles); const moves = [...game.moves].reverse(); const dispatch = useDispatch(); function discard(id) { const results = scoreMove( sortedCopy([...game.hand, game.drawnTile]), id, seenTiles ); let efficiency = null; if (results.gameOver) { dispatch(discardTile({player: results.player, efficiency})); return toggleGameOver(); } else if (results.badMove === 'SHANTEN') { efficiency = 0; } else if (results.badMove === 'UKEIRE') { efficiency = Math.floor( (results.player.ukeireCount / results.ideal.ukeireCount) * 100 ); } else { efficiency = 100; } dispatch( discardTile({ player: results.player, ideal: results.ideal, efficiency, }) ); if (game.wall.length) { dispatch(drawTile()); } else { return toggleGameOver(); } } return ( <main className={styles.Game}> {gameOver && ( <GameOver toggle={() => window.location.assign('/highscores')} /> )} <header> <div className={styles.handInfo}> <p> {game.player?.shanten && ( <span>{game.player.shanten} Shanten </span> )} {game.player?.ukeireCount && ( <span>{game.player.ukeireCount} Ukeire </span> )} {game.efficiency && <span>{game.efficiency}% efficient</span>} </p> </div> <div className={styles.dora}> <TileGroup tiles={[game.doraIndicators[0], 'back', 'back', 'back', 'back']} /> <h2>Dora</h2> </div> </header> <h2>Seen Tiles</h2> <div className={styles.seenTiles}> {seenTiles.map((tile, idx) => ( <div className={styles.tileCounter} key={tile}> <Tile key={tile} id={idx} /> {tile.length > 1 && <span>x{tile.length}</span>} </div> ))} </div> <section className={styles.hand}> <h2>Your Hand</h2> <aside>click / tap to discard</aside> <div className={styles.tileSet}> <TileGroup tiles={sortedCopy(game.hand)} clickHandler={discard} /> <div className={styles.drawn}> <Tile id={game.drawnTile} clickHandler={() => discard(game.drawnTile)} /> </div> </div> </section> <section className={styles.moves}> <h2>Moves</h2> {moves.map((move, idx) => ( <div key={idx} className={styles.move}> <TileGroup tiles={sortedCopy(move.hand)} /> <div className={styles.discard}> <Tile id={move.player.discard} /> </div> <div> <span> ({move.player.shanten} Shanten, {move.player.ukeireCount}{' '} Ukeire) </span> <span> {move.efficiency}% efficient {explanation(move)} </span> </div> </div> ))} </section> </main> ); }
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/builtin/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _default = (0, _createSvgIcon.default)(_react.default.createElement(_react.default.Fragment, null, _react.default.createElement("path", { fill: "none", d: "M0 0h24v24H0V0z" }), _react.default.createElement("g", null, _react.default.createElement("path", { d: "M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71C20.66 8.78 16.54 7 12 7z" }))), 'CallEndOutlined'); exports.default = _default;
export default (axios, store) => ({ getAll () { return axios.get('api/sequences').then((response) => { store.commit('sequences/setAllSequences', response.data) return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, get (id) { return axios.get(`api/sequences/${id}`).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, update (id, payload) { return axios.put(`api/sequences/${id}`, payload).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, create (payload) { return axios.post(`api/sequences`, payload).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, remove (id) { return axios.delete(`api/sequences/${id}`).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, createExternalMessage (payload) { return axios.post(`api/external_messages`, payload).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, sendTestMessage (id) { return axios.post(`api/send_test_message/${id}`).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, createAdminTask (payload) { if (payload.date === '') { delete payload.date } return axios.post(`api/sequence/admin_task`, payload).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) }, duplicate (id) { return axios.post(`api/${id}/duplicate`).then((response) => { return response.data }).catch((error) => { return Promise.reject(error.response.data) }) } })
import React from 'react'; import PropTypes from 'prop-types'; import { IndexPageTemplate } from '../../templates/index-page'; const IndexPagePreview = ({ entry, getAsset }) => { const data = entry.getIn([ 'data' ]).toJS(); if (data) { const { image, heading, subheading, blurbs, sections, final } = data; return ( // <IndexPageTemplate // title={data.title} // image={data.image} // heading={data.heading} // subheading={data.subheading} // description={data.description} // blurbs={data.blurbs} // sections={data.sections} // final={data.final} // /> <IndexPageTemplate image={image} heading={heading} subheading={subheading} blurbs={blurbs} sections={sections} final={final} /> ); } else { return <div>Loading...</div>; } }; IndexPagePreview.propTypes = { entry: PropTypes.shape({ getIn: PropTypes.func }), getAsset: PropTypes.func }; export default IndexPagePreview;
import { Link } from 'gatsby' import get from 'lodash/get' import React from 'react' import map from 'lodash/map' import Img from 'gatsby-image' import Meta from '../../components/Meta/index' import Footer from 'components/Footer' import Layout from 'components/Layout' import './style.scss' export const Post = node => { const html = node.remark.html const { category, tags, description, title, path, date, image, } = node.remark.frontmatter const link = `/posts/${node.name}` const fluid = get(node, 'remark.frontmatter.image.childImageSharp.fluid') return ( <article className="container p-0 card my-4 shadow" key={node.absolutePath}> <div className="card-header"> <span className="text-muted">{category}</span> <time className="text-muted float-right" dateTime={date}> {date} </time> </div> {fluid ? ( <Img fluid={fluid} style={{ display: 'block', margin: '0 auto' }} /> ) : ( '' )} <div className="card-body"> <h1 className=""> <Link className="" to={link}> {title} </Link> </h1> <div className="content" dangerouslySetInnerHTML={{ __html: html }} /> </div> </article> ) } const PostContainer = ({ data, options }) => { const { category, tags, description, title, path, date, image, } = data.post.edges[0].node.remark.frontmatter const isIndex = false // const { isIndex, adsense } = options const html = get(data.post.edges[0].node.remark, 'html') const isMore = isIndex && !!html.match('<!--more-->') // const fixed = get(image, 'childImageSharp.fixed') let node = data.post.edges[0].node return ( <Layout location={`${data.post.edges[0].node.sourceInstanceName}/${ data.post.edges[0].node.relativeDirectory }/${data.post.edges[0].node.name}`} > <Meta site={get(data, 'site.meta')} /> <div className="container px-0">{Post(node)}</div> </Layout> ) } export default PostContainer const getDescription = body => { body = body.replace(/<blockquote>/g, '<blockquote class="blockquote">') if (body.match('<!--more-->')) { body = body.split('<!--more-->') if (typeof body[0] !== 'undefined') { return body[0] } } return body } const Button = ({ path, label, primary }) => ( <Link className="readmore" to={path}> <span className={`btn btn-outline-primary btn-block ${ primary ? 'btn-outline-primary' : 'btn-outline-secondary' }`} > {label} </span> </Link> ) const Badges = ({ items, primary }) => map(items, (item, i) => { return ( <span className={`p-2 badge ${primary ? 'badge-primary' : 'badge-white'}`} key={i} > <i class="fa fa-tags" /> {item} </span> ) }) export const pageQuery = graphql` query PostByPath($absolutePath: String!) { site { meta: siteMetadata { title description url: siteUrl author twitter adsense } } post: allFile(filter: { absolutePath: { eq: $absolutePath } }) { edges { node { id: absolutePath relativePath relativeDirectory absolutePath sourceInstanceName name ext birthTime(formatString: "YYYY-MM-DD hh:mm:ss") changeTime(formatString: "YYYY-MM-DD hh:mm:ss") remark: childMarkdownRemark { id html frontmatter { layout title link date(formatString: "YYYY/MM/DD") publishDate: date category tags description captions remoteImage image { childImageSharp { fluid(maxWidth: 738) { tracedSVG aspectRatio src srcSet srcWebp srcSetWebp sizes } } } images { childImageSharp { fixed(width: 708, height: 555, cropFocus: ATTENTION) { tracedSVG aspectRatio src srcSet srcWebp srcSetWebp } } } } } } } } } `
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // compiled file. // // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. // //= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require turbolinks //= require moment //= require semantic-ui //= require semantic-rails-ui/behaviour //= require semantic-rails-ui/menu //= require semantic-rails-ui/message //= require semantic-rails-ui/confirm
/** * @license * Copyright 2013 Palantir Technologies, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ "use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var ts = require("typescript"); var Lint = require("../index"); var Rule = (function (_super) { __extends(Rule, _super); function Rule() { return _super !== null && _super.apply(this, arguments) || this; } Rule.prototype.apply = function (sourceFile) { return this.applyWithWalker(new NoInternalModuleWalker(sourceFile, this.getOptions())); }; return Rule; }(Lint.Rules.AbstractRule)); /* tslint:disable:object-literal-sort-keys */ Rule.metadata = { ruleName: "no-internal-module", description: "Disallows internal `module`", rationale: "Using `module` leads to a confusion of concepts with external modules. Use the newer `namespace` keyword instead.", optionsDescription: "Not configurable.", options: null, optionExamples: ["true"], type: "typescript", typescriptOnly: true, }; /* tslint:enable:object-literal-sort-keys */ Rule.FAILURE_STRING = "The internal 'module' syntax is deprecated, use the 'namespace' keyword instead."; exports.Rule = Rule; var NoInternalModuleWalker = (function (_super) { __extends(NoInternalModuleWalker, _super); function NoInternalModuleWalker() { return _super !== null && _super.apply(this, arguments) || this; } NoInternalModuleWalker.prototype.visitModuleDeclaration = function (node) { if (this.isInternalModuleDeclaration(node)) { var start = this.getStartBeforeModule(node); this.addFailureAt(node.getStart() + start, "module".length, Rule.FAILURE_STRING); } _super.prototype.visitModuleDeclaration.call(this, node); }; NoInternalModuleWalker.prototype.isInternalModuleDeclaration = function (node) { // an internal module declaration is not a namespace or a nested declaration // for external modules, node.name.kind will be a LiteralExpression instead of Identifier return !Lint.isNodeFlagSet(node, ts.NodeFlags.Namespace) && !Lint.isNestedModuleDeclaration(node) && node.name.kind === ts.SyntaxKind.Identifier && !isGlobalAugmentation(node); }; NoInternalModuleWalker.prototype.getStartBeforeModule = function (node) { return node.getText().indexOf("module"); }; return NoInternalModuleWalker; }(Lint.RuleWalker)); function isGlobalAugmentation(node) { // augmenting global uses a special syntax that is allowed // see https://github.com/Microsoft/TypeScript/pull/6213 return node.name.kind === ts.SyntaxKind.Identifier && node.name.text === "global"; }
const match = require('./match'); var express = require('express'); // Express web server framework var request = require('request'); // "Request" library var cors = require('cors'); var querystring = require('querystring'); var cookieParser = require('cookie-parser'); const { json, Router } = require('express'); // var propertiesReader = require('properties-reader'); // var properties = propertiesReader('deploy.txt'); var client_id = process.env.client_id; // Your client id var client_secret = process.env.client_secret; // Your secret // var client_id = 'df9043305ece4ffca058fc21df83e5ea'; // Your client id // var client_secret = '2971e26e194e49128631cc5bf66f55f1'; // Your secret var port = process.env.PORT || 8888; var redirect_uri = 'https://hotandcoldspotify.herokuapp.com/callback'; // Your redirect uri console.log("Port: ", port); var user_info = {}; //dictionary that holds user information var artist_list = []; //list of dictionaries that holds a list of a user's top artists and info about that artists var genre_list = []; //list of your top genres var songs_list = []; //list of your top songs /** * Generates a random string containing numbers and letters * @param {number} length The length of the string * @return {string} The generated string */ var generateRandomString = function (length) { var text = ''; var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; for (var i = 0; i < length; i++) { text += possible.charAt(Math.floor(Math.random() * possible.length)); } return text; }; var stateKey = 'spotify_auth_state'; var app = express(); app.use(express.static(__dirname + '/public')) .use(cors()) .use(cookieParser()); /** * GET request of login through spotify and get user authentication */ app.get('/login', function (req, res) { var state = generateRandomString(16); res.cookie(stateKey, state); console.log("Host is: ", request.headers.host) // your application requests authorization var scope = 'user-read-private user-read-email user-top-read'; res.redirect('https://accounts.spotify.com/authorize?' + querystring.stringify({ response_type: 'code', client_id: client_id, scope: scope, redirect_uri: redirect_uri, state: state })); }); /** * GET request for the callback function to use the Spotify Web APIs and * get user data from Spotify libraries (User Information, Personalization * Artist, Personalization Tracks) */ app.get('/callback', function (req, res) { // your application requests refresh and access tokens // after checking the state parameter var code = req.query.code || null; var state = req.query.state || null; var storedState = req.cookies ? req.cookies[stateKey] : null; if (state === null || state !== storedState) { res.redirect('/#' + querystring.stringify({ error: 'state_mismatch' })); } else { res.clearCookie(stateKey); var authOptions = { url: 'https://accounts.spotify.com/api/token', form: { code: code, redirect_uri: redirect_uri, grant_type: 'authorization_code' }, headers: { 'Authorization': 'Basic ' + (new Buffer(client_id + ':' + client_secret).toString('base64')) }, json: true }; request.post(authOptions, function (error, response, body) { //if we have a valid authentication code, get data if (!error && response.statusCode === 200) { var access_token = body.access_token, refresh_token = body.refresh_token; var options = { url: 'https://api.spotify.com/v1/me', headers: { 'Authorization': 'Bearer ' + access_token }, json: true }; var artists = { url: 'https://api.spotify.com/v1/me/top/artists', headers: { 'Authorization': 'Bearer ' + access_token }, json: true }; var tracks = { url: 'https://api.spotify.com/v1/me/top/tracks', headers: { 'Authorization': 'Bearer ' + access_token }, json: true }; //populates the user_info with relavent information from JSON request.get(options, function (error, response, body) { user_info["displayName"] = body["display_name"]; if(body["images"][0] == undefined) user_info["profilePic"] = "images/no_profile.png"; else user_info["profilePic"] = body["images"][0]["url"]; user_info["userUrl"] = body["external_urls"]["spotify"]; }); //populates the genre_list and artist_list with relavent information from JSON request.get(artists, function (error, response, body) { var i; for (i = 0; i < body["items"].length; i++) { var dict = {}; dict["artistName"] = body["items"][i]["name"]; dict["artistPic"] = body["items"][i]["images"][0]["url"]; dict["artistUrl"] = body["items"][i]["external_urls"]["spotify"]; artist_list[i] = dict; var j = 0; artist_genres = body["items"][i]["genres"]; while (genre_list.includes(artist_genres[j]) && j < artist_genres.length) { j++; } if (artist_genres[j] != undefined) // incase all the genres of at artist has been seen before genre_list.push(artist_genres[j]); } }); //populates the song_list with relavent information from JSON request.get(tracks, async function (error, response, body) { var i; for (i = 0; i < body["items"].length; i++) { var dict = {}; dict["songName"] = body["items"][i]["name"]; dict["songPicture"] = body["items"][i]["album"]["images"][0]["url"]; dict["songUrl"] = body["items"][i]["external_urls"]["spotify"]; var artists = []; var j; for (j = 0; j < body["items"][i]["artists"].length; j++) { artists.push(body["items"][i]["artists"][j]["name"]) } dict["songArtists"] = artists; songs_list.push(dict); } }); // we can also pass the token to the browser to make requests from there res.redirect('/#' + querystring.stringify({ access_token: access_token, refresh_token: refresh_token })); } else { res.redirect('/#' + querystring.stringify({ error: 'invalid_token' })); } }); } }); /** * GET request for the request token, not really used in this application */ app.get('/refresh_token', function (req, res) { // requesting access token from refresh token var refresh_token = req.query.refresh_token; var authOptions = { url: 'https://accounts.spotify.com/api/token', headers: { 'Authorization': 'Basic ' + (new Buffer(client_id + ':' + client_secret).toString('base64')) }, form: { grant_type: 'refresh_token', refresh_token: refresh_token }, json: true }; request.post(authOptions, function (error, response, body) { if (!error && response.statusCode === 200) { var access_token = body.access_token; res.send({ 'access_token': access_token }); } }); }); /** * POST request to get the Dictionary matches and send to frontEnd; takes no * inputs since everything needed is stored in global variables */ app.post('/dictionary-matches', async function (req, res) { //creates a dictionary with user's data userDict = match.createDatabaseDict(user_info, genre_list, songs_list, artist_list); //creates a dictionary with the user's hot matches, cold matches, and percentages matchDict = await match.getMatches(userDict); //creates a dictionary that includes the data, and sucess variable to indicate sucess input = { data: matchDict, user: userDict, success: true }; res.send(input); //sends input to url }); app.listen(process.env.PORT || 8888);
import React, { Component } from "react"; import Img from "gatsby-image"; import styled from "styled-components"; const CriteriaSection = styled.section` display: flex; flex-wrap: wrap; justify-content: center; align-items: center; position: relative; width: 100%; min-height: 60rem; `; const CriteriaBackground = styled.div` position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; .gatsby-image-wrapper { width: 100%; height: 100%; } img { object-position: cover; } `; const CriteriaContent = styled.div` width: 100%; max-width: 70rem; margin: 0 auto; padding: 2rem; h2, h3, p { color: ${props => props.theme.deepYellow}; text-align: center; } h2 { margin: 0; font-family: ${props => props.theme.fontSec}; font-weight: 300; line-height: 1; } h3 { font-weight: 500; text-transform: uppercase; } p { font-weight: 300; font-size: 2rem; @media (min-width: ${props => props.theme.bpTablet}) { font-size: 2.4rem; } } `; class Criteria extends Component { render() { return ( <CriteriaSection> <CriteriaContent> <div> <h2>Criteria</h2> <h3>Requirement Rules</h3> </div> <div dangerouslySetInnerHTML={{ __html: this.props.data.criteriaContent }} /> </CriteriaContent> <CriteriaBackground> <Img fluid={ this.props.data.criteriaImage.localFile.childImageSharp.fluid } alt="The Criteria" /> </CriteriaBackground> </CriteriaSection> ); } } export default Criteria;
/** * @file rip command * @author Sankarsan Kampa (a.k.a k3rn31p4nic) * @license MIT */ exports.exec = (Bastion, message, args) => { message.channel.send({ embed: { color: Bastion.colors.BLUE, title: `R.I.P ${args.length ? args.join(' ') : 'Everything'}`, image: { url: 'https://resources.bastionbot.org/images/tombstone_rip.png' }, footer: { text: 'May the Soul Rest in Peace.' } } }).catch(e => { Bastion.log.error(e); }); }; exports.config = { aliases: [], enabled: true }; exports.help = { name: 'rip', botPermission: '', userTextPermission: '', userVoicePermission: '', usage: 'rip <text>', example: [ 'rip Grammar' ] };
// app.shoppingListAddController.js (function() { "use strict"; angular.module("MyApp") .controller("ShoppingListAddController", ShoppingListAddController); ShoppingListAddController.$inject = ["ShoppingListService"]; function ShoppingListAddController(ShoppingListService) { let AddCtrl = this; AddCtrl.itemName = ""; AddCtrl.itemQuantity = ""; AddCtrl.addItem = addItem; function addItem() { ShoppingListService.addItem(AddCtrl.itemName, AddCtrl.itemQuantity); AddCtrl.itemName = ""; AddCtrl.itemQuantity = ""; } } })();
!function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";H5P.SimpleMultiChoice=n(1).default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();n(3);var u=n(2),l=i(u),h=0,d=function(e){function t(e){var n=e.question,i=e.alternatives,c=void 0===i?[]:i,s=e.inputType,u=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});a(this,t);var d=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return d.uniqueName="h5p-simple-multiple-choice-"+h,h+=1,d.listItems=[],d.feedbackElements=[],d.state=c.map(function(e,t){return{id:t,text:e.text,checked:!1}}),d.hasFeedback=c.some(function(e){return e.feedback.chosenFeedback||e.feedback.notChosenFeedback}),d.feedbackShown=!1,d.xapiGenerator=new l.default({question:n,alternatives:c}),d.attach=function(e){var t=document.createElement("div");t.className="h5p-simple-multiple-choice";var n=document.createElement("div");n.classList.add("h5p-simple-multiple-choice-question"),n.classList.add("h5p-subcontent-question");var i=this.createQuestion(this.uniqueName);n.appendChild(i),t.appendChild(n);var a=this.createAlternativesList(this.uniqueName);t.appendChild(a),e.get(0).appendChild(t)},d.createQuestion=function(e){var t=document.createElement("div");return t.id=e,t.innerHTML=n,t},d.handleInputChange=function(e){this.feedbackShown&&(this.feedbackElements.forEach(function(e){e.parentNode.removeChild(e)}),this.feedbackElements=[],this.feedbackShown=!1,this.trigger("allow-finish-changed")),this.state=this.state.map(function(t,n){var i=n===e;return"radio"!==s&&(i=n===e?!t.checked:t.checked),o({},t,{checked:i})});var t=this.createXAPIEventTemplate("interacted"),n=this.xapiGenerator.generateXApi(t,this.state);this.trigger(n)},d.createAlternativesList=function(e){var t=this;if(!this.state.length){var n=document.createElement("div");return n.className="h5p-simple-multiple-choice-alternatives-error",n.textContent="ERROR: No alternatives chosen",n}var i=document.createElement("ul");return i.classList.add("h5p-simple-multiple-choice-alternatives"),i.classList.add("h5p-subcontent-body"),i.setAttribute("role","listbox"),i.setAttribute("aria-labelledby",e),this.state.forEach(function(e){var n=e.id,a=e.text,r=e.checked,c=document.createElement("li");c.className="h5p-simple-multiple-choice-alternative-li";var o=document.createElement("label"),u=document.createElement("input");u.className="h5p-simple-multiple-choice-alternative-input",u.type=s||"checkbox",u.name=t.uniqueName,r&&u.setAttribute("checked","checked"),o.addEventListener("change",t.handleInputChange.bind(t,n)),o.appendChild(u),o.innerHTML+=a,c.appendChild(o),i.appendChild(c),t.listItems.push(c)}),i},d.getCurrentState=function(){return l.default.getResultPattern(this.state)},d.restorePreviousState=function(){var e=this;if(u.previousState){var t=u.previousState.split("[,]");t.forEach(function(t){e.state[t].checked=!0})}},d.allowFinish=function(){return this.hasFeedback?this.hasFeedback&&this.feedbackShown?t.AllowFinish.ALLOW:t.AllowFinish.DENY:t.AllowFinish.ALWAYS},d.finish=function(){var e=this;return c.forEach(function(t,n){if(t.feedback){var i=void 0,a=e.state[n].checked;if(a&&t.feedback.chosenFeedback?i=t.feedback.chosenFeedback:!a&&t.feedback.notChosenFeedback&&(i=t.feedback.notChosenFeedback),i){var r=document.createElement("div");r.className="h5p-simple-multiple-choice-alternative-feedback "+(a?"chosen":"not-chosen"),r.innerHTML=i,e.feedbackElements.push(r),e.listItems[n].appendChild(r)}}}),this.feedbackShown=!0,0===this.feedbackElements.length},d.restorePreviousState(),d}return c(t,e),s(t,null,[{key:"AllowFinish",get:function(){return{ALWAYS:0,DENY:1,ALLOW:2}}}]),t}(H5P.EventDispatcher);t.default=d},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){var i=t.question,a=t.alternatives;n(this,e);var r=a.map(function(e,t){return{id:""+t,description:{"en-US":e.text}}});this.event={description:{"en-US":i},type:"http://adlnet.gov/expapi/activities/cmi.interaction",interactionType:"choice",choices:r}}return a(e,[{key:"generateXApi",value:function(t,n){var a=e.getResultPattern(n),r=t.data.statement;if(i(r,{result:{response:a}}),r.object){var c=r.object.definition;i(c,this.event)}return t}}],[{key:"getResultPattern",value:function(e){return e.reduce(function(e,t,n){return t.checked&&(e+=(e.length?"[,]":"")+n),e},"")}}]),e}();t.default=r},function(e,t){}]);
var db = require('./db'); module.exports = { users: { get: function (req, res) { db.User.findAll() .then(function(users) { res.json(users); }); }, post: function (req, res) { db.User.findOrCreate({where: {username: req.body.username}}) // findOrCreate returns multiple resutls in an array // use spread to assign the array to function arguments .spread(function(user, created) { res.sendStatus(created ? 201 : 200); }); } }, savedBoards: { get: function (req, res) { }, post: function (req, res) { } } };
import React from 'react' export const Posts = props => { return ( <div> Posts post </div> ) }
import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { fetchCityInfoViaThunk, fetchCityInfoViaSaga } from '../actions/index'; let SearchCity = ({ fetchCityInfoViaSaga, fetchCityInfoViaThunk }) => { let input; const handleOnClickViaThunk = () => (e) => { e.preventDefault() if (!input.value.trim()) { return } // actionCreator with redux thunk fetchCityInfoViaThunk(input.value); input.value = '' } const handleOnClickViaSaga = () => (e) => { e.preventDefault() if (!input.value.trim()) { return } // actionCreator with redux saga fetchCityInfoViaSaga(input.value); input.value = '' } return ( <form style={{padding: 20}}> <label htmlFor='city-search'>Cities: </label> <input style={{minWidth: 200}} name='city-search' placeholder='Enter City Names (seperate with ",")' ref={node => { input = node }} /> <div style={{marginTop: 20}}> <button type='button' style={{marginLeft: 10}} onClick={handleOnClickViaThunk()}>Submit with thunk</button> <button type='button' style={{marginLeft: 10}} onClick={handleOnClickViaSaga()}>Submit with saga</button> </div> </form> ); } const mapStateToProps = (state = {}) => ({}); const mapDispatchToProps = (dispatch) => ( bindActionCreators({ fetchCityInfoViaThunk, fetchCityInfoViaSaga }, dispatch) ) export default SearchCity = connect(mapStateToProps, mapDispatchToProps)(SearchCity);
!function(t){function e(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=35)}([function(t,e){t.exports=jQuery},function(t,e,i){"use strict";function n(){return"rtl"===r()("html").attr("dir")}function s(t,e){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(e?"-"+e:"")}function o(t){var e,i={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},n=document.createElement("div");for(var s in i)"undefined"!=typeof n.style[s]&&(e=i[s]);return e?e:(e=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}i.d(e,"b",function(){return n}),i.d(e,"a",function(){return s}),i.d(e,"c",function(){return o});var a=i(0),r=i.n(a)},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o(t){return s("undefined"!=typeof t.constructor.name?t.constructor.name:t.className)}i.d(e,"a",function(){return u});var a=i(0),r=(i.n(a),i(1)),l=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),u=function(){function t(e,s){n(this,t),this._setup(e,s);var a=o(this);this.uuid=i.i(r.a)(6,a),this.$element.attr("data-"+a)||this.$element.attr("data-"+a,this.uuid),this.$element.data("zfPlugin")||this.$element.data("zfPlugin",this),this.$element.trigger("init.zf."+a)}return l(t,[{key:"destroy",value:function(){this._destroy();var t=o(this);this.$element.removeAttr("data-"+t).removeData("zfPlugin").trigger("destroyed.zf."+t);for(var e in this)this[e]=null}}]),t}()},function(t,e,i){"use strict";function n(t){return!!t&&t.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!r()(this).is(":visible")||r()(this).attr("tabindex")<0)})}function s(t){var e=u[t.which||t.keyCode]||String.fromCharCode(t.which).toUpperCase();return e=e.replace(/\W+/,""),t.shiftKey&&(e="SHIFT_"+e),t.ctrlKey&&(e="CTRL_"+e),t.altKey&&(e="ALT_"+e),e=e.replace(/_$/,"")}function o(t){var e={};for(var i in t)e[t[i]]=t[i];return e}i.d(e,"a",function(){return h});var a=i(0),r=i.n(a),l=i(1),u={9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",35:"END",36:"HOME",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"},c={},h={keys:o(u),parseKey:s,handleKey:function(t,e,n){var s,o,a,u=c[e],h=this.parseKey(t);if(!u)return console.warn("Component not defined!");if(s="undefined"==typeof u.ltr?u:i.i(l.b)()?r.a.extend({},u.ltr,u.rtl):r.a.extend({},u.rtl,u.ltr),o=s[h],a=n[o],a&&"function"==typeof a){var d=a.apply();(n.handled||"function"==typeof n.handled)&&n.handled(d)}else(n.unhandled||"function"==typeof n.unhandled)&&n.unhandled()},findFocusable:n,register:function(t,e){c[t]=e},trapFocus:function(t){var e=n(t),i=e.eq(0),o=e.eq(-1);t.on("keydown.zf.trapfocus",function(t){t.target===o[0]&&"TAB"===s(t)?(t.preventDefault(),i.focus()):t.target===i[0]&&"SHIFT_TAB"===s(t)&&(t.preventDefault(),o.focus())})},releaseFocus:function(t){t.off("keydown.zf.trapfocus")}}},function(t,e,i){"use strict";function n(t){var e={};return"string"!=typeof t?e:(t=t.trim().slice(1,-1))?e=t.split("&").reduce(function(t,e){var i=e.replace(/\+/g," ").split("="),n=i[0],s=i[1];return n=decodeURIComponent(n),s=void 0===s?null:decodeURIComponent(s),t.hasOwnProperty(n)?Array.isArray(t[n])?t[n].push(s):t[n]=[t[n],s]:t[n]=s,t},{}):e}i.d(e,"a",function(){return r});var s=i(0),o=i.n(s),a=window.matchMedia||function(){var t=window.styleMedia||window.media;if(!t){var e=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;e.type="text/css",e.id="matchmediajs-test",i&&i.parentNode&&i.parentNode.insertBefore(e,i),n="getComputedStyle"in window&&window.getComputedStyle(e,null)||e.currentStyle,t={matchMedium:function(t){var i="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=i:e.textContent=i,"1px"===n.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}(),r={queries:[],current:"",_init:function(){var t=this,e=o()("meta.foundation-mq");e.length||o()('<meta class="foundation-mq">').appendTo(document.head);var i,s=o()(".foundation-mq").css("font-family");i=n(s);for(var a in i)i.hasOwnProperty(a)&&t.queries.push({name:a,value:"only screen and (min-width: "+i[a]+")"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var e=this.get(t);return!!e&&a(e).matches},is:function(t){return t=t.trim().split(" "),t.length>1&&"only"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var e in this.queries)if(this.queries.hasOwnProperty(e)){var i=this.queries[e];if(t===i.name)return i.value}return null},_getCurrentSize:function(){for(var t,e=0;e<this.queries.length;e++){var i=this.queries[e];a(i.value).matches&&(t=i)}return"object"==typeof t?t.name:t},_watcher:function(){var t=this;o()(window).off("resize.zf.mediaquery").on("resize.zf.mediaquery",function(){var e=t._getCurrentSize(),i=t.current;e!==i&&(t.current=e,o()(window).trigger("changed.zf.mediaquery",[e,i]))})}}},function(t,e,i){"use strict";function n(t,e,i){var n=void 0,s=Array.prototype.slice.call(arguments,3);o()(window).off(e).on(e,function(e){n&&clearTimeout(n),n=setTimeout(function(){i.apply(null,s)},t||10)})}i.d(e,"a",function(){return u});var s=i(0),o=i.n(s),a=i(6),r=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if(t[e]+"MutationObserver"in window)return window[t[e]+"MutationObserver"];return!1}(),l=function(t,e){t.data(e).split(" ").forEach(function(i){o()("#"+i)["close"===e?"trigger":"triggerHandler"](e+".zf.trigger",[t])})},u={Listeners:{Basic:{},Global:{}},Initializers:{}};u.Listeners.Basic={openListener:function(){l(o()(this),"open")},closeListener:function(){var t=o()(this).data("close");t?l(o()(this),"close"):o()(this).trigger("close.zf.trigger")},toggleListener:function(){var t=o()(this).data("toggle");t?l(o()(this),"toggle"):o()(this).trigger("toggle.zf.trigger")},closeableListener:function(t){t.stopPropagation();var e=o()(this).data("closable");""!==e?a.a.animateOut(o()(this),e,function(){o()(this).trigger("closed.zf")}):o()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var t=o()(this).data("toggle-focus");o()("#"+t).triggerHandler("toggle.zf.trigger",[o()(this)])}},u.Initializers.addOpenListener=function(t){t.off("click.zf.trigger",u.Listeners.Basic.openListener),t.on("click.zf.trigger","[data-open]",u.Listeners.Basic.openListener)},u.Initializers.addCloseListener=function(t){t.off("click.zf.trigger",u.Listeners.Basic.closeListener),t.on("click.zf.trigger","[data-close]",u.Listeners.Basic.closeListener)},u.Initializers.addToggleListener=function(t){t.off("click.zf.trigger",u.Listeners.Basic.toggleListener),t.on("click.zf.trigger","[data-toggle]",u.Listeners.Basic.toggleListener)},u.Initializers.addCloseableListener=function(t){t.off("close.zf.trigger",u.Listeners.Basic.closeableListener),t.on("close.zf.trigger","[data-closeable], [data-closable]",u.Listeners.Basic.closeableListener)},u.Initializers.addToggleFocusListener=function(t){t.off("focus.zf.trigger blur.zf.trigger",u.Listeners.Basic.toggleFocusListener),t.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",u.Listeners.Basic.toggleFocusListener)},u.Listeners.Global={resizeListener:function(t){r||t.each(function(){o()(this).triggerHandler("resizeme.zf.trigger")}),t.attr("data-events","resize")},scrollListener:function(t){r||t.each(function(){o()(this).triggerHandler("scrollme.zf.trigger")}),t.attr("data-events","scroll")},closeMeListener:function(t,e){var i=t.namespace.split(".")[0],n=o()("[data-"+i+"]").not('[data-yeti-box="'+e+'"]');n.each(function(){var t=o()(this);t.triggerHandler("close.zf.trigger",[t])})}},u.Initializers.addClosemeListener=function(t){var e=o()("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];if(t&&("string"==typeof t?i.push(t):"object"==typeof t&&"string"==typeof t[0]?i.concat(t):console.error("Plugin names must be strings")),e.length){var n=i.map(function(t){return"closeme.zf."+t}).join(" ");o()(window).off(n).on(n,u.Listeners.Global.closeMeListener)}},u.Initializers.addResizeListener=function(t){var e=o()("[data-resize]");e.length&&n(t,"resize.zf.trigger",u.Listeners.Global.resizeListener,e)},u.Initializers.addScrollListener=function(t){var e=o()("[data-scroll]");e.length&&n(t,"scroll.zf.trigger",u.Listeners.Global.scrollListener,e)},u.Initializers.addMutationEventsListener=function(t){if(!r)return!1;var e=t.find("[data-resize], [data-scroll], [data-mutate]"),i=function(t){var e=o()(t[0].target);switch(t[0].type){case"attributes":"scroll"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("scrollme.zf.trigger",[e,window.pageYOffset]),"resize"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("resizeme.zf.trigger",[e]),"style"===t[0].attributeName&&(e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]));break;case"childList":e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var n=0;n<=e.length-1;n++){var s=new r(i);s.observe(e[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}},u.Initializers.addSimpleListeners=function(){var t=o()(document);u.Initializers.addOpenListener(t),u.Initializers.addCloseListener(t),u.Initializers.addToggleListener(t),u.Initializers.addCloseableListener(t),u.Initializers.addToggleFocusListener(t)},u.Initializers.addGlobalListeners=function(){var t=o()(document);u.Initializers.addMutationEventsListener(t),u.Initializers.addResizeListener(),u.Initializers.addScrollListener(),u.Initializers.addClosemeListener()},u.init=function(t,e){if("undefined"==typeof t.triggersInitialized){t(document);"complete"===document.readyState?(u.Initializers.addSimpleListeners(),u.Initializers.addGlobalListeners()):t(window).on("load",function(){u.Initializers.addSimpleListeners(),u.Initializers.addGlobalListeners()}),t.triggersInitialized=!0}e&&(e.Triggers=u,e.IHearYou=u.Initializers.addGlobalListeners)}},function(t,e,i){"use strict";function n(t,e,i){function n(r){a||(a=r),o=r-a,i.apply(e),o<t?s=window.requestAnimationFrame(n,e):(window.cancelAnimationFrame(s),e.trigger("finished.zf.animate",[e]).triggerHandler("finished.zf.animate",[e]))}var s,o,a=null;return 0===t?(i.apply(e),void e.trigger("finished.zf.animate",[e]).triggerHandler("finished.zf.animate",[e])):void(s=window.requestAnimationFrame(n))}function s(t,e,n,s){function o(){t||e.hide(),c(),s&&s.apply(e)}function c(){e[0].style.transitionDuration=0,e.removeClass(h+" "+d+" "+n)}if(e=a()(e).eq(0),e.length){var h=t?l[0]:l[1],d=t?u[0]:u[1];c(),e.addClass(n).css("transition","none"),requestAnimationFrame(function(){e.addClass(h),t&&e.show()}),requestAnimationFrame(function(){e[0].offsetWidth,e.css("transition","").addClass(d)}),e.one(i.i(r.c)(e),o)}}i.d(e,"b",function(){return n}),i.d(e,"a",function(){return c});var o=i(0),a=i.n(o),r=i(1),l=["mui-enter","mui-leave"],u=["mui-enter-active","mui-leave-active"],c={animateIn:function(t,e,i){s(!0,t,e,i)},animateOut:function(t,e,i){s(!1,t,e,i)}}},function(t,e,i){"use strict";function n(t,e,i,n,o){return 0===s(t,e,i,n,o)}function s(t,e,i,n,s){var a,r,l,u,c=o(t);if(e){var h=o(e);r=h.height+h.offset.top-(c.offset.top+c.height),a=c.offset.top-h.offset.top,l=c.offset.left-h.offset.left,u=h.width+h.offset.left-(c.offset.left+c.width)}else r=c.windowDims.height+c.windowDims.offset.top-(c.offset.top+c.height),a=c.offset.top-c.windowDims.offset.top,l=c.offset.left-c.windowDims.offset.left,u=c.windowDims.width-(c.offset.left+c.width);return r=s?0:Math.min(r,0),a=Math.min(a,0),l=Math.min(l,0),u=Math.min(u,0),i?l+u:n?a+r:Math.sqrt(a*a+r*r+l*l+u*u)}function o(t,e){if(t=t.length?t[0]:t,t===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var i=t.getBoundingClientRect(),n=t.parentNode.getBoundingClientRect(),s=document.body.getBoundingClientRect(),o=window.pageYOffset,a=window.pageXOffset;return{width:i.width,height:i.height,offset:{top:i.top+o,left:i.left+a},parentDims:{width:n.width,height:n.height,offset:{top:n.top+o,left:n.left+a}},windowDims:{width:s.width,height:s.height,offset:{top:o,left:a}}}}function a(t,e,n,s,o,a){switch(console.log("NOTE: GetOffsets is deprecated in favor of GetExplicitOffsets and will be removed in 6.5"),n){case"top":return i.i(l.b)()?r(t,e,"top","left",s,o,a):r(t,e,"top","right",s,o,a);case"bottom":return i.i(l.b)()?r(t,e,"bottom","left",s,o,a):r(t,e,"bottom","right",s,o,a);case"center top":return r(t,e,"top","center",s,o,a);case"center bottom":return r(t,e,"bottom","center",s,o,a);case"center left":return r(t,e,"left","center",s,o,a);case"center right":return r(t,e,"right","center",s,o,a);case"left bottom":return r(t,e,"bottom","left",s,o,a);case"right bottom":return r(t,e,"bottom","right",s,o,a);case"center":return{left:$eleDims.windowDims.offset.left+$eleDims.windowDims.width/2-$eleDims.width/2+o,top:$eleDims.windowDims.offset.top+$eleDims.windowDims.height/2-($eleDims.height/2+s)};case"reveal":return{left:($eleDims.windowDims.width-$eleDims.width)/2+o,top:$eleDims.windowDims.offset.top+s};case"reveal full":return{left:$eleDims.windowDims.offset.left,top:$eleDims.windowDims.offset.top};default:return{left:i.i(l.b)()?$anchorDims.offset.left-$eleDims.width+$anchorDims.width-o:$anchorDims.offset.left+o,top:$anchorDims.offset.top+$anchorDims.height+s}}}function r(t,e,i,n,s,a,r){var l,u,c=o(t),h=e?o(e):null;switch(i){case"top":l=h.offset.top-(c.height+s);break;case"bottom":l=h.offset.top+h.height+s;break;case"left":u=h.offset.left-(c.width+a);break;case"right":u=h.offset.left+h.width+a}switch(i){case"top":case"bottom":switch(n){case"left":u=h.offset.left+a;break;case"right":u=h.offset.left-c.width+h.width-a;break;case"center":u=r?a:h.offset.left+h.width/2-c.width/2+a}break;case"right":case"left":switch(n){case"bottom":l=h.offset.top-s+h.height-c.height;break;case"top":l=h.offset.top+s;break;case"center":l=h.offset.top+s+h.height/2-c.height/2}}return{top:l,left:u}}i.d(e,"a",function(){return u});var l=i(1),u={ImNotTouchingYou:n,OverlapArea:s,GetDimensions:o,GetOffsets:a,GetExplicitOffsets:r}},function(t,e,i){"use strict";function n(t,e){function i(){n--,0===n&&e()}var n=t.length;0===n&&e(),t.each(function(){if(this.complete&&void 0!==this.naturalWidth)i();else{var t=new Image,e="load.zf.images error.zf.images";o()(t).one(e,function t(n){o()(this).off(e,t),i()}),t.src=o()(this).attr("src")}})}i.d(e,"a",function(){return n});var s=i(0),o=i.n(s)},function(t,e,i){"use strict";i.d(e,"a",function(){return o});var n=i(0),s=i.n(n),o={Feather:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zf";t.attr("role","menubar");var i=t.find("li").attr({role:"menuitem"}),n="is-"+e+"-submenu",o=n+"-item",a="is-"+e+"-submenu-parent",r="accordion"!==e;i.each(function(){var t=s()(this),i=t.children("ul");i.length&&(t.addClass(a),i.addClass("submenu "+n).attr({"data-submenu":""}),r&&(t.attr({"aria-haspopup":!0,"aria-label":t.children("a:first").text()}),"drilldown"===e&&t.attr({"aria-expanded":!1})),i.addClass("submenu "+n).attr({"data-submenu":"",role:"menu"}),"drilldown"===e&&i.attr({"aria-hidden":!0})),t.parent("[data-submenu]").length&&t.addClass("is-submenu-item "+o)})},Burn:function(t,e){var i="is-"+e+"-submenu",n=i+"-item",s="is-"+e+"-submenu-parent";t.find(">li, .menu, .menu > li").removeClass(i+" "+n+" "+s+" is-submenu-item submenu is-active").removeAttr("data-submenu").css("display","")}}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return d});var a=i(0),r=i.n(a),l=i(3),u=i(1),c=i(2),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Accordion",this._init(),l.a.register("Accordion",{ENTER:"toggle",SPACE:"toggle",ARROW_DOWN:"next",ARROW_UP:"previous"})}},{key:"_init",value:function(){var t=this;this.$element.attr("role","tablist"),this.$tabs=this.$element.children("[data-accordion-item]"),this.$tabs.each(function(t,e){var n=r()(e),s=n.children("[data-tab-content]"),o=s[0].id||i.i(u.a)(6,"accordion"),a=e.id||o+"-label";n.find("a:first").attr({"aria-controls":o,role:"tab",id:a,"aria-expanded":!1,"aria-selected":!1}),s.attr({role:"tabpanel","aria-labelledby":a,"aria-hidden":!0,id:o})});var e=this.$element.find(".is-active").children("[data-tab-content]");this.firstTimeInit=!0,e.length&&(this.down(e,this.firstTimeInit),this.firstTimeInit=!1),this._checkDeepLink=function(){var e=window.location.hash;if(e.length){var i=t.$element.find('[href$="'+e+'"]'),n=r()(e);if(i.length&&n){if(i.parent("[data-accordion-item]").hasClass("is-active")||(t.down(n,t.firstTimeInit),t.firstTimeInit=!1),t.options.deepLinkSmudge){var s=t;r()(window).load(function(){var t=s.$element.offset();r()("html, body").animate({scrollTop:t.top},s.options.deepLinkSmudgeDelay)})}t.$element.trigger("deeplink.zf.accordion",[i,n])}}},this.options.deepLink&&this._checkDeepLink(),this._events()}},{key:"_events",value:function(){var t=this;this.$tabs.each(function(){var e=r()(this),i=e.children("[data-tab-content]");i.length&&e.children("a").off("click.zf.accordion keydown.zf.accordion").on("click.zf.accordion",function(e){e.preventDefault(),t.toggle(i)}).on("keydown.zf.accordion",function(n){l.a.handleKey(n,"Accordion",{toggle:function(){t.toggle(i)},next:function(){var i=e.next().find("a").focus();t.options.multiExpand||i.trigger("click.zf.accordion")},previous:function(){var i=e.prev().find("a").focus();t.options.multiExpand||i.trigger("click.zf.accordion")},handled:function(){n.preventDefault(),n.stopPropagation()}})})}),this.options.deepLink&&r()(window).on("popstate",this._checkDeepLink)}},{key:"toggle",value:function(t){if(t.closest("[data-accordion]").is("[disabled]"))return void console.info("Cannot toggle an accordion that is disabled.");if(t.parent().hasClass("is-active")?this.up(t):this.down(t),this.options.deepLink){var e=t.prev("a").attr("href");this.options.updateHistory?history.pushState({},"",e):history.replaceState({},"",e)}}},{key:"down",value:function(t,e){var i=this;if(t.closest("[data-accordion]").is("[disabled]")&&!e)return void console.info("Cannot call down on an accordion that is disabled.");if(t.attr("aria-hidden",!1).parent("[data-tab-content]").addBack().parent().addClass("is-active"),!this.options.multiExpand&&!e){var n=this.$element.children(".is-active").children("[data-tab-content]");n.length&&this.up(n.not(t))}t.slideDown(this.options.slideSpeed,function(){i.$element.trigger("down.zf.accordion",[t])}),r()("#"+t.attr("aria-labelledby")).attr({"aria-expanded":!0,"aria-selected":!0})}},{key:"up",value:function(t){if(t.closest("[data-accordion]").is("[disabled]"))return void console.info("Cannot call up on an accordion that is disabled.");var e=t.parent().siblings(),i=this;(this.options.allowAllClosed||e.hasClass("is-active"))&&t.parent().hasClass("is-active")&&(t.slideUp(i.options.slideSpeed,function(){i.$element.trigger("up.zf.accordion",[t])}),t.attr("aria-hidden",!0).parent().removeClass("is-active"),r()("#"+t.attr("aria-labelledby")).attr({"aria-expanded":!1,"aria-selected":!1}))}},{key:"_destroy",value:function(){this.$element.find("[data-tab-content]").stop(!0).slideUp(0).css("display",""),this.$element.find("a").off(".zf.accordion"),this.options.deepLink&&r()(window).off("popstate",this._checkDeepLink)}}]),e}(c.a);d.defaults={slideSpeed:250,multiExpand:!1,allowAllClosed:!1,deepLink:!1,deepLinkSmudge:!1,deepLinkSmudgeDelay:300,updateHistory:!1}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return f});var a=i(0),r=i.n(a),l=i(3),u=i(9),c=i(1),h=i(2),d=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),f=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),d(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="AccordionMenu",u.a.Feather(this.$element,"accordion"),this._init(),l.a.register("AccordionMenu",{ENTER:"toggle",SPACE:"toggle",ARROW_RIGHT:"open",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"close",ESCAPE:"closeAll"})}},{key:"_init",value:function(){var t=this;this.$element.find("[data-submenu]").not(".is-active").slideUp(0),this.$element.attr({role:"tree","aria-multiselectable":this.options.multiOpen}),this.$menuLinks=this.$element.find(".is-accordion-submenu-parent"),this.$menuLinks.each(function(){var e=this.id||i.i(c.a)(6,"acc-menu-link"),n=r()(this),s=n.children("[data-submenu]"),o=s[0].id||i.i(c.a)(6,"acc-menu"),a=s.hasClass("is-active");t.options.submenuToggle?(n.addClass("has-submenu-toggle"),n.children("a").after('<button id="'+e+'" class="submenu-toggle" aria-controls="'+o+'" aria-expanded="'+a+'" title="'+t.options.submenuToggleText+'"><span class="submenu-toggle-text">'+t.options.submenuToggleText+"</span></button>")):n.attr({"aria-controls":o,"aria-expanded":a,id:e}),s.attr({"aria-labelledby":e,"aria-hidden":!a,role:"group",id:o})}),this.$element.find("li").attr({role:"treeitem"});var e=this.$element.find(".is-active");if(e.length){var t=this;e.each(function(){t.down(r()(this))})}this._events()}},{key:"_events",value:function(){var t=this;this.$element.find("li").each(function(){var e=r()(this).children("[data-submenu]");e.length&&(t.options.submenuToggle?r()(this).children(".submenu-toggle").off("click.zf.accordionMenu").on("click.zf.accordionMenu",function(i){t.toggle(e)}):r()(this).children("a").off("click.zf.accordionMenu").on("click.zf.accordionMenu",function(i){i.preventDefault(),t.toggle(e)}))}).on("keydown.zf.accordionmenu",function(e){var i,n,s=r()(this),o=s.parent("ul").children("li"),a=s.children("[data-submenu]");o.each(function(t){if(r()(this).is(s))return i=o.eq(Math.max(0,t-1)).find("a").first(),n=o.eq(Math.min(t+1,o.length-1)).find("a").first(),r()(this).children("[data-submenu]:visible").length&&(n=s.find("li:first-child").find("a").first()),r()(this).is(":first-child")?i=s.parents("li").first().find("a").first():i.parents("li").first().children("[data-submenu]:visible").length&&(i=i.parents("li").find("li:last-child").find("a").first()),void(r()(this).is(":last-child")&&(n=s.parents("li").first().next("li").find("a").first()))}),l.a.handleKey(e,"AccordionMenu",{open:function(){a.is(":hidden")&&(t.down(a),a.find("li").first().find("a").first().focus())},close:function(){a.length&&!a.is(":hidden")?t.up(a):s.parent("[data-submenu]").length&&(t.up(s.parent("[data-submenu]")),s.parents("li").first().find("a").first().focus())},up:function(){return i.focus(),!0},down:function(){return n.focus(),!0},toggle:function(){return!t.options.submenuToggle&&(s.children("[data-submenu]").length?(t.toggle(s.children("[data-submenu]")),!0):void 0)},closeAll:function(){t.hideAll()},handled:function(t){t&&e.preventDefault(),e.stopImmediatePropagation()}})})}},{key:"hideAll",value:function(){this.up(this.$element.find("[data-submenu]"))}},{key:"showAll",value:function(){this.down(this.$element.find("[data-submenu]"))}},{key:"toggle",value:function(t){t.is(":animated")||(t.is(":hidden")?this.down(t):this.up(t))}},{key:"down",value:function(t){var e=this;this.options.multiOpen||this.up(this.$element.find(".is-active").not(t.parentsUntil(this.$element).add(t))),t.addClass("is-active").attr({"aria-hidden":!1}),this.options.submenuToggle?t.prev(".submenu-toggle").attr({"aria-expanded":!0}):t.parent(".is-accordion-submenu-parent").attr({"aria-expanded":!0}),t.slideDown(e.options.slideSpeed,function(){e.$element.trigger("down.zf.accordionMenu",[t])})}},{key:"up",value:function(t){var e=this;t.slideUp(e.options.slideSpeed,function(){e.$element.trigger("up.zf.accordionMenu",[t])});var i=t.find("[data-submenu]").slideUp(0).addBack().attr("aria-hidden",!0);this.options.submenuToggle?i.prev(".submenu-toggle").attr("aria-expanded",!1):i.parent(".is-accordion-submenu-parent").attr("aria-expanded",!1)}},{key:"_destroy",value:function(){this.$element.find("[data-submenu]").slideDown(0).css("display",""),this.$element.find("a").off("click.zf.accordionMenu"),this.options.submenuToggle&&(this.$element.find(".has-submenu-toggle").removeClass("has-submenu-toggle"),this.$element.find(".submenu-toggle").remove()),u.a.Burn(this.$element,"accordion")}}]),e}(h.a);f.defaults={slideSpeed:250,submenuToggle:!1,submenuToggleText:"Toggle menu",multiOpen:!0}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return p});var a=i(0),r=i.n(a),l=i(3),u=i(9),c=i(1),h=i(7),d=i(2),f=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),p=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),f(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Drilldown",u.a.Feather(this.$element,"drilldown"),this._init(),l.a.register("Drilldown",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"previous",ESCAPE:"close",TAB:"down",SHIFT_TAB:"up"})}},{key:"_init",value:function(){this.options.autoApplyClass&&this.$element.addClass("drilldown"),this.$element.attr({role:"tree","aria-multiselectable":!1}),this.$submenuAnchors=this.$element.find("li.is-drilldown-submenu-parent").children("a"),this.$submenus=this.$submenuAnchors.parent("li").children("[data-submenu]").attr("role","group"),this.$menuItems=this.$element.find("li").not(".js-drilldown-back").attr("role","treeitem").find("a"),this.$element.attr("data-mutate",this.$element.attr("data-drilldown")||i.i(c.a)(6,"drilldown")),this._prepareMenu(),this._registerEvents(),this._keyboardEvents()}},{key:"_prepareMenu",value:function(){var t=this;this.$submenuAnchors.each(function(){var e=r()(this),i=e.parent();t.options.parentLink&&e.clone().prependTo(i.children("[data-submenu]")).wrap('<li class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="menu-item"></li>'),e.data("savedHref",e.attr("href")).removeAttr("href").attr("tabindex",0),e.children("[data-submenu]").attr({"aria-hidden":!0,tabindex:0,role:"group"}),t._events(e)}),this.$submenus.each(function(){var e=r()(this),i=e.find(".js-drilldown-back");if(!i.length)switch(t.options.backButtonPosition){case"bottom":e.append(t.options.backButton);break;case"top":e.prepend(t.options.backButton);break;default:console.error("Unsupported backButtonPosition value '"+t.options.backButtonPosition+"'")}t._back(e)}),this.$submenus.addClass("invisible"),this.options.autoHeight||this.$submenus.addClass("drilldown-submenu-cover-previous"),this.$element.parent().hasClass("is-drilldown")||(this.$wrapper=r()(this.options.wrapper).addClass("is-drilldown"),this.options.animateHeight&&this.$wrapper.addClass("animate-height"),this.$element.wrap(this.$wrapper)),this.$wrapper=this.$element.parent(),this.$wrapper.css(this._getMaxDims())}},{key:"_resize",value:function(){this.$wrapper.css({"max-width":"none","min-height":"none"}),this.$wrapper.css(this._getMaxDims())}},{key:"_events",value:function(t){var e=this;t.off("click.zf.drilldown").on("click.zf.drilldown",function(i){if(r()(i.target).parentsUntil("ul","li").hasClass("is-drilldown-submenu-parent")&&(i.stopImmediatePropagation(),i.preventDefault()),e._show(t.parent("li")),e.options.closeOnClick){var n=r()("body");n.off(".zf.drilldown").on("click.zf.drilldown",function(t){t.target===e.$element[0]||r.a.contains(e.$element[0],t.target)||(t.preventDefault(),e._hideAll(),n.off(".zf.drilldown"))})}})}},{key:"_registerEvents",value:function(){this.options.scrollTop&&(this._bindHandler=this._scrollTop.bind(this),this.$element.on("open.zf.drilldown hide.zf.drilldown closed.zf.drilldown",this._bindHandler)),this.$element.on("mutateme.zf.trigger",this._resize.bind(this))}},{key:"_scrollTop",value:function(){var t=this,e=""!=t.options.scrollTopElement?r()(t.options.scrollTopElement):t.$element,i=parseInt(e.offset().top+t.options.scrollTopOffset,10);r()("html, body").stop(!0).animate({scrollTop:i},t.options.animationDuration,t.options.animationEasing,function(){this===r()("html")[0]&&t.$element.trigger("scrollme.zf.drilldown")})}},{key:"_keyboardEvents",value:function(){var t=this;this.$menuItems.add(this.$element.find(".js-drilldown-back > a, .is-submenu-parent-item > a")).on("keydown.zf.drilldown",function(e){var n,s,o=r()(this),a=o.parent("li").parent("ul").children("li").children("a");a.each(function(t){if(r()(this).is(o))return n=a.eq(Math.max(0,t-1)),void(s=a.eq(Math.min(t+1,a.length-1)))}),l.a.handleKey(e,"Drilldown",{next:function(){if(o.is(t.$submenuAnchors))return t._show(o.parent("li")),o.parent("li").one(i.i(c.c)(o),function(){ o.parent("li").find("ul li a").filter(t.$menuItems).first().focus()}),!0},previous:function(){return t._hide(o.parent("li").parent("ul")),o.parent("li").parent("ul").one(i.i(c.c)(o),function(){setTimeout(function(){o.parent("li").parent("ul").parent("li").children("a").first().focus()},1)}),!0},up:function(){return n.focus(),!o.is(t.$element.find("> li:first-child > a"))},down:function(){return s.focus(),!o.is(t.$element.find("> li:last-child > a"))},close:function(){o.is(t.$element.find("> li > a"))||(t._hide(o.parent().parent()),o.parent().parent().siblings("a").focus())},open:function(){return o.is(t.$menuItems)?o.is(t.$submenuAnchors)?(t._show(o.parent("li")),o.parent("li").one(i.i(c.c)(o),function(){o.parent("li").find("ul li a").filter(t.$menuItems).first().focus()}),!0):void 0:(t._hide(o.parent("li").parent("ul")),o.parent("li").parent("ul").one(i.i(c.c)(o),function(){setTimeout(function(){o.parent("li").parent("ul").parent("li").children("a").first().focus()},1)}),!0)},handled:function(t){t&&e.preventDefault(),e.stopImmediatePropagation()}})})}},{key:"_hideAll",value:function(){var t=this.$element.find(".is-drilldown-submenu.is-active").addClass("is-closing");this.options.autoHeight&&this.$wrapper.css({height:t.parent().closest("ul").data("calcHeight")}),t.one(i.i(c.c)(t),function(e){t.removeClass("is-active is-closing")}),this.$element.trigger("closed.zf.drilldown")}},{key:"_back",value:function(t){var e=this;t.off("click.zf.drilldown"),t.children(".js-drilldown-back").on("click.zf.drilldown",function(i){i.stopImmediatePropagation(),e._hide(t);var n=t.parent("li").parent("ul").parent("li");n.length&&e._show(n)})}},{key:"_menuLinkEvents",value:function(){var t=this;this.$menuItems.not(".is-drilldown-submenu-parent").off("click.zf.drilldown").on("click.zf.drilldown",function(e){setTimeout(function(){t._hideAll()},0)})}},{key:"_show",value:function(t){this.options.autoHeight&&this.$wrapper.css({height:t.children("[data-submenu]").data("calcHeight")}),t.attr("aria-expanded",!0),t.children("[data-submenu]").addClass("is-active").removeClass("invisible").attr("aria-hidden",!1),this.$element.trigger("open.zf.drilldown",[t])}},{key:"_hide",value:function(t){this.options.autoHeight&&this.$wrapper.css({height:t.parent().closest("ul").data("calcHeight")});t.parent("li").attr("aria-expanded",!1),t.attr("aria-hidden",!0).addClass("is-closing"),t.addClass("is-closing").one(i.i(c.c)(t),function(){t.removeClass("is-active is-closing"),t.blur().addClass("invisible")}),t.trigger("hide.zf.drilldown",[t])}},{key:"_getMaxDims",value:function(){var t=0,e={},i=this;return this.$submenus.add(this.$element).each(function(){var n=(r()(this).children("li").length,h.a.GetDimensions(this).height);t=n>t?n:t,i.options.autoHeight&&(r()(this).data("calcHeight",n),r()(this).hasClass("is-drilldown-submenu")||(e.height=n))}),this.options.autoHeight||(e["min-height"]=t+"px"),e["max-width"]=this.$element[0].getBoundingClientRect().width+"px",e}},{key:"_destroy",value:function(){this.options.scrollTop&&this.$element.off(".zf.drilldown",this._bindHandler),this._hideAll(),this.$element.off("mutateme.zf.trigger"),u.a.Burn(this.$element,"drilldown"),this.$element.unwrap().find(".js-drilldown-back, .is-submenu-parent-item").remove().end().find(".is-active, .is-closing, .is-drilldown-submenu").removeClass("is-active is-closing is-drilldown-submenu").end().find("[data-submenu]").removeAttr("aria-hidden tabindex role"),this.$submenuAnchors.each(function(){r()(this).off(".zf.drilldown")}),this.$submenus.removeClass("drilldown-submenu-cover-previous invisible"),this.$element.find("a").each(function(){var t=r()(this);t.removeAttr("tabindex"),t.data("savedHref")&&t.attr("href",t.data("savedHref")).removeData("savedHref")})}}]),e}(d.a);p.defaults={autoApplyClass:!0,backButton:'<li class="js-drilldown-back"><a tabindex="0">Back</a></li>',backButtonPosition:"top",wrapper:"<div></div>",parentLink:!1,closeOnClick:!1,autoHeight:!1,animateHeight:!1,scrollTop:!1,scrollTopElement:"",scrollTopOffset:0,animationDuration:500,animationEasing:"swing"}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return p});var a=i(0),r=i.n(a),l=i(3),u=i(9),c=i(7),h=i(1),d=i(2),f=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),p=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),f(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="DropdownMenu",u.a.Feather(this.$element,"dropdown"),this._init(),l.a.register("DropdownMenu",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"up",ARROW_DOWN:"down",ARROW_LEFT:"previous",ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.find("li.is-dropdown-submenu-parent");this.$element.children(".is-dropdown-submenu-parent").children(".is-dropdown-submenu").addClass("first-sub"),this.$menuItems=this.$element.find('[role="menuitem"]'),this.$tabs=this.$element.children('[role="menuitem"]'),this.$tabs.find("ul.is-dropdown-submenu").addClass(this.options.verticalClass),"auto"===this.options.alignment?this.$element.hasClass(this.options.rightClass)||i.i(h.b)()||this.$element.parents(".top-bar-right").is("*")?(this.options.alignment="right",t.addClass("opens-left")):(this.options.alignment="left",t.addClass("opens-right")):"right"===this.options.alignment?t.addClass("opens-left"):t.addClass("opens-right"),this.changed=!1,this._events()}},{key:"_isVertical",value:function(){return"block"===this.$tabs.css("display")||"column"===this.$element.css("flex-direction")}},{key:"_isRtl",value:function(){return this.$element.hasClass("align-right")||i.i(h.b)()&&!this.$element.hasClass("align-left")}},{key:"_events",value:function(){var t=this,e="ontouchstart"in window||"undefined"!=typeof window.ontouchstart,i="is-dropdown-submenu-parent",n=function(n){var s=r()(n.target).parentsUntil("ul","."+i),o=s.hasClass(i),a="true"===s.attr("data-is-click"),l=s.children(".is-dropdown-submenu");if(o)if(a){if(!t.options.closeOnClick||!t.options.clickOpen&&!e||t.options.forceFollow&&e)return;n.stopImmediatePropagation(),n.preventDefault(),t._hide(s)}else n.preventDefault(),n.stopImmediatePropagation(),t._show(l),s.add(s.parentsUntil(t.$element,"."+i)).attr("data-is-click",!0)};(this.options.clickOpen||e)&&this.$menuItems.on("click.zf.dropdownmenu touchstart.zf.dropdownmenu",n),t.options.closeOnClickInside&&this.$menuItems.on("click.zf.dropdownmenu",function(e){var n=r()(this),s=n.hasClass(i);s||t._hide()}),this.options.disableHover||this.$menuItems.on("mouseenter.zf.dropdownmenu",function(e){var n=r()(this),s=n.hasClass(i);s&&(clearTimeout(n.data("_delay")),n.data("_delay",setTimeout(function(){t._show(n.children(".is-dropdown-submenu"))},t.options.hoverDelay)))}).on("mouseleave.zf.dropdownmenu",function(e){var n=r()(this),s=n.hasClass(i);if(s&&t.options.autoclose){if("true"===n.attr("data-is-click")&&t.options.clickOpen)return!1;clearTimeout(n.data("_delay")),n.data("_delay",setTimeout(function(){t._hide(n)},t.options.closingTime))}}),this.$menuItems.on("keydown.zf.dropdownmenu",function(e){var i,n,s=r()(e.target).parentsUntil("ul",'[role="menuitem"]'),o=t.$tabs.index(s)>-1,a=o?t.$tabs:s.siblings("li").add(s);a.each(function(t){if(r()(this).is(s))return i=a.eq(t-1),void(n=a.eq(t+1))});var u=function(){s.is(":last-child")||(n.children("a:first").focus(),e.preventDefault())},c=function(){i.children("a:first").focus(),e.preventDefault()},h=function(){var i=s.children("ul.is-dropdown-submenu");i.length&&(t._show(i),s.find("li > a:first").focus(),e.preventDefault())},d=function(){var i=s.parent("ul").parent("li");i.children("a:first").focus(),t._hide(i),e.preventDefault()},f={open:h,close:function(){t._hide(t.$element),t.$menuItems.eq(0).children("a").focus(),e.preventDefault()},handled:function(){e.stopImmediatePropagation()}};o?t._isVertical()?t._isRtl()?r.a.extend(f,{down:u,up:c,next:d,previous:h}):r.a.extend(f,{down:u,up:c,next:h,previous:d}):t._isRtl()?r.a.extend(f,{next:c,previous:u,down:h,up:d}):r.a.extend(f,{next:u,previous:c,down:h,up:d}):t._isRtl()?r.a.extend(f,{next:d,previous:h,down:u,up:c}):r.a.extend(f,{next:h,previous:d,down:u,up:c}),l.a.handleKey(e,"DropdownMenu",f)})}},{key:"_addBodyHandler",value:function(){var t=r()(document.body),e=this;t.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu").on("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu",function(i){var n=e.$element.find(i.target);n.length||(e._hide(),t.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu"))})}},{key:"_show",value:function(t){var e=this.$tabs.index(this.$tabs.filter(function(e,i){return r()(i).find(t).length>0})),i=t.parent("li.is-dropdown-submenu-parent").siblings("li.is-dropdown-submenu-parent");this._hide(i,e),t.css("visibility","hidden").addClass("js-dropdown-active").parent("li.is-dropdown-submenu-parent").addClass("is-active");var n=c.a.ImNotTouchingYou(t,null,!0);if(!n){var s="left"===this.options.alignment?"-right":"-left",o=t.parent(".is-dropdown-submenu-parent");o.removeClass("opens"+s).addClass("opens-"+this.options.alignment),n=c.a.ImNotTouchingYou(t,null,!0),n||o.removeClass("opens-"+this.options.alignment).addClass("opens-inner"),this.changed=!0}t.css("visibility",""),this.options.closeOnClick&&this._addBodyHandler(),this.$element.trigger("show.zf.dropdownmenu",[t])}},{key:"_hide",value:function(t,e){var i;i=t&&t.length?t:void 0!==e?this.$tabs.not(function(t,i){return t===e}):this.$element;var n=i.hasClass("is-active")||i.find(".is-active").length>0;if(n){if(i.find("li.is-active").add(i).attr({"data-is-click":!1}).removeClass("is-active"),i.find("ul.js-dropdown-active").removeClass("js-dropdown-active"),this.changed||i.find("opens-inner").length){var s="left"===this.options.alignment?"right":"left";i.find("li.is-dropdown-submenu-parent").add(i).removeClass("opens-inner opens-"+this.options.alignment).addClass("opens-"+s),this.changed=!1}this.$element.trigger("hide.zf.dropdownmenu",[i])}}},{key:"_destroy",value:function(){this.$menuItems.off(".zf.dropdownmenu").removeAttr("data-is-click").removeClass("is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner"),r()(document.body).off(".zf.dropdownmenu"),u.a.Burn(this.$element,"dropdown")}}]),e}(d.a);p.defaults={disableHover:!1,autoclose:!0,hoverDelay:50,clickOpen:!1,closingTime:500,alignment:"auto",closeOnClick:!0,closeOnClickInside:!0,verticalClass:"vertical",rightClass:"align-right",forceFollow:!0}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return d});var a=i(0),r=i.n(a),l=i(3),u=i(8),c=i(2),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Tabs",this._init(),l.a.register("Tabs",{ENTER:"open",SPACE:"open",ARROW_RIGHT:"next",ARROW_UP:"previous",ARROW_DOWN:"next",ARROW_LEFT:"previous"})}},{key:"_init",value:function(){var t=this,e=this;if(this.$element.attr({role:"tablist"}),this.$tabTitles=this.$element.find("."+this.options.linkClass),this.$tabContent=r()('[data-tabs-content="'+this.$element[0].id+'"]'),this.$tabTitles.each(function(){var t=r()(this),i=t.find("a"),n=t.hasClass(""+e.options.linkActiveClass),s=i.attr("data-tabs-target")||i[0].hash.slice(1),o=i[0].id?i[0].id:s+"-label",a=r()("#"+s);t.attr({role:"presentation"}),i.attr({role:"tab","aria-controls":s,"aria-selected":n,id:o,tabindex:n?"0":"-1"}),a.attr({role:"tabpanel","aria-labelledby":o}),n||a.attr("aria-hidden","true"),n&&e.options.autoFocus&&r()(window).load(function(){r()("html, body").animate({scrollTop:t.offset().top},e.options.deepLinkSmudgeDelay,function(){i.focus()})})}),this.options.matchHeight){var n=this.$tabContent.find("img");n.length?i.i(u.a)(n,this._setHeight.bind(this)):this._setHeight()}this._checkDeepLink=function(){var e=window.location.hash;if(e.length){var i=t.$element.find('[href$="'+e+'"]');if(i.length){if(t.selectTab(r()(e),!0),t.options.deepLinkSmudge){var n=t.$element.offset();r()("html, body").animate({scrollTop:n.top},t.options.deepLinkSmudgeDelay)}t.$element.trigger("deeplink.zf.tabs",[i,r()(e)])}}},this.options.deepLink&&this._checkDeepLink(),this._events()}},{key:"_events",value:function(){this._addKeyHandler(),this._addClickHandler(),this._setHeightMqHandler=null,this.options.matchHeight&&(this._setHeightMqHandler=this._setHeight.bind(this),r()(window).on("changed.zf.mediaquery",this._setHeightMqHandler)),this.options.deepLink&&r()(window).on("popstate",this._checkDeepLink)}},{key:"_addClickHandler",value:function(){var t=this;this.$element.off("click.zf.tabs").on("click.zf.tabs","."+this.options.linkClass,function(e){e.preventDefault(),e.stopPropagation(),t._handleTabChange(r()(this))})}},{key:"_addKeyHandler",value:function(){var t=this;this.$tabTitles.off("keydown.zf.tabs").on("keydown.zf.tabs",function(e){if(9!==e.which){var i,n,s=r()(this),o=s.parent("ul").children("li");o.each(function(e){if(r()(this).is(s))return void(t.options.wrapOnKeys?(i=0===e?o.last():o.eq(e-1),n=e===o.length-1?o.first():o.eq(e+1)):(i=o.eq(Math.max(0,e-1)),n=o.eq(Math.min(e+1,o.length-1))))}),l.a.handleKey(e,"Tabs",{open:function(){s.find('[role="tab"]').focus(),t._handleTabChange(s)},previous:function(){i.find('[role="tab"]').focus(),t._handleTabChange(i)},next:function(){n.find('[role="tab"]').focus(),t._handleTabChange(n)},handled:function(){e.stopPropagation(),e.preventDefault()}})}})}},{key:"_handleTabChange",value:function(t,e){if(t.hasClass(""+this.options.linkActiveClass))return void(this.options.activeCollapse&&(this._collapseTab(t),this.$element.trigger("collapse.zf.tabs",[t])));var i=this.$element.find("."+this.options.linkClass+"."+this.options.linkActiveClass),n=t.find('[role="tab"]'),s=n.attr("data-tabs-target")||n[0].hash.slice(1),o=this.$tabContent.find("#"+s);if(this._collapseTab(i),this._openTab(t),this.options.deepLink&&!e){var a=t.find("a").attr("href");this.options.updateHistory?history.pushState({},"",a):history.replaceState({},"",a)}this.$element.trigger("change.zf.tabs",[t,o]),o.find("[data-mutate]").trigger("mutateme.zf.trigger")}},{key:"_openTab",value:function(t){var e=t.find('[role="tab"]'),i=e.attr("data-tabs-target")||e[0].hash.slice(1),n=this.$tabContent.find("#"+i);t.addClass(""+this.options.linkActiveClass),e.attr({"aria-selected":"true",tabindex:"0"}),n.addClass(""+this.options.panelActiveClass).removeAttr("aria-hidden")}},{key:"_collapseTab",value:function(t){var e=t.removeClass(""+this.options.linkActiveClass).find('[role="tab"]').attr({"aria-selected":"false",tabindex:-1});r()("#"+e.attr("aria-controls")).removeClass(""+this.options.panelActiveClass).attr({"aria-hidden":"true"})}},{key:"selectTab",value:function(t,e){var i;i="object"==typeof t?t[0].id:t,i.indexOf("#")<0&&(i="#"+i);var n=this.$tabTitles.find('[href$="'+i+'"]').parent("."+this.options.linkClass);this._handleTabChange(n,e)}},{key:"_setHeight",value:function(){var t=0,e=this;this.$tabContent.find("."+this.options.panelClass).css("height","").each(function(){var i=r()(this),n=i.hasClass(""+e.options.panelActiveClass);n||i.css({visibility:"hidden",display:"block"});var s=this.getBoundingClientRect().height;n||i.css({visibility:"",display:""}),t=s>t?s:t}).css("height",t+"px")}},{key:"_destroy",value:function(){this.$element.find("."+this.options.linkClass).off(".zf.tabs").hide().end().find("."+this.options.panelClass).hide(),this.options.matchHeight&&null!=this._setHeightMqHandler&&r()(window).off("changed.zf.mediaquery",this._setHeightMqHandler),this.options.deepLink&&r()(window).off("popstate",this._checkDeepLink)}}]),e}(c.a);d.defaults={deepLink:!1,deepLinkSmudge:!1,deepLinkSmudgeDelay:300,updateHistory:!1,autoFocus:!1,wrapOnKeys:!0,matchHeight:!1,activeCollapse:!1,linkClass:"tabs-title",linkActiveClass:"is-active",panelClass:"tabs-panel",panelActiveClass:"is-active"}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var i=e.indexOf(t);return i===e.length-1?e[0]:e[i+1]}i.d(e,"a",function(){return m});var r=i(7),l=i(2),u=i(1),c=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),h=["left","right","top","bottom"],d=["top","bottom","center"],f=["left","right","center"],p={left:d,right:d,top:f,bottom:f},m=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),c(e,[{key:"_init",value:function(){this.triedPositions={},this.position="auto"===this.options.position?this._getDefaultPosition():this.options.position,this.alignment="auto"===this.options.alignment?this._getDefaultAlignment():this.options.alignment}},{key:"_getDefaultPosition",value:function(){return"bottom"}},{key:"_getDefaultAlignment",value:function(){switch(this.position){case"bottom":case"top":return i.i(u.b)()?"right":"left";case"left":case"right":return"bottom"}}},{key:"_reposition",value:function(){this._alignmentsExhausted(this.position)?(this.position=a(this.position,h),this.alignment=p[this.position][0]):this._realign()}},{key:"_realign",value:function(){this._addTriedPosition(this.position,this.alignment),this.alignment=a(this.alignment,p[this.position])}},{key:"_addTriedPosition",value:function(t,e){this.triedPositions[t]=this.triedPositions[t]||[],this.triedPositions[t].push(e)}},{key:"_positionsExhausted",value:function(){for(var t=!0,e=0;e<h.length;e++)t=t&&this._alignmentsExhausted(h[e]);return t}},{key:"_alignmentsExhausted",value:function(t){return this.triedPositions[t]&&this.triedPositions[t].length==p[t].length}},{key:"_getVOffset",value:function(){return this.options.vOffset}},{key:"_getHOffset",value:function(){return this.options.hOffset}},{key:"_setPosition",value:function(t,e,i){if("false"===t.attr("aria-expanded"))return!1;r.a.GetDimensions(e),r.a.GetDimensions(t);if(e.offset(r.a.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset())),!this.options.allowOverlap){for(var n=1e8,s={position:this.position,alignment:this.alignment};!this._positionsExhausted();){var o=r.a.OverlapArea(e,i,!1,!1,this.options.allowBottomOverlap);if(0===o)return;o<n&&(n=o,s={position:this.position,alignment:this.alignment}),this._reposition(),e.offset(r.a.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset()))}this.position=s.position,this.alignment=s.alignment,e.offset(r.a.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset()))}}}]),e}(l.a);m.defaults={position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!0,vOffset:0,hOffset:0}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(){this.removeEventListener("touchmove",o),this.removeEventListener("touchend",s),g=!1}function o(t){if(f.a.spotSwipe.preventDefault&&t.preventDefault(),g){var e,i=t.touches[0].pageX,n=(t.touches[0].pageY,l-i);h=(new Date).getTime()-c,Math.abs(n)>=f.a.spotSwipe.moveThreshold&&h<=f.a.spotSwipe.timeThreshold&&(e=n>0?"left":"right"),e&&(t.preventDefault(),s.call(this),f()(this).trigger("swipe",e).trigger("swipe"+e))}}function a(t){1==t.touches.length&&(l=t.touches[0].pageX,u=t.touches[0].pageY,g=!0,c=(new Date).getTime(),this.addEventListener("touchmove",o,!1),this.addEventListener("touchend",s,!1))}function r(){this.addEventListener&&this.addEventListener("touchstart",a,!1)}i.d(e,"a",function(){return m});var l,u,c,h,d=i(0),f=i.n(d),p=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),m={},g=!1,v=function(){function t(e){n(this,t),this.version="1.0.0",this.enabled="ontouchstart"in document.documentElement,this.preventDefault=!1,this.moveThreshold=75,this.timeThreshold=200,this.$=e,this._init()}return p(t,[{key:"_init",value:function(){var t=this.$;t.event.special.swipe={setup:r},t.each(["left","up","down","right"],function(){t.event.special["swipe"+this]={setup:function(){t(this).on("swipe",t.noop)}}})}}]),t}();m.setupSpotSwipe=function(t){t.spotSwipe=new v(t)},m.setupTouchHandler=function(t){t.fn.addTouch=function(){this.each(function(i,n){t(n).bind("touchstart touchmove touchend touchcancel",function(){e(event)})});var e=function(t){var e,i=t.changedTouches,n=i[0],s={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},o=s[t.type];"MouseEvent"in window&&"function"==typeof window.MouseEvent?e=new window.MouseEvent(o,{bubbles:!0,cancelable:!0,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY}):(e=document.createEvent("MouseEvent"),e.initMouseEvent(o,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null)),n.target.dispatchEvent(e)}}},m.init=function(t){"undefined"==typeof t.spotSwipe&&(m.setupSpotSwipe(t),m.setupTouchHandler(t))}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return c});var a=i(0),r=i.n(a),l=i(2),u=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),c=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),u(e,[{key:"_setup",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Abide",this._init()}},{key:"_init",value:function(){this.$inputs=this.$element.find("input, textarea, select"),this._events()}},{key:"_events",value:function(){var t=this;this.$element.off(".abide").on("reset.zf.abide",function(){t.resetForm()}).on("submit.zf.abide",function(){return t.validateForm()}),"fieldChange"===this.options.validateOn&&this.$inputs.off("change.zf.abide").on("change.zf.abide",function(e){t.validateInput(r()(e.target))}),this.options.liveValidate&&this.$inputs.off("input.zf.abide").on("input.zf.abide",function(e){t.validateInput(r()(e.target))}),this.options.validateOnBlur&&this.$inputs.off("blur.zf.abide").on("blur.zf.abide",function(e){t.validateInput(r()(e.target))})}},{key:"_reflow",value:function(){this._init()}},{key:"requiredCheck",value:function(t){if(!t.attr("required"))return!0;var e=!0;switch(t[0].type){case"checkbox":e=t[0].checked;break;case"select":case"select-one":case"select-multiple":var i=t.find("option:selected");i.length&&i.val()||(e=!1);break;default:t.val()&&t.val().length||(e=!1)}return e}},{key:"findFormError",value:function(t){var e=t[0].id,i=t.siblings(this.options.formErrorSelector);return i.length||(i=t.parent().find(this.options.formErrorSelector)),i=i.add(this.$element.find('[data-form-error-for="'+e+'"]'))}},{key:"findLabel",value:function(t){var e=t[0].id,i=this.$element.find('label[for="'+e+'"]');return i.length?i:t.closest("label")}},{key:"findRadioLabels",value:function(t){var e=this,i=t.map(function(t,i){var n=i.id,s=e.$element.find('label[for="'+n+'"]');return s.length||(s=r()(i).closest("label")),s[0]});return r()(i)}},{key:"addErrorClasses",value:function(t){var e=this.findLabel(t),i=this.findFormError(t);e.length&&e.addClass(this.options.labelErrorClass),i.length&&i.addClass(this.options.formErrorClass),t.addClass(this.options.inputErrorClass).attr("data-invalid","")}},{key:"removeRadioErrorClasses",value:function(t){var e=this.$element.find(':radio[name="'+t+'"]'),i=this.findRadioLabels(e),n=this.findFormError(e);i.length&&i.removeClass(this.options.labelErrorClass),n.length&&n.removeClass(this.options.formErrorClass),e.removeClass(this.options.inputErrorClass).removeAttr("data-invalid")}},{key:"removeErrorClasses",value:function(t){if("radio"==t[0].type)return this.removeRadioErrorClasses(t.attr("name"));var e=this.findLabel(t),i=this.findFormError(t);e.length&&e.removeClass(this.options.labelErrorClass),i.length&&i.removeClass(this.options.formErrorClass),t.removeClass(this.options.inputErrorClass).removeAttr("data-invalid")}},{key:"validateInput",value:function(t){var e=this,i=this.requiredCheck(t),n=!1,s=!0,o=t.attr("data-validator"),a=!0;if(t.is("[data-abide-ignore]")||t.is('[type="hidden"]')||t.is("[disabled]"))return!0;switch(t[0].type){case"radio":n=this.validateRadio(t.attr("name"));break;case"checkbox":n=i;break;case"select":case"select-one":case"select-multiple":n=i;break;default:n=this.validateText(t)}o&&(s=this.matchValidation(t,o,t.attr("required"))),t.attr("data-equalto")&&(a=this.options.validators.equalTo(t));var l=[i,n,s,a].indexOf(!1)===-1,u=(l?"valid":"invalid")+".zf.abide";if(l){var c=this.$element.find('[data-equalto="'+t.attr("id")+'"]');c.length&&!function(){var t=e;c.each(function(){r()(this).val()&&t.validateInput(r()(this))})}()}return this[l?"removeErrorClasses":"addErrorClasses"](t),t.trigger(u,[t]),l}},{key:"validateForm",value:function(){var t=[],e=this;this.$inputs.each(function(){t.push(e.validateInput(r()(this)))});var i=t.indexOf(!1)===-1;return this.$element.find("[data-abide-error]").css("display",i?"none":"block"),this.$element.trigger((i?"formvalid":"forminvalid")+".zf.abide",[this.$element]),i}},{key:"validateText",value:function(t,e){e=e||t.attr("pattern")||t.attr("type");var i=t.val(),n=!1;return i.length?n=this.options.patterns.hasOwnProperty(e)?this.options.patterns[e].test(i):e===t.attr("type")||new RegExp(e).test(i):t.prop("required")||(n=!0),n}},{key:"validateRadio",value:function(t){var e=this.$element.find(':radio[name="'+t+'"]'),i=!1,n=!1;return e.each(function(t,e){r()(e).attr("required")&&(n=!0)}),n||(i=!0),i||e.each(function(t,e){r()(e).prop("checked")&&(i=!0)}),i}},{key:"matchValidation",value:function(t,e,i){var n=this;i=!!i;var s=e.split(" ").map(function(e){return n.options.validators[e](t,i,t.parent())});return s.indexOf(!1)===-1}},{key:"resetForm",value:function(){var t=this.$element,e=this.options;r()("."+e.labelErrorClass,t).not("small").removeClass(e.labelErrorClass),r()("."+e.inputErrorClass,t).not("small").removeClass(e.inputErrorClass),r()(e.formErrorSelector+"."+e.formErrorClass).removeClass(e.formErrorClass),t.find("[data-abide-error]").css("display","none"),r()(":input",t).not(":button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]").val("").removeAttr("data-invalid"),r()(":input:radio",t).not("[data-abide-ignore]").prop("checked",!1).removeAttr("data-invalid"),r()(":input:checkbox",t).not("[data-abide-ignore]").prop("checked",!1).removeAttr("data-invalid"),t.trigger("formreset.zf.abide",[t])}},{key:"_destroy",value:function(){var t=this;this.$element.off(".abide").find("[data-abide-error]").css("display","none"),this.$inputs.off(".abide").each(function(){t.removeErrorClasses(r()(this))})}}]),e}(l.a);c.defaults={validateOn:"fieldChange",labelErrorClass:"is-invalid-label",inputErrorClass:"is-invalid-input",formErrorSelector:".form-error",formErrorClass:"is-visible",liveValidate:!1,validateOnBlur:!1,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/, dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,website:{test:function(t){return c.defaults.patterns.domain.test(t)||c.defaults.patterns.url.test(t)}}},validators:{equalTo:function(t,e,i){return r()("#"+t.attr("data-equalto")).val()===t.val()}}}},function(t,e,i){"use strict";function n(t){if(void 0===Function.prototype.name){var e=/function\s([^(]{1,})\(/,i=e.exec(t.toString());return i&&i.length>1?i[1].trim():""}return void 0===t.prototype?t.constructor.name:t.prototype.constructor.name}function s(t){return"true"===t||"false"!==t&&(isNaN(1*t)?t:parseFloat(t))}function o(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}i.d(e,"a",function(){return c});var a=i(0),r=i.n(a),l=i(1),u="6.4.0",c={version:u,_plugins:{},_uuids:[],plugin:function(t,e){var i=e||n(t),s=o(i);this._plugins[s]=this[i]=t},registerPlugin:function(t,e){var s=e?o(e):n(t.constructor).toLowerCase();t.uuid=i.i(l.a)(6,s),t.$element.attr("data-"+s)||t.$element.attr("data-"+s,t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf."+s),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var e=o(n(t.$element.data("zfPlugin").constructor));this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-"+e).removeData("zfPlugin").trigger("destroyed.zf."+e);for(var i in t)t[i]=null},reInit:function(t){var e=t instanceof r.a;try{if(e)t.each(function(){r()(this).data("zfPlugin")._init()});else{var i=typeof t,n=this,s={object:function(t){t.forEach(function(t){t=o(t),r()("[data-"+t+"]").foundation("_init")})},string:function(){t=o(t),r()("[data-"+t+"]").foundation("_init")},undefined:function(){this.object(Object.keys(n._plugins))}};s[i](t)}}catch(t){console.error(t)}finally{return t}},reflow:function(t,e){"undefined"==typeof e?e=Object.keys(this._plugins):"string"==typeof e&&(e=[e]);var i=this;r.a.each(e,function(e,n){var o=i._plugins[n],a=r()(t).find("[data-"+n+"]").addBack("[data-"+n+"]");a.each(function(){var t=r()(this),e={};if(t.data("zfPlugin"))return void console.warn("Tried to initialize "+n+" on an element that already has a Foundation plugin.");if(t.attr("data-options")){t.attr("data-options").split(";").forEach(function(t,i){var n=t.split(":").map(function(t){return t.trim()});n[0]&&(e[n[0]]=s(n[1]))})}try{t.data("zfPlugin",new o(r()(this),e))}catch(t){console.error(t)}finally{return}})})},getFnName:n,addToJquery:function(t){var e=function(e){var i=typeof e,s=t(".no-js");if(s.length&&s.removeClass("no-js"),"undefined"===i)c.MediaQuery._init(),c.reflow(this);else{if("string"!==i)throw new TypeError("We're sorry, "+i+" is not a valid parameter. You must use a string representing the method you wish to invoke.");var o=Array.prototype.slice.call(arguments,1),a=this.data("zfPlugin");if(void 0===a||void 0===a[e])throw new ReferenceError("We're sorry, '"+e+"' is not an available method for "+(a?n(a):"this element")+".");1===this.length?a[e].apply(a,o):this.each(function(i,n){a[e].apply(t(n).data("zfPlugin"),o)})}return this};return t.fn.foundation=e,t}};c.util={throttle:function(t,e){var i=null;return function(){var n=this,s=arguments;null===i&&(i=setTimeout(function(){t.apply(n,s),i=null},e))}}},window.Foundation=c,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var t=["webkit","moz"],e=0;e<t.length&&!window.requestAnimationFrame;++e){var i=t[e];window.requestAnimationFrame=window[i+"RequestAnimationFrame"],window.cancelAnimationFrame=window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var n=0;window.requestAnimationFrame=function(t){var e=Date.now(),i=Math.max(n+16,e);return setTimeout(function(){t(n=i)},i-e)},window.cancelAnimationFrame=clearTimeout}window.performance&&window.performance.now||(window.performance={start:Date.now(),now:function(){return Date.now()-this.start}})}(),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),i=this,n=function(){},s=function(){return i.apply(this instanceof n?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),s.prototype=new n,s})},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return p});var a=i(0),r=i.n(a),l=i(3),u=i(1),c=i(15),h=i(5),d=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),f=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;if(void 0!==a)return a.call(n)},p=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),d(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Dropdown",h.a.init(r.a),this._init(),l.a.register("Dropdown",{ENTER:"open",SPACE:"open",ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.attr("id");this.$anchor=r()('[data-toggle="'+t+'"]').length?r()('[data-toggle="'+t+'"]'):r()('[data-open="'+t+'"]'),this.$anchor.attr({"aria-controls":t,"data-is-focus":!1,"data-yeti-box":t,"aria-haspopup":!0,"aria-expanded":!1}),this.options.parentClass?this.$parent=this.$element.parents("."+this.options.parentClass):this.$parent=null,this.$element.attr({"aria-hidden":"true","data-yeti-box":t,"data-resize":t,"aria-labelledby":this.$anchor[0].id||i.i(u.a)(6,"dd-anchor")}),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_init",this).call(this),this._events()}},{key:"_getDefaultPosition",value:function(){var t=this.$element[0].className.match(/(top|left|right|bottom)/g);return t?t[0]:"bottom"}},{key:"_getDefaultAlignment",value:function(){var t=/float-(\S+)/.exec(this.$anchor[0].className);return t?t[1]:f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_getDefaultAlignment",this).call(this)}},{key:"_setPosition",value:function(){f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setPosition",this).call(this,this.$anchor,this.$element,this.$parent)}},{key:"_events",value:function(){var t=this;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":this._setPosition.bind(this)}),this.options.hover&&(this.$anchor.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",function(){var e=r()("body").data();"undefined"!=typeof e.whatinput&&"mouse"!==e.whatinput||(clearTimeout(t.timeout),t.timeout=setTimeout(function(){t.open(),t.$anchor.data("hover",!0)},t.options.hoverDelay))}).on("mouseleave.zf.dropdown",function(){clearTimeout(t.timeout),t.timeout=setTimeout(function(){t.close(),t.$anchor.data("hover",!1)},t.options.hoverDelay)}),this.options.hoverPane&&this.$element.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",function(){clearTimeout(t.timeout)}).on("mouseleave.zf.dropdown",function(){clearTimeout(t.timeout),t.timeout=setTimeout(function(){t.close(),t.$anchor.data("hover",!1)},t.options.hoverDelay)})),this.$anchor.add(this.$element).on("keydown.zf.dropdown",function(e){var i=r()(this);l.a.findFocusable(t.$element);l.a.handleKey(e,"Dropdown",{open:function(){i.is(t.$anchor)&&(t.open(),t.$element.attr("tabindex",-1).focus(),e.preventDefault())},close:function(){t.close(),t.$anchor.focus()}})})}},{key:"_addBodyHandler",value:function(){var t=r()(document.body).not(this.$element),e=this;t.off("click.zf.dropdown").on("click.zf.dropdown",function(i){e.$anchor.is(i.target)||e.$anchor.find(i.target).length||e.$element.find(i.target).length||(e.close(),t.off("click.zf.dropdown"))})}},{key:"open",value:function(){if(this.$element.trigger("closeme.zf.dropdown",this.$element.attr("id")),this.$anchor.addClass("hover").attr({"aria-expanded":!0}),this.$element.addClass("is-opening"),this._setPosition(),this.$element.removeClass("is-opening").addClass("is-open").attr({"aria-hidden":!1}),this.options.autoFocus){var t=l.a.findFocusable(this.$element);t.length&&t.eq(0).focus()}this.options.closeOnClick&&this._addBodyHandler(),this.options.trapFocus&&l.a.trapFocus(this.$element),this.$element.trigger("show.zf.dropdown",[this.$element])}},{key:"close",value:function(){return!!this.$element.hasClass("is-open")&&(this.$element.removeClass("is-open").attr({"aria-hidden":!0}),this.$anchor.removeClass("hover").attr("aria-expanded",!1),this.$element.trigger("hide.zf.dropdown",[this.$element]),void(this.options.trapFocus&&l.a.releaseFocus(this.$element)))}},{key:"toggle",value:function(){if(this.$element.hasClass("is-open")){if(this.$anchor.data("hover"))return;this.close()}else this.open()}},{key:"_destroy",value:function(){this.$element.off(".zf.trigger").hide(),this.$anchor.off(".zf.dropdown"),r()(document.body).off("click.zf.dropdown")}}]),e}(c.a);p.defaults={parentClass:null,hoverDelay:250,hover:!1,hoverPane:!1,vOffset:0,hOffset:0,positionClass:"",position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!0,trapFocus:!1,autoFocus:!1,closeOnClick:!1}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return f});var a=i(0),r=i.n(a),l=i(4),u=i(8),c=i(1),h=i(2),d=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),f=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),d(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Equalizer",this._init()}},{key:"_init",value:function(){var t=this.$element.attr("data-equalizer")||"",e=this.$element.find('[data-equalizer-watch="'+t+'"]');l.a._init(),this.$watched=e.length?e:this.$element.find("[data-equalizer-watch]"),this.$element.attr("data-resize",t||i.i(c.a)(6,"eq")),this.$element.attr("data-mutate",t||i.i(c.a)(6,"eq")),this.hasNested=this.$element.find("[data-equalizer]").length>0,this.isNested=this.$element.parentsUntil(document.body,"[data-equalizer]").length>0,this.isOn=!1,this._bindHandler={onResizeMeBound:this._onResizeMe.bind(this),onPostEqualizedBound:this._onPostEqualized.bind(this)};var n,s=this.$element.find("img");this.options.equalizeOn?(n=this._checkMQ(),r()(window).on("changed.zf.mediaquery",this._checkMQ.bind(this))):this._events(),(void 0!==n&&n===!1||void 0===n)&&(s.length?i.i(u.a)(s,this._reflow.bind(this)):this._reflow())}},{key:"_pauseEvents",value:function(){this.isOn=!1,this.$element.off({".zf.equalizer":this._bindHandler.onPostEqualizedBound,"resizeme.zf.trigger":this._bindHandler.onResizeMeBound,"mutateme.zf.trigger":this._bindHandler.onResizeMeBound})}},{key:"_onResizeMe",value:function(t){this._reflow()}},{key:"_onPostEqualized",value:function(t){t.target!==this.$element[0]&&this._reflow()}},{key:"_events",value:function(){this._pauseEvents(),this.hasNested?this.$element.on("postequalized.zf.equalizer",this._bindHandler.onPostEqualizedBound):(this.$element.on("resizeme.zf.trigger",this._bindHandler.onResizeMeBound),this.$element.on("mutateme.zf.trigger",this._bindHandler.onResizeMeBound)),this.isOn=!0}},{key:"_checkMQ",value:function(){var t=!l.a.is(this.options.equalizeOn);return t?this.isOn&&(this._pauseEvents(),this.$watched.css("height","auto")):this.isOn||this._events(),t}},{key:"_killswitch",value:function(){}},{key:"_reflow",value:function(){return!this.options.equalizeOnStack&&this._isStacked()?(this.$watched.css("height","auto"),!1):void(this.options.equalizeByRow?this.getHeightsByRow(this.applyHeightByRow.bind(this)):this.getHeights(this.applyHeight.bind(this)))}},{key:"_isStacked",value:function(){return!this.$watched[0]||!this.$watched[1]||this.$watched[0].getBoundingClientRect().top!==this.$watched[1].getBoundingClientRect().top}},{key:"getHeights",value:function(t){for(var e=[],i=0,n=this.$watched.length;i<n;i++)this.$watched[i].style.height="auto",e.push(this.$watched[i].offsetHeight);t(e)}},{key:"getHeightsByRow",value:function(t){var e=this.$watched.length?this.$watched.first().offset().top:0,i=[],n=0;i[n]=[];for(var s=0,o=this.$watched.length;s<o;s++){this.$watched[s].style.height="auto";var a=r()(this.$watched[s]).offset().top;a!=e&&(n++,i[n]=[],e=a),i[n].push([this.$watched[s],this.$watched[s].offsetHeight])}for(var l=0,u=i.length;l<u;l++){var c=r()(i[l]).map(function(){return this[1]}).get(),h=Math.max.apply(null,c);i[l].push(h)}t(i)}},{key:"applyHeight",value:function(t){var e=Math.max.apply(null,t);this.$element.trigger("preequalized.zf.equalizer"),this.$watched.css("height",e),this.$element.trigger("postequalized.zf.equalizer")}},{key:"applyHeightByRow",value:function(t){this.$element.trigger("preequalized.zf.equalizer");for(var e=0,i=t.length;e<i;e++){var n=t[e].length,s=t[e][n-1];if(n<=2)r()(t[e][0][0]).css({height:"auto"});else{this.$element.trigger("preequalizedrow.zf.equalizer");for(var o=0,a=n-1;o<a;o++)r()(t[e][o][0]).css({height:s});this.$element.trigger("postequalizedrow.zf.equalizer")}}this.$element.trigger("postequalized.zf.equalizer")}},{key:"_destroy",value:function(){this._pauseEvents(),this.$watched.css("height","auto")}}]),e}(h.a);f.defaults={equalizeOnStack:!1,equalizeByRow:!1,equalizeOn:""}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return d});var a=i(0),r=i.n(a),l=i(4),u=i(2),c=i(1),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,i),this.rules=[],this.currentPath="",this.className="Interchange",this._init(),this._events()}},{key:"_init",value:function(){l.a._init();var t=this.$element[0].id||i.i(c.a)(6,"interchange");this.$element.attr({"data-resize":t,id:t}),this._addBreakpoints(),this._generateRules(),this._reflow()}},{key:"_events",value:function(){var t=this;this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",function(){return t._reflow()})}},{key:"_reflow",value:function(){var t;for(var e in this.rules)if(this.rules.hasOwnProperty(e)){var i=this.rules[e];window.matchMedia(i.query).matches&&(t=i)}t&&this.replace(t.path)}},{key:"_addBreakpoints",value:function(){for(var t in l.a.queries)if(l.a.queries.hasOwnProperty(t)){var i=l.a.queries[t];e.SPECIAL_QUERIES[i.name]=i.value}}},{key:"_generateRules",value:function(t){var i,n=[];i=this.options.rules?this.options.rules:this.$element.data("interchange"),i="string"==typeof i?i.match(/\[.*?\]/g):i;for(var s in i)if(i.hasOwnProperty(s)){var o=i[s].slice(1,-1).split(", "),a=o.slice(0,-1).join(""),r=o[o.length-1];e.SPECIAL_QUERIES[r]&&(r=e.SPECIAL_QUERIES[r]),n.push({path:a,query:r})}this.rules=n}},{key:"replace",value:function(t){if(this.currentPath!==t){var e=this,i="replaced.zf.interchange";"IMG"===this.$element[0].nodeName?this.$element.attr("src",t).on("load",function(){e.currentPath=t}).trigger(i):t.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i)?this.$element.css({"background-image":"url("+t+")"}).trigger(i):r.a.get(t,function(n){e.$element.html(n).trigger(i),r()(n).foundation(),e.currentPath=t})}}},{key:"_destroy",value:function(){this.$element.off("resizeme.zf.trigger")}}]),e}(u.a);d.defaults={rules:null},d.SPECIAL_QUERIES={landscape:"screen and (orientation: landscape)",portrait:"screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)"}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return d});var a=i(0),r=i.n(a),l=i(1),u=i(2),c=i(33),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Magellan",this._init(),this.calcPoints()}},{key:"_init",value:function(){var t=this.$element[0].id||i.i(l.a)(6,"magellan");this.$targets=r()("[data-magellan-target]"),this.$links=this.$element.find("a"),this.$element.attr({"data-resize":t,"data-scroll":t,id:t}),this.$active=r()(),this.scrollPos=parseInt(window.pageYOffset,10),this._events()}},{key:"calcPoints",value:function(){var t=this,e=document.body,i=document.documentElement;this.points=[],this.winHeight=Math.round(Math.max(window.innerHeight,i.clientHeight)),this.docHeight=Math.round(Math.max(e.scrollHeight,e.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)),this.$targets.each(function(){var e=r()(this),i=Math.round(e.offset().top-t.options.threshold);e.targetPoint=i,t.points.push(i)})}},{key:"_events",value:function(){var t=this;r()("html, body"),{duration:t.options.animationDuration,easing:t.options.animationEasing};r()(window).one("load",function(){t.options.deepLinking&&location.hash&&t.scrollToLoc(location.hash),t.calcPoints(),t._updateActive()}),this.$element.on({"resizeme.zf.trigger":this.reflow.bind(this),"scrollme.zf.trigger":this._updateActive.bind(this)}).on("click.zf.magellan",'a[href^="#"]',function(e){e.preventDefault();var i=this.getAttribute("href");t.scrollToLoc(i)}),this._deepLinkScroll=function(e){t.options.deepLinking&&t.scrollToLoc(window.location.hash)},r()(window).on("popstate",this._deepLinkScroll)}},{key:"scrollToLoc",value:function(t){this._inTransition=!0;var e=this,i={animationEasing:this.options.animationEasing,animationDuration:this.options.animationDuration,threshold:this.options.threshold,offset:this.options.offset};c.a.scrollToLoc(t,i,function(){e._inTransition=!1,e._updateActive()})}},{key:"reflow",value:function(){this.calcPoints(),this._updateActive()}},{key:"_updateActive",value:function(){if(!this._inTransition){var t,e=parseInt(window.pageYOffset,10);if(e+this.winHeight===this.docHeight)t=this.points.length-1;else if(e<this.points[0])t=void 0;else{var i=this.scrollPos<e,n=this,s=this.points.filter(function(t,s){return i?t-n.options.offset<=e:t-n.options.offset-n.options.threshold<=e});t=s.length?s.length-1:0}if(this.$active.removeClass(this.options.activeClass),this.$active=this.$links.filter('[href="#'+this.$targets.eq(t).data("magellan-target")+'"]').addClass(this.options.activeClass),this.options.deepLinking){var o="";void 0!=t&&(o=this.$active[0].getAttribute("href")),o!==window.location.hash&&(window.history.pushState?window.history.pushState(null,null,o):window.location.hash=o)}this.scrollPos=e,this.$element.trigger("update.zf.magellan",[this.$active])}}},{key:"_destroy",value:function(){if(this.$element.off(".zf.trigger .zf.magellan").find("."+this.options.activeClass).removeClass(this.options.activeClass),this.options.deepLinking){var t=this.$active[0].getAttribute("href");window.location.hash.replace(t,"")}r()(window).off("popstate",this._deepLinkScroll)}}]),e}(u.a);d.defaults={animationDuration:500,animationEasing:"linear",threshold:50,activeClass:"is-active",deepLinking:!1,offset:0}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return p});var a=i(0),r=i.n(a),l=i(3),u=i(4),c=i(1),h=i(2),d=i(5),f=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),p=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),f(e,[{key:"_setup",value:function(t,i){var n=this;this.className="OffCanvas",this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.contentClasses={base:[],reveal:[]},this.$lastTrigger=r()(),this.$triggers=r()(),this.position="left",this.$content=r()(),this.nested=!!this.options.nested,r()(["push","overlap"]).each(function(t,e){n.contentClasses.base.push("has-transition-"+e)}),r()(["left","right","top","bottom"]).each(function(t,e){n.contentClasses.base.push("has-position-"+e),n.contentClasses.reveal.push("has-reveal-"+e)}),d.a.init(r.a),u.a._init(),this._init(),this._events(),l.a.register("OffCanvas",{ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.attr("id");if(this.$element.attr("aria-hidden","true"),this.options.contentId?this.$content=r()("#"+this.options.contentId):this.$element.siblings("[data-off-canvas-content]").length?this.$content=this.$element.siblings("[data-off-canvas-content]").first():this.$content=this.$element.closest("[data-off-canvas-content]").first(),this.options.contentId?this.options.contentId&&null===this.options.nested&&console.warn("Remember to use the nested option if using the content ID option!"):this.nested=0===this.$element.siblings("[data-off-canvas-content]").length,this.nested===!0&&(this.options.transition="overlap",this.$element.removeClass("is-transition-push")),this.$element.addClass("is-transition-"+this.options.transition+" is-closed"),this.$triggers=r()(document).find('[data-open="'+t+'"], [data-close="'+t+'"], [data-toggle="'+t+'"]').attr("aria-expanded","false").attr("aria-controls",t),this.position=this.$element.is(".position-left, .position-top, .position-right, .position-bottom")?this.$element.attr("class").match(/position\-(left|top|right|bottom)/)[1]:this.position,this.options.contentOverlay===!0){var e=document.createElement("div"),i="fixed"===r()(this.$element).css("position")?"is-overlay-fixed":"is-overlay-absolute";e.setAttribute("class","js-off-canvas-overlay "+i),this.$overlay=r()(e),"is-overlay-fixed"===i?r()(this.$overlay).insertAfter(this.$element):this.$content.append(this.$overlay)}this.options.isRevealed=this.options.isRevealed||new RegExp(this.options.revealClass,"g").test(this.$element[0].className),this.options.isRevealed===!0&&(this.options.revealOn=this.options.revealOn||this.$element[0].className.match(/(reveal-for-medium|reveal-for-large)/g)[0].split("-")[2],this._setMQChecker()),this.options.transitionTime&&this.$element.css("transition-duration",this.options.transitionTime),this._removeContentClasses()}},{key:"_events",value:function(){if(this.$element.off(".zf.trigger .zf.offcanvas").on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"keydown.zf.offcanvas":this._handleKeyboard.bind(this)}),this.options.closeOnClick===!0){var t=this.options.contentOverlay?this.$overlay:this.$content;t.on({"click.zf.offcanvas":this.close.bind(this)})}}},{key:"_setMQChecker",value:function(){var t=this;r()(window).on("changed.zf.mediaquery",function(){u.a.atLeast(t.options.revealOn)?t.reveal(!0):t.reveal(!1)}).one("load.zf.offcanvas",function(){u.a.atLeast(t.options.revealOn)&&t.reveal(!0)})}},{key:"_removeContentClasses",value:function(t){this.$content.removeClass(this.contentClasses.base.join(" ")),t===!0&&this.$content.removeClass(this.contentClasses.reveal.join(" "))}},{key:"_addContentClasses",value:function(t){this._removeContentClasses(),this.$content.addClass("has-transition-"+this.options.transition+" has-position-"+this.position),t===!0&&this.$content.addClass("has-reveal-"+this.position)}},{key:"reveal",value:function(t){t?(this.close(),this.isRevealed=!0,this.$element.attr("aria-hidden","false"),this.$element.off("open.zf.trigger toggle.zf.trigger"),this.$element.removeClass("is-closed")):(this.isRevealed=!1,this.$element.attr("aria-hidden","true"),this.$element.off("open.zf.trigger toggle.zf.trigger").on({"open.zf.trigger":this.open.bind(this),"toggle.zf.trigger":this.toggle.bind(this)}),this.$element.addClass("is-closed")),this._addContentClasses(t)}},{key:"_stopScrolling",value:function(t){return!1}},{key:"_recordScrollable",value:function(t){var e=this;e.scrollHeight!==e.clientHeight&&(0===e.scrollTop&&(e.scrollTop=1),e.scrollTop===e.scrollHeight-e.clientHeight&&(e.scrollTop=e.scrollHeight-e.clientHeight-1)),e.allowUp=e.scrollTop>0,e.allowDown=e.scrollTop<e.scrollHeight-e.clientHeight,e.lastY=t.originalEvent.pageY}},{key:"_stopScrollPropagation",value:function(t){var e=this,i=t.pageY<e.lastY,n=!i;e.lastY=t.pageY,i&&e.allowUp||n&&e.allowDown?t.stopPropagation():t.preventDefault()}},{key:"open",value:function(t,e){if(!this.$element.hasClass("is-open")&&!this.isRevealed){var n=this;e&&(this.$lastTrigger=e),"top"===this.options.forceTo?window.scrollTo(0,0):"bottom"===this.options.forceTo&&window.scrollTo(0,document.body.scrollHeight),this.options.transitionTime&&"overlap"!==this.options.transition?this.$element.siblings("[data-off-canvas-content]").css("transition-duration",this.options.transitionTime):this.$element.siblings("[data-off-canvas-content]").css("transition-duration",""),this.$element.addClass("is-open").removeClass("is-closed"),this.$triggers.attr("aria-expanded","true"),this.$element.attr("aria-hidden","false").trigger("opened.zf.offcanvas"),this.$content.addClass("is-open-"+this.position),this.options.contentScroll===!1&&(r()("body").addClass("is-off-canvas-open").on("touchmove",this._stopScrolling),this.$element.on("touchstart",this._recordScrollable),this.$element.on("touchmove",this._stopScrollPropagation)),this.options.contentOverlay===!0&&this.$overlay.addClass("is-visible"),this.options.closeOnClick===!0&&this.options.contentOverlay===!0&&this.$overlay.addClass("is-closable"),this.options.autoFocus===!0&&this.$element.one(i.i(c.c)(this.$element),function(){if(n.$element.hasClass("is-open")){var t=n.$element.find("[data-autofocus]");t.length?t.eq(0).focus():n.$element.find("a, button").eq(0).focus()}}),this.options.trapFocus===!0&&(this.$content.attr("tabindex","-1"),l.a.trapFocus(this.$element)),this._addContentClasses()}}},{key:"close",value:function(t){if(this.$element.hasClass("is-open")&&!this.isRevealed){var e=this;this.$element.removeClass("is-open"),this.$element.attr("aria-hidden","true").trigger("closed.zf.offcanvas"),this.$content.removeClass("is-open-left is-open-top is-open-right is-open-bottom"),this.options.contentScroll===!1&&(r()("body").removeClass("is-off-canvas-open").off("touchmove",this._stopScrolling),this.$element.off("touchstart",this._recordScrollable),this.$element.off("touchmove",this._stopScrollPropagation)),this.options.contentOverlay===!0&&this.$overlay.removeClass("is-visible"),this.options.closeOnClick===!0&&this.options.contentOverlay===!0&&this.$overlay.removeClass("is-closable"),this.$triggers.attr("aria-expanded","false"),this.options.trapFocus===!0&&(this.$content.removeAttr("tabindex"),l.a.releaseFocus(this.$element)),this.$element.one(i.i(c.c)(this.$element),function(t){e.$element.addClass("is-closed"),e._removeContentClasses()})}}},{key:"toggle",value:function(t,e){this.$element.hasClass("is-open")?this.close(t,e):this.open(t,e)}},{key:"_handleKeyboard",value:function(t){var e=this;l.a.handleKey(t,"OffCanvas",{close:function(){return e.close(),e.$lastTrigger.focus(),!0},handled:function(){t.stopPropagation(),t.preventDefault()}})}},{key:"_destroy",value:function(){this.close(),this.$element.off(".zf.trigger .zf.offcanvas"),this.$overlay.off(".zf.offcanvas")}}]),e}(h.a);p.defaults={closeOnClick:!0,contentOverlay:!0,contentId:null,nested:null,contentScroll:!0,transitionTime:null,transition:"push",forceTo:null,isRevealed:!1,revealOn:null,autoFocus:!0,revealClass:"reveal-for-",trapFocus:!1}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e); }i.d(e,"a",function(){return g});var a=i(0),r=i.n(a),l=i(3),u=i(6),c=i(34),h=i(8),d=i(1),f=i(2),p=i(16),m=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),g=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),m(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Orbit",p.a.init(r.a),this._init(),l.a.register("Orbit",{ltr:{ARROW_RIGHT:"next",ARROW_LEFT:"previous"},rtl:{ARROW_LEFT:"next",ARROW_RIGHT:"previous"}})}},{key:"_init",value:function(){this._reset(),this.$wrapper=this.$element.find("."+this.options.containerClass),this.$slides=this.$element.find("."+this.options.slideClass);var t=this.$element.find("img"),e=this.$slides.filter(".is-active"),n=this.$element[0].id||i.i(d.a)(6,"orbit");this.$element.attr({"data-resize":n,id:n}),e.length||this.$slides.eq(0).addClass("is-active"),this.options.useMUI||this.$slides.addClass("no-motionui"),t.length?i.i(h.a)(t,this._prepareForOrbit.bind(this)):this._prepareForOrbit(),this.options.bullets&&this._loadBullets(),this._events(),this.options.autoPlay&&this.$slides.length>1&&this.geoSync(),this.options.accessible&&this.$wrapper.attr("tabindex",0)}},{key:"_loadBullets",value:function(){this.$bullets=this.$element.find("."+this.options.boxOfBullets).find("button")}},{key:"geoSync",value:function(){var t=this;this.timer=new c.a(this.$element,{duration:this.options.timerDelay,infinite:!1},function(){t.changeSlide(!0)}),this.timer.start()}},{key:"_prepareForOrbit",value:function(){this._setWrapperHeight()}},{key:"_setWrapperHeight",value:function(t){var e,i=0,n=0,s=this;this.$slides.each(function(){e=this.getBoundingClientRect().height,r()(this).attr("data-slide",n),s.$slides.filter(".is-active")[0]!==s.$slides.eq(n)[0]&&r()(this).css({position:"relative",display:"none"}),i=e>i?e:i,n++}),n===this.$slides.length&&(this.$wrapper.css({height:i}),t&&t(i))}},{key:"_setSlideHeight",value:function(t){this.$slides.each(function(){r()(this).css("max-height",t)})}},{key:"_events",value:function(){var t=this;if(this.$element.off(".resizeme.zf.trigger").on({"resizeme.zf.trigger":this._prepareForOrbit.bind(this)}),this.$slides.length>1){if(this.options.swipe&&this.$slides.off("swipeleft.zf.orbit swiperight.zf.orbit").on("swipeleft.zf.orbit",function(e){e.preventDefault(),t.changeSlide(!0)}).on("swiperight.zf.orbit",function(e){e.preventDefault(),t.changeSlide(!1)}),this.options.autoPlay&&(this.$slides.on("click.zf.orbit",function(){t.$element.data("clickedOn",!t.$element.data("clickedOn")),t.timer[t.$element.data("clickedOn")?"pause":"start"]()}),this.options.pauseOnHover&&this.$element.on("mouseenter.zf.orbit",function(){t.timer.pause()}).on("mouseleave.zf.orbit",function(){t.$element.data("clickedOn")||t.timer.start()})),this.options.navButtons){var e=this.$element.find("."+this.options.nextClass+", ."+this.options.prevClass);e.attr("tabindex",0).on("click.zf.orbit touchend.zf.orbit",function(e){e.preventDefault(),t.changeSlide(r()(this).hasClass(t.options.nextClass))})}this.options.bullets&&this.$bullets.on("click.zf.orbit touchend.zf.orbit",function(){if(/is-active/g.test(this.className))return!1;var e=r()(this).data("slide"),i=e>t.$slides.filter(".is-active").data("slide"),n=t.$slides.eq(e);t.changeSlide(i,n,e)}),this.options.accessible&&this.$wrapper.add(this.$bullets).on("keydown.zf.orbit",function(e){l.a.handleKey(e,"Orbit",{next:function(){t.changeSlide(!0)},previous:function(){t.changeSlide(!1)},handled:function(){r()(e.target).is(t.$bullets)&&t.$bullets.filter(".is-active").focus()}})})}}},{key:"_reset",value:function(){"undefined"!=typeof this.$slides&&this.$slides.length>1&&(this.$element.off(".zf.orbit").find("*").off(".zf.orbit"),this.options.autoPlay&&this.timer.restart(),this.$slides.each(function(t){r()(t).removeClass("is-active is-active is-in").removeAttr("aria-live").hide()}),this.$slides.first().addClass("is-active").show(),this.$element.trigger("slidechange.zf.orbit",[this.$slides.first()]),this.options.bullets&&this._updateBullets(0))}},{key:"changeSlide",value:function(t,e,i){if(this.$slides){var n=this.$slides.filter(".is-active").eq(0);if(/mui/g.test(n[0].className))return!1;var s,o=this.$slides.first(),a=this.$slides.last(),r=t?"Right":"Left",l=t?"Left":"Right",c=this;s=e?e:t?this.options.infiniteWrap?n.next("."+this.options.slideClass).length?n.next("."+this.options.slideClass):o:n.next("."+this.options.slideClass):this.options.infiniteWrap?n.prev("."+this.options.slideClass).length?n.prev("."+this.options.slideClass):a:n.prev("."+this.options.slideClass),s.length&&(this.$element.trigger("beforeslidechange.zf.orbit",[n,s]),this.options.bullets&&(i=i||this.$slides.index(s),this._updateBullets(i)),this.options.useMUI&&!this.$element.is(":hidden")?(u.a.animateIn(s.addClass("is-active").css({position:"absolute",top:0}),this.options["animInFrom"+r],function(){s.css({position:"relative",display:"block"}).attr("aria-live","polite")}),u.a.animateOut(n.removeClass("is-active"),this.options["animOutTo"+l],function(){n.removeAttr("aria-live"),c.options.autoPlay&&!c.timer.isPaused&&c.timer.restart()})):(n.removeClass("is-active is-in").removeAttr("aria-live").hide(),s.addClass("is-active is-in").attr("aria-live","polite").show(),this.options.autoPlay&&!this.timer.isPaused&&this.timer.restart()),this.$element.trigger("slidechange.zf.orbit",[s]))}}},{key:"_updateBullets",value:function(t){var e=this.$element.find("."+this.options.boxOfBullets).find(".is-active").removeClass("is-active").blur(),i=e.find("span:last").detach();this.$bullets.eq(t).addClass("is-active").append(i)}},{key:"_destroy",value:function(){this.$element.off(".zf.orbit").find("*").off(".zf.orbit").end().hide()}}]),e}(f.a);g.defaults={bullets:!0,navButtons:!0,animInFromRight:"slide-in-right",animOutToRight:"slide-out-right",animInFromLeft:"slide-in-left",animOutToLeft:"slide-out-left",autoPlay:!0,timerDelay:5e3,infiniteWrap:!0,swipe:!0,pauseOnHover:!0,accessible:!0,containerClass:"orbit-container",slideClass:"orbit-slide",boxOfBullets:"orbit-bullets",nextClass:"orbit-next",prevClass:"orbit-previous",useMUI:!0}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return m});var a=i(0),r=i.n(a),l=i(4),u=i(1),c=i(2),h=i(10),d=i(14),f=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),p={tabs:{cssClass:"tabs",plugin:d.a},accordion:{cssClass:"accordion",plugin:h.a}},m=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),f(e,[{key:"_setup",value:function(t,e){this.$element=r()(t),this.options=r.a.extend({},this.$element.data(),e),this.rules=this.$element.data("responsive-accordion-tabs"),this.currentMq=null,this.currentPlugin=null,this.className="ResponsiveAccordionTabs",this.$element.attr("id")||this.$element.attr("id",i.i(u.a)(6,"responsiveaccordiontabs")),this._init(),this._events()}},{key:"_init",value:function(){if(l.a._init(),"string"==typeof this.rules){for(var t={},e=this.rules.split(" "),i=0;i<e.length;i++){var n=e[i].split("-"),s=n.length>1?n[0]:"small",o=n.length>1?n[1]:n[0];null!==p[o]&&(t[s]=p[o])}this.rules=t}this._getAllOptions(),r.a.isEmptyObject(this.rules)||this._checkMediaQueries()}},{key:"_getAllOptions",value:function(){var t=this;t.allOptions={};for(var e in p)if(p.hasOwnProperty(e)){var i=p[e];try{var n=r()("<ul></ul>"),s=new i.plugin(n,t.options);for(var o in s.options)if(s.options.hasOwnProperty(o)&&"zfPlugin"!==o){var a=s.options[o];t.allOptions[o]=a}s.destroy()}catch(t){}}}},{key:"_events",value:function(){var t=this;r()(window).on("changed.zf.mediaquery",function(){t._checkMediaQueries()})}},{key:"_checkMediaQueries",value:function(){var t,e=this;r.a.each(this.rules,function(e){l.a.atLeast(e)&&(t=e)}),t&&(this.currentPlugin instanceof this.rules[t].plugin||(r.a.each(p,function(t,i){e.$element.removeClass(i.cssClass)}),this.$element.addClass(this.rules[t].cssClass),this.currentPlugin&&(!this.currentPlugin.$element.data("zfPlugin")&&this.storezfData&&this.currentPlugin.$element.data("zfPlugin",this.storezfData),this.currentPlugin.destroy()),this._handleMarkup(this.rules[t].cssClass),this.currentPlugin=new this.rules[t].plugin(this.$element,{}),this.storezfData=this.currentPlugin.$element.data("zfPlugin")))}},{key:"_handleMarkup",value:function(t){var e=this,n="accordion",s=r()("[data-tabs-content="+this.$element.attr("id")+"]");if(s.length&&(n="tabs"),n!==t){var o=e.allOptions.linkClass?e.allOptions.linkClass:"tabs-title",a=e.allOptions.panelClass?e.allOptions.panelClass:"tabs-panel";this.$element.removeAttr("role");var l=this.$element.children("."+o+",[data-accordion-item]").removeClass(o).removeClass("accordion-item").removeAttr("data-accordion-item"),c=l.children("a").removeClass("accordion-title");if("tabs"===n?(s=s.children("."+a).removeClass(a).removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby"),s.children("a").removeAttr("role").removeAttr("aria-controls").removeAttr("aria-selected")):s=l.children("[data-tab-content]").removeClass("accordion-content"),s.css({display:"",visibility:""}),l.css({display:"",visibility:""}),"accordion"===t)s.each(function(t,i){r()(i).appendTo(l.get(t)).addClass("accordion-content").attr("data-tab-content","").removeClass("is-active").css({height:""}),r()("[data-tabs-content="+e.$element.attr("id")+"]").after('<div id="tabs-placeholder-'+e.$element.attr("id")+'"></div>').detach(),l.addClass("accordion-item").attr("data-accordion-item",""),c.addClass("accordion-title")});else if("tabs"===t){var h=r()("[data-tabs-content="+e.$element.attr("id")+"]"),d=r()("#tabs-placeholder-"+e.$element.attr("id"));d.length?(h=r()('<div class="tabs-content"></div>').insertAfter(d).attr("data-tabs-content",e.$element.attr("id")),d.remove()):h=r()('<div class="tabs-content"></div>').insertAfter(e.$element).attr("data-tabs-content",e.$element.attr("id")),s.each(function(t,e){var n=r()(e).appendTo(h).addClass(a),s=c.get(t).hash.slice(1),o=r()(e).attr("id")||i.i(u.a)(6,"accordion");s!==o&&(""!==s?r()(e).attr("id",s):(s=o,r()(e).attr("id",s),r()(c.get(t)).attr("href",r()(c.get(t)).attr("href").replace("#","")+"#"+s)));var d=r()(l.get(t)).hasClass("is-active");d&&n.addClass("is-active")}),l.addClass(o)}}}},{key:"_destroy",value:function(){this.currentPlugin&&this.currentPlugin.destroy(),r()(window).off(".zf.ResponsiveAccordionTabs")}}]),e}(c.a);m.defaults={}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return g});var a=i(0),r=i.n(a),l=i(4),u=i(1),c=i(2),h=i(13),d=i(12),f=i(11),p=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),m={dropdown:{cssClass:"dropdown",plugin:h.a},drilldown:{cssClass:"drilldown",plugin:d.a},accordion:{cssClass:"accordion-menu",plugin:f.a}},g=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),p(e,[{key:"_setup",value:function(t,e){this.$element=r()(t),this.rules=this.$element.data("responsive-menu"),this.currentMq=null,this.currentPlugin=null,this.className="ResponsiveMenu",this._init(),this._events()}},{key:"_init",value:function(){if(l.a._init(),"string"==typeof this.rules){for(var t={},e=this.rules.split(" "),n=0;n<e.length;n++){var s=e[n].split("-"),o=s.length>1?s[0]:"small",a=s.length>1?s[1]:s[0];null!==m[a]&&(t[o]=m[a])}this.rules=t}r.a.isEmptyObject(this.rules)||this._checkMediaQueries(),this.$element.attr("data-mutate",this.$element.attr("data-mutate")||i.i(u.a)(6,"responsive-menu"))}},{key:"_events",value:function(){var t=this;r()(window).on("changed.zf.mediaquery",function(){t._checkMediaQueries()})}},{key:"_checkMediaQueries",value:function(){var t,e=this;r.a.each(this.rules,function(e){l.a.atLeast(e)&&(t=e)}),t&&(this.currentPlugin instanceof this.rules[t].plugin||(r.a.each(m,function(t,i){e.$element.removeClass(i.cssClass)}),this.$element.addClass(this.rules[t].cssClass),this.currentPlugin&&this.currentPlugin.destroy(),this.currentPlugin=new this.rules[t].plugin(this.$element,{})))}},{key:"_destroy",value:function(){this.currentPlugin.destroy(),r()(window).off(".zf.ResponsiveMenu")}}]),e}(c.a);g.defaults={}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return d});var a=i(0),r=i.n(a),l=i(4),u=i(6),c=i(2),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){this.$element=r()(t),this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="ResponsiveToggle",this._init(),this._events()}},{key:"_init",value:function(){l.a._init();var t=this.$element.data("responsive-toggle");if(t||console.error("Your tab bar needs an ID of a Menu as the value of data-tab-bar."),this.$targetMenu=r()("#"+t),this.$toggler=this.$element.find("[data-toggle]").filter(function(){var e=r()(this).data("toggle");return e===t||""===e}),this.options=r.a.extend({},this.options,this.$targetMenu.data()),this.options.animate){var e=this.options.animate.split(" ");this.animationIn=e[0],this.animationOut=e[1]||null}this._update()}},{key:"_events",value:function(){this._updateMqHandler=this._update.bind(this),r()(window).on("changed.zf.mediaquery",this._updateMqHandler),this.$toggler.on("click.zf.responsiveToggle",this.toggleMenu.bind(this))}},{key:"_update",value:function(){l.a.atLeast(this.options.hideFor)?(this.$element.hide(),this.$targetMenu.show()):(this.$element.show(),this.$targetMenu.hide())}},{key:"toggleMenu",value:function(){var t=this;l.a.atLeast(this.options.hideFor)||(this.options.animate?this.$targetMenu.is(":hidden")?u.a.animateIn(this.$targetMenu,this.animationIn,function(){t.$element.trigger("toggled.zf.responsiveToggle"),t.$targetMenu.find("[data-mutate]").triggerHandler("mutateme.zf.trigger")}):u.a.animateOut(this.$targetMenu,this.animationOut,function(){t.$element.trigger("toggled.zf.responsiveToggle")}):(this.$targetMenu.toggle(0),this.$targetMenu.find("[data-mutate]").trigger("mutateme.zf.trigger"),this.$element.trigger("toggled.zf.responsiveToggle")))}},{key:"_destroy",value:function(){this.$element.off(".zf.responsiveToggle"),this.$toggler.off(".zf.responsiveToggle"),r()(window).off("changed.zf.mediaquery",this._updateMqHandler)}}]),e}(c.a);d.defaults={hideFor:"medium",animate:!1}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(){return/iP(ad|hone|od).*OS/.test(window.navigator.userAgent)}function r(){return/Android/.test(window.navigator.userAgent)}function l(){return a()||r()}i.d(e,"a",function(){return v});var u=i(0),c=i.n(u),h=i(3),d=i(4),f=i(6),p=i(2),m=i(5),g=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),v=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),g(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Reveal",this._init(),m.a.init(c.a),h.a.register("Reveal",{ESCAPE:"close"})}},{key:"_init",value:function(){d.a._init(),this.id=this.$element.attr("id"),this.isActive=!1,this.cached={mq:d.a.current},this.isMobile=l(),this.$anchor=c()('[data-open="'+this.id+'"]').length?c()('[data-open="'+this.id+'"]'):c()('[data-toggle="'+this.id+'"]'),this.$anchor.attr({"aria-controls":this.id,"aria-haspopup":!0,tabindex:0}),(this.options.fullScreen||this.$element.hasClass("full"))&&(this.options.fullScreen=!0,this.options.overlay=!1),this.options.overlay&&!this.$overlay&&(this.$overlay=this._makeOverlay(this.id)),this.$element.attr({role:"dialog","aria-hidden":!0,"data-yeti-box":this.id,"data-resize":this.id}),this.$overlay?this.$element.detach().appendTo(this.$overlay):(this.$element.detach().appendTo(c()(this.options.appendTo)),this.$element.addClass("without-overlay")),this._events(),this.options.deepLink&&window.location.hash==="#"+this.id&&c()(window).one("load.zf.reveal",this.open.bind(this))}},{key:"_makeOverlay",value:function(){var t="";return this.options.additionalOverlayClasses&&(t=" "+this.options.additionalOverlayClasses),c()("<div></div>").addClass("reveal-overlay"+t).appendTo(this.options.appendTo)}},{key:"_updatePosition",value:function(){var t,e,i=this.$element.outerWidth(),n=c()(window).width(),s=this.$element.outerHeight(),o=c()(window).height();t="auto"===this.options.hOffset?parseInt((n-i)/2,10):parseInt(this.options.hOffset,10),e="auto"===this.options.vOffset?s>o?parseInt(Math.min(100,o/10),10):parseInt((o-s)/4,10):parseInt(this.options.vOffset,10),this.$element.css({top:e+"px"}),this.$overlay&&"auto"===this.options.hOffset||(this.$element.css({left:t+"px"}),this.$element.css({margin:"0px"}))}},{key:"_events",value:function(){var t=this,e=this;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":function(i,n){if(i.target===e.$element[0]||c()(i.target).parents("[data-closable]")[0]===n)return t.close.apply(t)},"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":function(){e._updatePosition()}}),this.options.closeOnClick&&this.options.overlay&&this.$overlay.off(".zf.reveal").on("click.zf.reveal",function(t){t.target!==e.$element[0]&&!c.a.contains(e.$element[0],t.target)&&c.a.contains(document,t.target)&&e.close()}),this.options.deepLink&&c()(window).on("popstate.zf.reveal:"+this.id,this._handleState.bind(this))}},{key:"_handleState",value:function(t){window.location.hash!=="#"+this.id||this.isActive?this.close():this.open()}},{key:"open",value:function(){function t(){n.isMobile?(n.originalScrollPos||(n.originalScrollPos=window.pageYOffset),c()("html, body").addClass("is-reveal-open")):c()("body").addClass("is-reveal-open")}var e=this;if(this.options.deepLink){var i="#"+this.id;window.history.pushState?this.options.updateHistory?window.history.pushState({},"",i):window.history.replaceState({},"",i):window.location.hash=i}this.isActive=!0,this.$element.css({visibility:"hidden"}).show().scrollTop(0),this.options.overlay&&this.$overlay.css({visibility:"hidden"}).show(),this._updatePosition(),this.$element.hide().css({visibility:""}),this.$overlay&&(this.$overlay.css({visibility:""}).hide(),this.$element.hasClass("fast")?this.$overlay.addClass("fast"):this.$element.hasClass("slow")&&this.$overlay.addClass("slow")),this.options.multipleOpened||this.$element.trigger("closeme.zf.reveal",this.id);var n=this;this.options.animationIn?!function(){var i=function(){n.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),t(),h.a.trapFocus(n.$element)};e.options.overlay&&f.a.animateIn(e.$overlay,"fade-in"),f.a.animateIn(e.$element,e.options.animationIn,function(){e.$element&&(e.focusableElements=h.a.findFocusable(e.$element),i())})}():(this.options.overlay&&this.$overlay.show(0),this.$element.show(this.options.showDelay)),this.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),h.a.trapFocus(this.$element),t(),this._extraHandlers(),this.$element.trigger("open.zf.reveal")}},{key:"_extraHandlers",value:function(){var t=this;this.$element&&(this.focusableElements=h.a.findFocusable(this.$element),this.options.overlay||!this.options.closeOnClick||this.options.fullScreen||c()("body").on("click.zf.reveal",function(e){e.target!==t.$element[0]&&!c.a.contains(t.$element[0],e.target)&&c.a.contains(document,e.target)&&t.close()}),this.options.closeOnEsc&&c()(window).on("keydown.zf.reveal",function(e){h.a.handleKey(e,"Reveal",{close:function(){t.options.closeOnEsc&&t.close()}})}))}},{key:"close",value:function(){function t(){e.isMobile?(0===c()(".reveal:visible").length&&c()("html, body").removeClass("is-reveal-open"),e.originalScrollPos&&(c()("body").scrollTop(e.originalScrollPos),e.originalScrollPos=null)):0===c()(".reveal:visible").length&&c()("body").removeClass("is-reveal-open"),h.a.releaseFocus(e.$element),e.$element.attr("aria-hidden",!0),e.$element.trigger("closed.zf.reveal")}if(!this.isActive||!this.$element.is(":visible"))return!1;var e=this;this.options.animationOut?(this.options.overlay&&f.a.animateOut(this.$overlay,"fade-out"),f.a.animateOut(this.$element,this.options.animationOut,t)):(this.$element.hide(this.options.hideDelay),this.options.overlay?this.$overlay.hide(0,t):t()),this.options.closeOnEsc&&c()(window).off("keydown.zf.reveal"),!this.options.overlay&&this.options.closeOnClick&&c()("body").off("click.zf.reveal"),this.$element.off("keydown.zf.reveal"),this.options.resetOnClose&&this.$element.html(this.$element.html()),this.isActive=!1,e.options.deepLink&&(window.history.replaceState?window.history.replaceState("",document.title,window.location.href.replace("#"+this.id,"")):window.location.hash=""),this.$anchor.focus()}},{key:"toggle",value:function(){this.isActive?this.close():this.open()}},{key:"_destroy",value:function(){this.options.overlay&&(this.$element.appendTo(c()(this.options.appendTo)),this.$overlay.hide().off().remove()),this.$element.hide().off(),this.$anchor.off(".zf"),c()(window).off(".zf.reveal:"+this.id)}}]),e}(p.a);v.defaults={animationIn:"",animationOut:"",showDelay:0,hideDelay:0,closeOnClick:!0,closeOnEsc:!0,multipleOpened:!1,vOffset:"auto",hOffset:"auto",fullScreen:!1,btmOffsetPct:10,overlay:!0,resetOnClose:!1,deepLink:!1,updateHistory:!1,appendTo:"body",additionalOverlayClasses:""}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){return t/e}function r(t,e,i,n){return Math.abs(t.position()[e]+t[n]()/2-i)}function l(t,e){return Math.log(e)/Math.log(t)}i.d(e,"a",function(){return b});var u=i(0),c=i.n(u),h=i(3),d=i(6),f=i(1),p=i(2),m=i(16),g=i(5),v=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),b=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),v(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=c.a.extend({},e.defaults,this.$element.data(),i),this.className="Slider",m.a.init(c.a),g.a.init(c.a),this._init(),h.a.register("Slider",{ltr:{ARROW_RIGHT:"increase",ARROW_UP:"increase",ARROW_DOWN:"decrease",ARROW_LEFT:"decrease",SHIFT_ARROW_RIGHT:"increase_fast",SHIFT_ARROW_UP:"increase_fast",SHIFT_ARROW_DOWN:"decrease_fast",SHIFT_ARROW_LEFT:"decrease_fast",HOME:"min",END:"max"},rtl:{ARROW_LEFT:"increase",ARROW_RIGHT:"decrease",SHIFT_ARROW_LEFT:"increase_fast",SHIFT_ARROW_RIGHT:"decrease_fast"}})}},{key:"_init",value:function(){this.inputs=this.$element.find("input"),this.handles=this.$element.find("[data-slider-handle]"),this.$handle=this.handles.eq(0),this.$input=this.inputs.length?this.inputs.eq(0):c()("#"+this.$handle.attr("aria-controls")),this.$fill=this.$element.find("[data-slider-fill]").css(this.options.vertical?"height":"width",0);var t=!1;(this.options.disabled||this.$element.hasClass(this.options.disabledClass))&&(this.options.disabled=!0,this.$element.addClass(this.options.disabledClass)),this.inputs.length||(this.inputs=c()().add(this.$input),this.options.binding=!0),this._setInitAttr(0),this.handles[1]&&(this.options.doubleSided=!0,this.$handle2=this.handles.eq(1),this.$input2=this.inputs.length>1?this.inputs.eq(1):c()("#"+this.$handle2.attr("aria-controls")),this.inputs[1]||(this.inputs=this.inputs.add(this.$input2)),t=!0,this._setInitAttr(1)),this.setHandles(),this._events()}},{key:"setHandles",value:function(){var t=this;this.handles[1]?this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0,function(){t._setHandlePos(t.$handle2,t.inputs.eq(1).val(),!0)}):this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0)}},{key:"_reflow",value:function(){this.setHandles()}},{key:"_pctOfBar",value:function(t){var e=a(t-this.options.start,this.options.end-this.options.start);switch(this.options.positionValueFunction){case"pow":e=this._logTransform(e);break;case"log":e=this._powTransform(e)}return e.toFixed(2)}},{key:"_value",value:function(t){switch(this.options.positionValueFunction){case"pow":t=this._powTransform(t);break;case"log":t=this._logTransform(t)}var e=(this.options.end-this.options.start)*t+this.options.start;return e}},{key:"_logTransform",value:function(t){return l(this.options.nonLinearBase,t*(this.options.nonLinearBase-1)+1)}},{key:"_powTransform",value:function(t){return(Math.pow(this.options.nonLinearBase,t)-1)/(this.options.nonLinearBase-1)}},{key:"_setHandlePos",value:function(t,e,n,s){if(!this.$element.hasClass(this.options.disabledClass)){e=parseFloat(e),e<this.options.start?e=this.options.start:e>this.options.end&&(e=this.options.end);var o=this.options.doubleSided;if(o)if(0===this.handles.index(t)){var r=parseFloat(this.$handle2.attr("aria-valuenow"));e=e>=r?r-this.options.step:e}else{var l=parseFloat(this.$handle.attr("aria-valuenow"));e=e<=l?l+this.options.step:e}this.options.vertical&&!n&&(e=this.options.end-e);var u=this,c=this.options.vertical,h=c?"height":"width",f=c?"top":"left",p=t[0].getBoundingClientRect()[h],m=this.$element[0].getBoundingClientRect()[h],g=this._pctOfBar(e),v=(m-p)*g,b=(100*a(v,m)).toFixed(this.options.decimal);e=parseFloat(e.toFixed(this.options.decimal));var y={};if(this._setValues(t,e),o){var w,_=0===this.handles.index(t),$=~~(100*a(p,m));if(_)y[f]=b+"%",w=parseFloat(this.$handle2[0].style[f])-b+$,s&&"function"==typeof s&&s();else{var k=parseFloat(this.$handle[0].style[f]);w=b-(isNaN(k)?(this.options.initialStart-this.options.start)/((this.options.end-this.options.start)/100):k)+$}y["min-"+h]=w+"%"}this.$element.one("finished.zf.animate",function(){u.$element.trigger("moved.zf.slider",[t])});var C=this.$element.data("dragging")?1e3/60:this.options.moveTime;i.i(d.b)(C,t,function(){isNaN(b)?t.css(f,100*g+"%"):t.css(f,b+"%"),u.options.doubleSided?u.$fill.css(y):u.$fill.css(h,100*g+"%")}),clearTimeout(u.timeout),u.timeout=setTimeout(function(){u.$element.trigger("changed.zf.slider",[t])},u.options.changedDelay)}}},{key:"_setInitAttr",value:function(t){var e=0===t?this.options.initialStart:this.options.initialEnd,n=this.inputs.eq(t).attr("id")||i.i(f.a)(6,"slider");this.inputs.eq(t).attr({id:n,max:this.options.end,min:this.options.start,step:this.options.step}),this.inputs.eq(t).val(e),this.handles.eq(t).attr({role:"slider","aria-controls":n,"aria-valuemax":this.options.end,"aria-valuemin":this.options.start,"aria-valuenow":e,"aria-orientation":this.options.vertical?"vertical":"horizontal",tabindex:0})}},{key:"_setValues",value:function(t,e){var i=this.options.doubleSided?this.handles.index(t):0;this.inputs.eq(i).val(e),t.attr("aria-valuenow",e)}},{key:"_handleEvent",value:function(t,e,n){var s,o;if(n)s=this._adjustValue(null,n),o=!0;else{t.preventDefault();var l=this,u=this.options.vertical,h=u?"height":"width",d=u?"top":"left",p=u?t.pageY:t.pageX,m=(this.$handle[0].getBoundingClientRect()[h]/2,this.$element[0].getBoundingClientRect()[h]),g=u?c()(window).scrollTop():c()(window).scrollLeft(),v=this.$element.offset()[d];t.clientY===t.pageY&&(p+=g);var b,y=p-v;b=y<0?0:y>m?m:y;var w=a(b,m);if(s=this._value(w),i.i(f.b)()&&!this.options.vertical&&(s=this.options.end-s),s=l._adjustValue(null,s),o=!1,!e){var _=r(this.$handle,d,b,h),$=r(this.$handle2,d,b,h);e=_<=$?this.$handle:this.$handle2}}this._setHandlePos(e,s,o)}},{key:"_adjustValue",value:function(t,e){var i,n,s,o,a=this.options.step,r=parseFloat(a/2);return i=t?parseFloat(t.attr("aria-valuenow")):e,n=i%a,s=i-n,o=s+a,0===n?i:i=i>=s+r?o:s}},{key:"_events",value:function(){this._eventsForHandle(this.$handle),this.handles[1]&&this._eventsForHandle(this.$handle2)}},{key:"_eventsForHandle",value:function(t){var e,i=this;if(this.inputs.off("change.zf.slider").on("change.zf.slider",function(t){var e=i.inputs.index(c()(this));i._handleEvent(t,i.handles.eq(e),c()(this).val())}),this.options.clickSelect&&this.$element.off("click.zf.slider").on("click.zf.slider",function(t){return!i.$element.data("dragging")&&void(c()(t.target).is("[data-slider-handle]")||(i.options.doubleSided?i._handleEvent(t):i._handleEvent(t,i.$handle)))}),this.options.draggable){this.handles.addTouch();var n=c()("body");t.off("mousedown.zf.slider").on("mousedown.zf.slider",function(s){t.addClass("is-dragging"),i.$fill.addClass("is-dragging"),i.$element.data("dragging",!0),e=c()(s.currentTarget),n.on("mousemove.zf.slider",function(t){ t.preventDefault(),i._handleEvent(t,e)}).on("mouseup.zf.slider",function(s){i._handleEvent(s,e),t.removeClass("is-dragging"),i.$fill.removeClass("is-dragging"),i.$element.data("dragging",!1),n.off("mousemove.zf.slider mouseup.zf.slider")})}).on("selectstart.zf.slider touchmove.zf.slider",function(t){t.preventDefault()})}t.off("keydown.zf.slider").on("keydown.zf.slider",function(t){var e,n=c()(this),s=i.options.doubleSided?i.handles.index(n):0,o=parseFloat(i.inputs.eq(s).val());h.a.handleKey(t,"Slider",{decrease:function(){e=o-i.options.step},increase:function(){e=o+i.options.step},decrease_fast:function(){e=o-10*i.options.step},increase_fast:function(){e=o+10*i.options.step},min:function(){e=i.options.start},max:function(){e=i.options.end},handled:function(){t.preventDefault(),i._setHandlePos(n,e,!0)}})})}},{key:"_destroy",value:function(){this.handles.off(".zf.slider"),this.inputs.off(".zf.slider"),this.$element.off(".zf.slider"),clearTimeout(this.timeout)}}]),e}(p.a);b.defaults={start:0,end:100,step:1,initialStart:0,initialEnd:100,binding:!1,clickSelect:!0,vertical:!1,draggable:!0,disabled:!1,doubleSided:!1,decimal:2,moveTime:200,disabledClass:"disabled",invertVertical:!1,changedDelay:500,nonLinearBase:5,positionValueFunction:"linear"}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return parseInt(window.getComputedStyle(document.body,null).fontSize,10)*t}i.d(e,"a",function(){return p});var r=i(0),l=i.n(r),u=i(1),c=i(4),h=i(2),d=i(5),f=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),p=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),f(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=l.a.extend({},e.defaults,this.$element.data(),i),this.className="Sticky",d.a.init(l.a),this._init()}},{key:"_init",value:function(){c.a._init();var t=this.$element.parent("[data-sticky-container]"),e=this.$element[0].id||i.i(u.a)(6,"sticky"),n=this;t.length?this.$container=t:(this.wasWrapped=!0,this.$element.wrap(this.options.container),this.$container=this.$element.parent()),this.$container.addClass(this.options.containerClass),this.$element.addClass(this.options.stickyClass).attr({"data-resize":e,"data-mutate":e}),""!==this.options.anchor&&l()("#"+n.options.anchor).attr({"data-mutate":e}),this.scrollCount=this.options.checkEvery,this.isStuck=!1,l()(window).one("load.zf.sticky",function(){n.containerHeight="none"==n.$element.css("display")?0:n.$element[0].getBoundingClientRect().height,n.$container.css("height",n.containerHeight),n.elemHeight=n.containerHeight,""!==n.options.anchor?n.$anchor=l()("#"+n.options.anchor):n._parsePoints(),n._setSizes(function(){var t=window.pageYOffset;n._calc(!1,t),n.isStuck||n._removeSticky(!(t>=n.topPoint))}),n._events(e.split("-").reverse().join("-"))})}},{key:"_parsePoints",value:function(){for(var t=""==this.options.topAnchor?1:this.options.topAnchor,e=""==this.options.btmAnchor?document.documentElement.scrollHeight:this.options.btmAnchor,i=[t,e],n={},s=0,o=i.length;s<o&&i[s];s++){var a;if("number"==typeof i[s])a=i[s];else{var r=i[s].split(":"),u=l()("#"+r[0]);a=u.offset().top,r[1]&&"bottom"===r[1].toLowerCase()&&(a+=u[0].getBoundingClientRect().height)}n[s]=a}this.points=n}},{key:"_events",value:function(t){var e=this,i=this.scrollListener="scroll.zf."+t;this.isOn||(this.canStick&&(this.isOn=!0,l()(window).off(i).on(i,function(t){0===e.scrollCount?(e.scrollCount=e.options.checkEvery,e._setSizes(function(){e._calc(!1,window.pageYOffset)})):(e.scrollCount--,e._calc(!1,window.pageYOffset))})),this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",function(i,n){e._eventsHandler(t)}),this.$element.on("mutateme.zf.trigger",function(i,n){e._eventsHandler(t)}),this.$anchor&&this.$anchor.on("mutateme.zf.trigger",function(i,n){e._eventsHandler(t)}))}},{key:"_eventsHandler",value:function(t){var e=this,i=this.scrollListener="scroll.zf."+t;e._setSizes(function(){e._calc(!1),e.canStick?e.isOn||e._events(t):e.isOn&&e._pauseListeners(i)})}},{key:"_pauseListeners",value:function(t){this.isOn=!1,l()(window).off(t),this.$element.trigger("pause.zf.sticky")}},{key:"_calc",value:function(t,e){return t&&this._setSizes(),this.canStick?(e||(e=window.pageYOffset),void(e>=this.topPoint?e<=this.bottomPoint?this.isStuck||this._setSticky():this.isStuck&&this._removeSticky(!1):this.isStuck&&this._removeSticky(!0))):(this.isStuck&&this._removeSticky(!0),!1)}},{key:"_setSticky",value:function(){var t=this,e=this.options.stickTo,i="top"===e?"marginTop":"marginBottom",n="top"===e?"bottom":"top",s={};s[i]=this.options[i]+"em",s[e]=0,s[n]="auto",this.isStuck=!0,this.$element.removeClass("is-anchored is-at-"+n).addClass("is-stuck is-at-"+e).css(s).trigger("sticky.zf.stuckto:"+e),this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){t._setSizes()})}},{key:"_removeSticky",value:function(t){var e=this.options.stickTo,i="top"===e,n={},s=(this.points?this.points[1]-this.points[0]:this.anchorHeight)-this.elemHeight,o=i?"marginTop":"marginBottom",a=t?"top":"bottom";n[o]=0,n.bottom="auto",t?n.top=0:n.top=s,this.isStuck=!1,this.$element.removeClass("is-stuck is-at-"+e).addClass("is-anchored is-at-"+a).css(n).trigger("sticky.zf.unstuckfrom:"+a)}},{key:"_setSizes",value:function(t){this.canStick=c.a.is(this.options.stickyOn),this.canStick||t&&"function"==typeof t&&t();var e=this.$container[0].getBoundingClientRect().width,i=window.getComputedStyle(this.$container[0]),n=parseInt(i["padding-left"],10),s=parseInt(i["padding-right"],10);this.$anchor&&this.$anchor.length?this.anchorHeight=this.$anchor[0].getBoundingClientRect().height:this._parsePoints(),this.$element.css({"max-width":e-n-s+"px"});var o=this.$element[0].getBoundingClientRect().height||this.containerHeight;if("none"==this.$element.css("display")&&(o=0),this.containerHeight=o,this.$container.css({height:o}),this.elemHeight=o,!this.isStuck&&this.$element.hasClass("is-at-bottom")){var a=(this.points?this.points[1]-this.$container.offset().top:this.anchorHeight)-this.elemHeight;this.$element.css("top",a)}this._setBreakPoints(o,function(){t&&"function"==typeof t&&t()})}},{key:"_setBreakPoints",value:function(t,e){if(!this.canStick){if(!e||"function"!=typeof e)return!1;e()}var i=a(this.options.marginTop),n=a(this.options.marginBottom),s=this.points?this.points[0]:this.$anchor.offset().top,o=this.points?this.points[1]:s+this.anchorHeight,r=window.innerHeight;"top"===this.options.stickTo?(s-=i,o-=t+i):"bottom"===this.options.stickTo&&(s-=r-(t+n),o-=r-n),this.topPoint=s,this.bottomPoint=o,e&&"function"==typeof e&&e()}},{key:"_destroy",value:function(){this._removeSticky(!0),this.$element.removeClass(this.options.stickyClass+" is-anchored is-at-top").css({height:"",top:"",bottom:"","max-width":""}).off("resizeme.zf.trigger").off("mutateme.zf.trigger"),this.$anchor&&this.$anchor.length&&this.$anchor.off("change.zf.sticky"),l()(window).off(this.scrollListener),this.wasWrapped?this.$element.unwrap():this.$container.removeClass(this.options.containerClass).css({height:""})}}]),e}(h.a);p.defaults={container:"<div data-sticky-container></div>",stickTo:"top",anchor:"",topAnchor:"",btmAnchor:"",marginTop:1,marginBottom:1,stickyOn:"medium",stickyClass:"sticky",containerClass:"sticky-container",checkEvery:-1}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return d});var a=i(0),r=i.n(a),l=i(6),u=i(2),c=i(5),h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),h(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,t.data(),i),this.className="",this.className="Toggler",c.a.init(r.a),this._init(),this._events()}},{key:"_init",value:function(){var t;this.options.animate?(t=this.options.animate.split(" "),this.animationIn=t[0],this.animationOut=t[1]||null):(t=this.$element.data("toggler"),this.className="."===t[0]?t.slice(1):t);var e=this.$element[0].id;r()('[data-open="'+e+'"], [data-close="'+e+'"], [data-toggle="'+e+'"]').attr("aria-controls",e),this.$element.attr("aria-expanded",!this.$element.is(":hidden"))}},{key:"_events",value:function(){this.$element.off("toggle.zf.trigger").on("toggle.zf.trigger",this.toggle.bind(this))}},{key:"toggle",value:function(){this[this.options.animate?"_toggleAnimate":"_toggleClass"]()}},{key:"_toggleClass",value:function(){this.$element.toggleClass(this.className);var t=this.$element.hasClass(this.className);t?this.$element.trigger("on.zf.toggler"):this.$element.trigger("off.zf.toggler"),this._updateARIA(t),this.$element.find("[data-mutate]").trigger("mutateme.zf.trigger")}},{key:"_toggleAnimate",value:function(){var t=this;this.$element.is(":hidden")?l.a.animateIn(this.$element,this.animationIn,function(){t._updateARIA(!0),this.trigger("on.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")}):l.a.animateOut(this.$element,this.animationOut,function(){t._updateARIA(!1),this.trigger("off.zf.toggler"),this.find("[data-mutate]").trigger("mutateme.zf.trigger")})}},{key:"_updateARIA",value:function(t){this.$element.attr("aria-expanded",!!t)}},{key:"_destroy",value:function(){this.$element.off(".zf.toggler")}}]),e}(u.a);d.defaults={animate:!1}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return p});var a=i(0),r=i.n(a),l=i(1),u=i(4),c=i(5),h=i(15),d=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),f=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;if(void 0!==a)return a.call(n)},p=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),d(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="Tooltip",this.isActive=!1,this.isClick=!1,c.a.init(r.a),this._init()}},{key:"_init",value:function(){u.a._init();var t=this.$element.attr("aria-describedby")||i.i(l.a)(6,"tooltip");this.options.tipText=this.options.tipText||this.$element.attr("title"),this.template=this.options.template?r()(this.options.template):this._buildTemplate(t),this.options.allowHtml?this.template.appendTo(document.body).html(this.options.tipText).hide():this.template.appendTo(document.body).text(this.options.tipText).hide(),this.$element.attr({title:"","aria-describedby":t,"data-yeti-box":t,"data-toggle":t,"data-resize":t}).addClass(this.options.triggerClass),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_init",this).call(this),this._events()}},{key:"_getDefaultPosition",value:function(){var t=this.$element[0].className.match(/\b(top|left|right|bottom)\b/g);return t?t[0]:"top"}},{key:"_getDefaultAlignment",value:function(){return"center"}},{key:"_getHOffset",value:function(){return"left"===this.position||"right"===this.position?this.options.hOffset+this.options.tooltipWidth:this.options.hOffset}},{key:"_getVOffset",value:function(){return"top"===this.position||"bottom"===this.position?this.options.vOffset+this.options.tooltipHeight:this.options.vOffset}},{key:"_buildTemplate",value:function(t){var e=(this.options.tooltipClass+" "+this.options.positionClass+" "+this.options.templateClasses).trim(),i=r()("<div></div>").addClass(e).attr({role:"tooltip","aria-hidden":!0,"data-is-active":!1,"data-is-focus":!1,id:t});return i}},{key:"_setPosition",value:function(){f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setPosition",this).call(this,this.$element,this.template)}},{key:"show",value:function(){if("all"!==this.options.showOn&&!u.a.is(this.options.showOn))return!1;var t=this;this.template.css("visibility","hidden").show(),this._setPosition(),this.template.removeClass("top bottom left right").addClass(this.position),this.template.removeClass("align-top align-bottom align-left align-right align-center").addClass("align-"+this.alignment),this.$element.trigger("closeme.zf.tooltip",this.template.attr("id")),this.template.attr({"data-is-active":!0,"aria-hidden":!1}),t.isActive=!0,this.template.stop().hide().css("visibility","").fadeIn(this.options.fadeInDuration,function(){}),this.$element.trigger("show.zf.tooltip")}},{key:"hide",value:function(){var t=this;this.template.stop().attr({"aria-hidden":!0,"data-is-active":!1}).fadeOut(this.options.fadeOutDuration,function(){t.isActive=!1,t.isClick=!1}),this.$element.trigger("hide.zf.tooltip")}},{key:"_events",value:function(){var t=this,e=(this.template,!1);this.options.disableHover||this.$element.on("mouseenter.zf.tooltip",function(e){t.isActive||(t.timeout=setTimeout(function(){t.show()},t.options.hoverDelay))}).on("mouseleave.zf.tooltip",function(i){clearTimeout(t.timeout),(!e||t.isClick&&!t.options.clickOpen)&&t.hide()}),this.options.clickOpen?this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick||(t.isClick=!0,!t.options.disableHover&&t.$element.attr("tabindex")||t.isActive||t.show())}):this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick=!0}),this.options.disableForTouch||this.$element.on("tap.zf.tooltip touchend.zf.tooltip",function(e){t.isActive?t.hide():t.show()}),this.$element.on({"close.zf.trigger":this.hide.bind(this)}),this.$element.on("focus.zf.tooltip",function(i){return e=!0,t.isClick?(t.options.clickOpen||(e=!1),!1):void t.show()}).on("focusout.zf.tooltip",function(i){e=!1,t.isClick=!1,t.hide()}).on("resizeme.zf.trigger",function(){t.isActive&&t._setPosition()})}},{key:"toggle",value:function(){this.isActive?this.hide():this.show()}},{key:"_destroy",value:function(){this.$element.attr("title",this.template.text()).off(".zf.trigger .zf.tooltip").removeClass("has-tip top right left").removeAttr("aria-describedby aria-haspopup data-disable-hover data-resize data-toggle data-tooltip data-yeti-box"),this.template.remove()}}]),e}(h.a);p.defaults={disableForTouch:!1,hoverDelay:200,fadeInDuration:150,fadeOutDuration:150,disableHover:!1,templateClasses:"",tooltipClass:"tooltip",triggerClass:"has-tip",showOn:"small",template:"",tipText:"",touchCloseText:"Tap to close.",clickOpen:!0,positionClass:"",position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!1,vOffset:0,hOffset:0,tooltipHeight:14,tooltipWidth:12,allowHtml:!1}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.d(e,"a",function(){return h});var a=i(0),r=i.n(a),l=i(1),u=i(2),c=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),h=function(t){function e(){return n(this,e),s(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),c(e,[{key:"_setup",value:function(t,i){this.$element=t,this.options=r.a.extend({},e.defaults,this.$element.data(),i),this.className="SmoothScroll",this._init()}},{key:"_init",value:function(){var t=this.$element[0].id||i.i(l.a)(6,"smooth-scroll");this.$element.attr({id:t}),this._events()}},{key:"_events",value:function(){var t=this,i=function(i){if(!r()(this).is('a[href^="#"]'))return!1;var n=this.getAttribute("href");t._inTransition=!0,e.scrollToLoc(n,t.options,function(){t._inTransition=!1}),i.preventDefault()};this.$element.on("click.zf.smoothScroll",i),this.$element.on("click.zf.smoothScroll",'a[href^="#"]',i)}}],[{key:"scrollToLoc",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaults,n=arguments[2];if(!r()(t).length)return!1;var s=Math.round(r()(t).offset().top-i.threshold/2-i.offset);r()("html, body").stop(!0).animate({scrollTop:s},i.animationDuration,i.animationEasing,function(){n&&"function"==typeof n&&n()})}}]),e}(u.a);h.defaults={animationDuration:500,animationEasing:"linear",threshold:50,offset:0}},function(t,e,i){"use strict";function n(t,e,i){var n,s,o=this,a=e.duration,r=Object.keys(t.data())[0]||"timer",l=-1;this.isPaused=!1,this.restart=function(){l=-1,clearTimeout(s),this.start()},this.start=function(){this.isPaused=!1,clearTimeout(s),l=l<=0?a:l,t.data("paused",!1),n=Date.now(),s=setTimeout(function(){e.infinite&&o.restart(),i&&"function"==typeof i&&i()},l),t.trigger("timerstart.zf."+r)},this.pause=function(){this.isPaused=!0,clearTimeout(s),t.data("paused",!0);var e=Date.now();l-=e-n,t.trigger("timerpaused.zf."+r)}}i.d(e,"a",function(){return n});var s=i(0);i.n(s)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=i.n(n),o=i(18),a=i(17),r=i(10),l=i(11),u=i(12),c=i(19),h=i(13),d=i(20),f=i(21),p=i(22),m=i(23),g=i(24),v=i(26),b=i(27),y=i(28),w=i(29),_=i(30),$=i(14),k=i(31),C=i(32),z=i(25);o.a.addToJQuery(s.a),o.a.plugin(a.a,"Abide"),o.a.plugin(r.a,"Accordion"),o.a.plugin(l.a,"AccordionMenu"),o.a.plugin(u.a,"Drilldown"),o.a.plugin(c.a,"Dropdown"),o.a.plugin(h.a,"DropdownMenu"),o.a.plugin(d.a,"Equalizer"),o.a.plugin(f.a,"Interchange"),o.a.plugin(p.a,"Magellan"),o.a.plugin(m.a,"OffCanvas"),o.a.plugin(g.a,"Orbit"),o.a.plugin(v.a,"ResponsiveMenu"),o.a.plugin(b.a,"ResponsiveToggle"),o.a.plugin(y.a,"Reveal"),o.a.plugin(w.a,"Slider"),o.a.plugin(_.a,"Sticky"),o.a.plugin($.a,"Tabs"),o.a.plugin(k.a,"Toggler"),o.a.plugin(C.a,"Tooltip"),o.a.plugin(z.a,"ResponsiveAccordionTabs")}]);
import jwt from "jsonwebtoken"; import bcrypt from "bcryptjs"; import { parseErrors, makeUrl } from "../../shared/util"; import { requiresAdmin } from "../utils/permissions"; import SendMail from "../utils/mail"; import { getEmailBody } from "../utils/common"; export default { Query: { author: (root, args, { models }) => models.Author.findOne({ where: args }), authors: (root, args, { models }) => models.Author.findAll({ where: args }), me: (req, args, { user, models }) => models.Author.findOne({ where: { id: user.id } }) }, Mutation: { login: async ( root, { email, password, remember }, { SECRET, models } ) => { const author = await models.Author.findOne({ where: { email } }); if (!author) { return { ok: false, token: "", errors: [ { path: "Login", message: "We couldnt find this email." } ] }; } const valid = await bcrypt.compare(password, author.password); if (!valid) { return { ok: false, token: "", errors: [ { path: "Login", message: "We couldn't authenticate your credentials" } ] }; } let role = await models.Role.findOne({ where: { id: author.role_id } }); const perms = await role.getPermissions(); const permissionNames = perms.map(perm => perm.name); //test const expiresIn = remember ? "30d" : "1d"; const token = jwt.sign( { email, id: author.id, role: role.name, permissions: permissionNames, name: author.fname, expiresIn }, SECRET, { expiresIn } ); return { ok: true, token, errors: [] }; }, register: async (root, args, { models }) => { const author = { ...args }; try { const user = await models.Author.findOne({ attributes: ["email"], where: { email: author.email } }); if (user) { throw new Error("Email already exist"); } author.password = await bcrypt.hash(author.password, 12); author.role_id = 1; const res = models.Author.create(author); return { ok: true, data: res, errors: [] }; } catch (e) { return { ok: false, data: null, errors: [{ message: e.message, path: "Register" }] }; } }, updateAuthor: requiresAdmin.createResolver( async (root, args, { models }) => { try { const newArgs = { ...args }; if (args.password) { newArgs.password = await bcrypt.hash(args.password, 12); } await models.Author.update(newArgs, { where: { id: newArgs.id } }); return { ok: true, errors: [] }; } catch (e) { return { ok: false, errors: parseErrors(e) }; } } ), createAuthor: requiresAdmin.createResolver( async (root, args, { models }) => { try { const newArgs = { ...args }; const author = await models.Author.findOne({ where: { email: newArgs.email } }); if (author) { return { ok: false, errors: [ { message: "Email already exist", path: "createAuthor" } ] }; } const randomPassword = Math.random() .toString(36) .substr(2); newArgs.password = await bcrypt.hash(randomPassword, 12); await models.Author.create(newArgs, { where: { id: newArgs.id } }); const role = await models.Role.findOne({ where: { id: newArgs.role_id } }); const variables = { name: newArgs.fname, email: newArgs.email, password: randomPassword, rolename: role.name }; const body = await getEmailBody( "register", variables, models ); const success = await SendMail({ to: newArgs.email, subject: "Account Created", body }); return { ok: true, errors: [] }; } catch (e) { return { ok: false, errors: parseErrors(e) }; } } ), forgotPassword: async (root, args, { models }) => { try { const email = args.email; const token = Math.random() .toString(36) .substr(2); const author = await models.Author.findOne({ where: { email } }); if (!author) { throw new Error("Email does not exist"); } await models.Author.update( { token }, { where: { id: author.id } } ); const link = makeUrl(["/admin/reset-password", token]); const role = await models.Role.findOne({ where: { id: author.role_id } }); const variables = { name: author.fname, email: args.email, link }; const body = await getEmailBody( "password_reset", variables, models ); const success = await SendMail({ to: email, subject: "Password Reset", body }); return { ok: true, msg: "Check your email to recover your password" }; } catch (e) { return { ok: false, msg: "Something unexpected happened" }; } }, resetPassword: async (root, args, { models }) => { try { const token = args.token; const password = await bcrypt.hash(args.password, 12); const author = await models.Author.findOne({ where: { token } }); if (!author) { throw new Error("Invalid token for changing password"); } await models.Author.update( { token: "", password }, { where: { id: author.id } } ); return { ok: true, msg: "Password changed successfully" }; } catch (e) { return { ok: false, msg: e.message }; } } }, Author: { role: author => author.getRole() } };
const DrawCard = require('../../drawcard.js'); class UtakuYumino extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Discard a card for +2/+2', condition: () => this.game.isDuringConflict(), cost: ability.costs.discardCard(card => card.location === 'hand'), effect: 'give {0} +2/+2', gameAction: ability.actions.cardLastingEffect({ effect: ability.effects.modifyBothSkills(2) }), limit: ability.limit.perConflict(1) }); } } UtakuYumino.id = 'utaku-yumino'; module.exports = UtakuYumino;
/** * Description: Get length of string and buffer string. */ /** Import generics dependences */ import 'pretty-console-colors'; // Get length string const and lenght byte of Buffer and compare. const str = 'Hi from NodeJS'; const str1 = Buffer.from(str); const str2 = Buffer.byteLength(str); console.log(`str: ${str}, str length: ${str.length}, str1 lenght: ${str1.length}, str2 byteLength: ${str2}`);
import { resolveMap } from '../resolve-map'; import getSelectionSet from './get-selection-set'; import db from '../db'; import config from '../config/config'; export default function getConnectionResolver(type) { const typeData = resolveMap[type]; if (!typeData) { throw new Error('Type "' + type + '" not a recognized type'); } return function resolveConnection(parent, args, ast) { const parentTypeData = resolveMap[ast.parentType.name]; const listRefField = parentTypeData.listReferences[ast.fieldName]; const parentPk = parentTypeData.aliases[parentTypeData.primaryKey] || parentTypeData.primaryKey; const edgeSelection = ast.fieldASTs[0].selectionSet.selections.reduce(edgeReducer, null); const selection = getSelectionSet(type, edgeSelection, typeData.aliases, typeData.referenceMap); const clauses = { [listRefField]: parent[parentPk] }; const {before, after, first, last} = args; let offset = 0, limit = config.edgeSize || 25; if (before && after) { throw new Error('Combining `before` and `after` is not supported'); } if (after) { offset = getOffset(after) || 0; limit = parseInt(first || config.edgeSize || 25, 10); } else if (before) { limit = parseInt(last || config.edgeSize || 25, 10); offset = Math.max(0, (getOffset(before) || 0) - limit); } const query = db() .select(selection) .from(typeData.table) .where(clauses) .offset(offset) .limit(limit + 1); if (config.debug) { console.log(query.toSQL()); } return query.then(function(result) { let hasNextPage = result.length > limit; if (hasNextPage) { result.pop(); } if (result.length === 0) { return emptyConnection(); } let startIndex = after ? offset + 1 : offset; let edges = result.map( (value, index) => ({ cursor: offsetToCursor(startIndex + index), node: value }) ); if (first) { edges = edges.slice(0, first); } if (last) { edges = edges.slice(-last); } if (edges.length === 0) { return emptyConnection(); } return { edges: edges, pageInfo: { startCursor: edges[0].cursor, endCursor: edges[edges.length - 1].cursor, hasPreviousPage: cursorToOffset(edges[0].cursor) > 0, hasNextPage: hasNextPage } }; }); }; } var PREFIX = 'Connection:'; function offsetToCursor(offset) { return new Buffer(PREFIX + offset).toString('base64'); } function cursorToOffset(cursor) { return parseInt(new Buffer(cursor, 'base64').toString('ascii').substring(PREFIX.length), 10); } // Given an optional cursor and a default offset, returns the offset // to use; if the cursor contains a valid offset, that will be used, // otherwise it will be the default. function getOffset(cursor, defaultOffset) { if (typeof cursor === 'undefined' || cursor === null) { return defaultOffset; } let offset = cursorToOffset(cursor); if (isNaN(offset)) { return defaultOffset; } return offset; } function emptyConnection() { return { edges: [], pageInfo: { startCursor: null, endCursor: null, hasPreviousPage: false, hasNextPage: false } }; } function edgeReducer(edges, selection) { if (selection.name.value !== 'edges') { return edges; } return selection.selectionSet.selections.reduce(nodeReducer); } function nodeReducer(node, selection) { if (selection.name.value !== 'node') { return node; } return selection; }
import {exec} from 'child_process' import fs from 'fs' import path from 'path' import chalk from 'chalk' import copyTemplateDir from 'copy-template-dir' import inquirer from 'inquirer' import ora from 'ora' import runSeries from 'run-series' import { CONFIG_FILE_NAME, PROJECT_TYPES, REACT_COMPONENT, WEB_MODULE, } from './constants' import {UserError} from './errors' import pkg from '../package.json' import {directoryExists, install, toSource, typeOf} from './utils' // TODO Change if >= 1.0.0 ever happens const NWB_VERSION = pkg.version.split('.').slice(0, 2).concat('x').join('.') /** * Copy a project template and log created files if successful. */ function copyTemplate(templateDir, targetDir, templateVars, cb) { copyTemplateDir(templateDir, targetDir, templateVars, (err, createdFiles) => { if (err) return cb(err) createdFiles.sort().forEach(createdFile => { let relativePath = path.relative(targetDir, createdFile) console.log(` ${chalk.green('create')} ${relativePath}`) }) cb() }) } /** * Prompt the user for preferences related to publishing a module to npm, unless * they've asked us not to or have already provided all the possible options via * arguments. */ export function getNpmModulePrefs(args, cb) { // An ES modules build is enabled by default, but can be disabled with // --no-es-modules or --es-modules=false (or a bunch of other undocumented // stuff) let esModules = args['es-modules'] !== false && !/^(0|false|no|nope|off)$/.test(args['es-modules']) // Pass a UMD global variable name with --umd=MyThing, or pass --no-umd to // indicate you don't want a UMD build. let umd = typeOf(args.umd) === 'string' ? args.umd : false // Don't ask questions if the user doesn't want them, or already told us all // the answers. if ((args.f || args.force) || ('umd' in args && 'es-modules' in args)) { return process.nextTick(cb, null, {umd, esModules}) } inquirer.prompt([ { when: () => !('es-modules' in args), type: 'confirm', name: 'esModules', message: 'Do you want to create an ES modules build for use by compatible bundlers?', default: esModules, }, { when: () => !('umd' in args), type: 'confirm', name: 'createUMD', message: 'Do you want to create a UMD build for global usage via <script> tag?', default: umd, }, { when: ({createUMD}) => createUMD, type: 'input', name: 'umd', message: 'Which global variable should the UMD build set?', validate(input) { return input.trim() ? true : 'Required to create a UMD build' }, default: umd || '', }, ]).then(answers => cb(null, answers), err => cb(err)) } /** * Initialise a Git repository if the user has Git, unless there's already one * present or the user has asked us could we not. */ function initGit(args, cwd, cb) { // Allow git init to be disabled with a --no-git flag if (args.git === false) { return process.nextTick(cb) } // Bail if a git repo already exists (e.g. nwb init in an existing repo) if (directoryExists(path.join(cwd, '.git'))) { return process.nextTick(cb) } exec('git --version', {cwd, stdio: 'ignore'}, (err) => { if (err) return cb() let spinner = ora('Initing Git repo').start() runSeries([ (cb) => exec('git init', {cwd}, cb), (cb) => exec('git add .', {cwd}, cb), (cb) => exec(`git commit -m "Initial commit from nwb v${pkg.version}"`, {cwd}, cb), ], (err) => { if (err) { spinner.fail() console.log(chalk.red(err.message)) return cb() } spinner.succeed() cb() }) }) } /** * Validate a user-supplied project type. */ export function validateProjectType(projectType) { if (!projectType) { throw new UserError(`A project type must be provided, one of: ${Array.from(PROJECT_TYPES).join(', ')}`) } if (!PROJECT_TYPES.has(projectType)) { throw new UserError(`Project type must be one of: ${Array.from(PROJECT_TYPES).join(', ')}`) } } /** * Write an nwb config file. */ function writeConfigFile(dir, config, cb) { fs.writeFile( path.join(dir, CONFIG_FILE_NAME), `module.exports = ${toSource(config)}\n`, cb ) } const MODULE_PROJECT_CONFIG = { [REACT_COMPONENT]: { devDependencies: ['react', 'react-dom'], externals: {react: 'React'}, }, [WEB_MODULE]: {}, } /** * Create an app project skeleton. */ function createAppProject(args, projectType, name, targetDir, cb) { let appType = projectType.split('-')[0] let projectConfig = require(`./${appType}`)(args) let dependencies = null let tasks = [ (cb) => { let templateDir = path.join(__dirname, `../templates/${projectType}`) let templateVars = {name, nwbVersion: NWB_VERSION} copyTemplate(templateDir, targetDir, templateVars, cb) }, (cb) => { // Allow specification of the exact version, e.g. --react=17.0.2 if (dependencies.length !== 0 && args[appType]) { dependencies = dependencies.map(pkg => `${pkg}@${args[appType]}`) } install(dependencies, {cwd: targetDir, save: true}, cb) }, (cb) => initGit(args, targetDir, cb), ] let questions = projectConfig.getProjectQuestions() if (questions) { // Don't ask questions if the user doesn't want them if (args.f || args.force) { dependencies = projectConfig.getProjectDependencies( projectConfig.getProjectDefaults() ) } else { tasks.unshift((cb) => { inquirer.prompt(questions).then( (answers) => { dependencies = projectConfig.getProjectDependencies(answers) cb(null) }, (err) => cb(err) ) }) } } else { dependencies = projectConfig.getProjectDependencies() } runSeries(tasks, cb) } /** * Create an npm module project skeleton. */ function createModuleProject(args, projectType, name, targetDir, cb) { let {devDependencies = [], externals = {}} = MODULE_PROJECT_CONFIG[projectType] getNpmModulePrefs(args, (err, prefs) => { if (err) return cb(err) let {umd, esModules} = prefs let templateDir = path.join(__dirname, `../templates/${projectType}`) let templateVars = { name, esModules, esModulesPackageConfig: esModules ? '\n "module": "es/index.js",' : '', nwbVersion: NWB_VERSION, } let nwbConfig = { type: projectType, npm: { esModules, umd: umd ? {global: umd, externals} : false } } // CBA making this part generic until it's needed if (projectType === REACT_COMPONENT) { if (args.react) { devDependencies = devDependencies.map(pkg => `${pkg}@${args.react}`) templateVars.reactPeerVersion = `^${args.react}` // YOLO } else { // TODO Get from npm so we don't have to manually update on major releases templateVars.reactPeerVersion = '17.x' } } runSeries([ (cb) => copyTemplate(templateDir, targetDir, templateVars, cb), (cb) => writeConfigFile(targetDir, nwbConfig, cb), (cb) => install(devDependencies, {cwd: targetDir, save: true, dev: true}, cb), (cb) => initGit(args, targetDir, cb), ], cb) }) } export default function createProject(args, projectType, name, dir, cb) { if (/-app$/.test(projectType)) { return createAppProject(args, projectType, name, dir, cb) } else { createModuleProject(args, projectType, name, dir, cb) } }
exports.definition = { config : { "adapter" : { "type" : "acs", "collection_name" : "photos" } }, extendModel : function(Model) { _.extend(Model.prototype, { // extended functions go here }); // end extend return Model; }, extendCollection : function(Collection) { _.extend(Collection.prototype, { // extended functions go here }); // end extend return Collection; }, }; function Sync(method, model, options) { var object_name = model.config.adapter.collection_name; if (object_name === "photos") { processACSPhotos(model, method, options); } else if (object_name === "users") { processACSUsers(model, method, options); } } /** * this is a separate handler for when the object being processed * is an ACS Photo */ function processACSPhotos(model, method, options) { switch (method) { case "create": // include attributes into the params for ACS Cloud.Photos.create(model.toJSON(), function(e) { if (e.success) { // save the meta data with object model.meta = e.meta; // return the individual photo object found options.success(e.photos[0]); // trigger fetch for UI updates model.trigger("fetch"); } else { Ti.API.error("Photos.create " + e.message); options.error(e.error && e.message || e); } }); break; case "read": case "update": case "delete": // Not currently implemented, let the user know alert("Not Implemented Yet"); break; } }
/* Copyright 2020 Adobe. All rights reserved. This file is licensed to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ export default "https://ns.adobe.com/experience/alloy";
// @flow import { connect } from 'react-redux'; import Filters from './Filters.component'; import { restMenuItemSelected } from './filterSelector.actions'; import { makeOnItemSelectedSelector } from './filters.selectors'; const mapStateToProps = (state: ReduxState, props: Object) => ({ stickyFilters: state.workingListsStickyFilters[props.listId], }); const mapDispatchToProps = () => { const onItemSelectedMemoized = makeOnItemSelectedSelector(); // $FlowFixMe[not-an-object] automated comment return (dispatch: ReduxDispatch, props: Object) => ({ onRestMenuItemSelected: onItemSelectedMemoized({ dispatch, listId: props.listId, onItemSelected: restMenuItemSelected, }), }); }; // $FlowFixMe[missing-annot] automated comment export default connect(mapStateToProps, mapDispatchToProps)(Filters);
var path = require('path'), should = require('should'), mockFs = require('mock-fs'), ConfigLoader = require('../../lib/config_loader'); var getCorrectConfig = function() { return { server: { port: 8080 }, mpd: { host: 'localhost', port: 6600 }, radioStations: [ { id: "first", name: 'The first', url: 'http://example.com/first' }, { id: "second", name: 'The second', url: 'http://example.com/second' }, { id: "third", name: 'The third', url: 'http://example.com/third' } ], defaultRadioStation: 'third', storage: { settings: "http://127.0.0.1:5984/bluethroat_settings" } }; }; describe('ConfigLoader', function() { describe('load', function() { it('should throw exception if the file does not exists', function() { mockFs({ // There are no files at all. }); (function() { ConfigLoader.load('configs/missed.json'); }).should.throw(/^File \".*?missed\.json\" is not found/); mockFs.restore(); }); it('should throw exception if not a file passed in', function() { mockFs({ 'configs/not-a-file': {/* empty directory */} }); (function() { ConfigLoader.load('configs/not-a-file'); }).should.throw('Specified config file is not a regular file'); mockFs.restore(); }); it('should throw exception on invalid JSON', function() { mockFs({ 'configs/invalid.json': '{' }); (function() { ConfigLoader.load('configs/invalid.json'); }).should.throw(/^Cannot parse config file/); mockFs.restore(); }); it('should throw exception on invalid "mpd" field', function() { var noMpdConfig = getCorrectConfig(); delete noMpdConfig.mpd; var noMpdHostConfig = getCorrectConfig(); delete noMpdHostConfig.mpd.host; var noMpdPortConfig = getCorrectConfig(); delete noMpdPortConfig.mpd.port; mockFs({ 'configs/no-mpd.json': JSON.stringify(noMpdConfig), 'configs/no-mpd-host.json': JSON.stringify(noMpdHostConfig), 'configs/no-mpd-port.json': JSON.stringify(noMpdPortConfig) }); (function() { ConfigLoader.load('configs/no-mpd.json'); }).should.throw('You must specify MPD host and port'); (function() { ConfigLoader.load('configs/no-mpd-host.json'); }).should.throw('You must specify MPD host and port'); (function() { ConfigLoader.load('configs/no-mpd-port.json'); }).should.throw('You must specify MPD host and port'); mockFs.restore(); }); it('should throw exception on invalid "radioStations" field', function() { var noStationsConfig = getCorrectConfig(); delete noStationsConfig.radioStations; var emptyStationsConfig = getCorrectConfig(); emptyStationsConfig.radioStations = {}; mockFs({ 'configs/no-stations.json': JSON.stringify(noStationsConfig), 'configs/empty-stations.json': JSON.stringify(emptyStationsConfig) }); (function() { ConfigLoader.load('configs/no-stations.json'); }).should.throw('"radioStations" field is missed'); (function() { ConfigLoader.load('configs/empty-stations.json'); }).should.throw('You must specify at least one radio station'); mockFs.restore(); }); it('should throw exception on invalid "storage" field', function() { var noStorageConfig = getCorrectConfig(); delete noStorageConfig.storage; var noSettingsStorageConfig = getCorrectConfig(); delete noSettingsStorageConfig.storage.settings; mockFs({ 'configs/no-storage.json': JSON.stringify(noStorageConfig), 'configs/no-settings-storage.json': JSON.stringify(noSettingsStorageConfig) }); (function() { ConfigLoader.load('configs/no-storage.json'); }).should.throw('"storage" filed is missed'); (function() { ConfigLoader.load('configs/no-settings-storage.json'); }).should.throw('You must specify connection params for settings storage'); mockFs.restore(); }); it('should load and parse correct config', function() { mockFs({ 'configs/valid.json': JSON.stringify(getCorrectConfig()) }); ConfigLoader.load('configs/valid.json').should.be.eql(getCorrectConfig()); mockFs.restore(); }); it('should use default port', function() { var config = getCorrectConfig(); delete config.server; mockFs({ 'configs/no-server.json': JSON.stringify(config) }); var loadedConfig = ConfigLoader.load('configs/no-server.json'); loadedConfig.should.have.property('server'); loadedConfig.server.should.have.property('port'); loadedConfig.server.port.should.be.equal(8000); mockFs.restore(); }); it('should use default radio station', function() { var config = getCorrectConfig(); delete config.defaultRadioStation; mockFs({ 'configs/no-default-station.json': JSON.stringify(config) }); var loadedConfig = ConfigLoader.load('configs/no-default-station.json'); loadedConfig.should.have.property('defaultRadioStation'); loadedConfig.defaultRadioStation.should.be.equal(config.radioStations[0].id); mockFs.restore(); }); }); });
/*! * protobuf.js v6.8.4 (c) 2016, daniel wirtz * compiled thu, 04 jan 2018 21:51:40 utc * licensed under the bsd-3-clause license * see: https://github.com/dcodeio/protobuf.js for details */ !function (e, t) { "use strict"; !function (t, r, n) { function i(e) { var n = r[e]; return n || t[e][0].call(n = r[e] = { exports: {} }, i, n, n.exports), n.exports } var o = e.protobuf = i(n[0]); "function" == typeof define && define.amd && define(["long"], function (e) { return e && e.isLong && (o.util.Long = e, o.configure()), o }), "object" == typeof module && module && module.exports && (module.exports = o) }({ 1: [function (e, t) { function r(e, t) { for (var r = Array(arguments.length - 1), n = 0, i = 2, o = !0; i < arguments.length;)r[n++] = arguments[i++]; return new Promise(function (i, s) { r[n] = function (e) { if (o) if (o = !1, e) s(e); else { for (var t = Array(arguments.length - 1), r = 0; r < t.length;)t[r++] = arguments[r]; i.apply(null, t) } }; try { e.apply(t || null, r) } catch (e) { o && (o = !1, s(e)) } }) } t.exports = r }, {}], 2: [function (e, r, n) { var i = n; i.length = function (e) { var t = e.length; if (!t) return 0; for (var r = 0; --t % 4 > 1 && "=" === e.charAt(t);)++r; return Math.ceil(3 * e.length) / 4 - r }; for (var o = Array(64), s = Array(123), a = 0; a < 64;)s[o[a] = a < 26 ? a + 65 : a < 52 ? a + 71 : a < 62 ? a - 4 : a - 59 | 43] = a++; i.encode = function (e, t, r) { for (var n, i = null, s = [], a = 0, u = 0; t < r;) { var f = e[t++]; switch (u) { case 0: s[a++] = o[f >> 2], n = (3 & f) << 4, u = 1; break; case 1: s[a++] = o[n | f >> 4], n = (15 & f) << 2, u = 2; break; case 2: s[a++] = o[n | f >> 6], s[a++] = o[63 & f], u = 0 }a > 8191 && ((i || (i = [])).push(String.fromCharCode.apply(String, s)), a = 0) } return u && (s[a++] = o[n], s[a++] = 61, 1 === u && (s[a++] = 61)), i ? (a && i.push(String.fromCharCode.apply(String, s.slice(0, a))), i.join("")) : String.fromCharCode.apply(String, s.slice(0, a)) }; i.decode = function (e, r, n) { for (var i, o = n, a = 0, u = 0; u < e.length;) { var f = e.charCodeAt(u++); if (61 === f && a > 1) break; if ((f = s[f]) === t) throw Error("invalid encoding"); switch (a) { case 0: i = f, a = 1; break; case 1: r[n++] = i << 2 | (48 & f) >> 4, i = f, a = 2; break; case 2: r[n++] = (15 & i) << 4 | (60 & f) >> 2, i = f, a = 3; break; case 3: r[n++] = (3 & i) << 6 | f, a = 0 } } if (1 === a) throw Error("invalid encoding"); return n - o }, i.test = function (e) { return /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e) } }, {}], 3: [function (e, r) { function n(e, r) { function i(e) { if ("string" != typeof e) { var t = o(); if (n.verbose && ConsoleHelper.log("codegen: " + t), t = "return " + t, e) { for (var r = Object.keys(e), a = Array(r.length + 1), u = Array(r.length), f = 0; f < r.length;)a[f] = r[f], u[f] = e[r[f++]]; return a[f] = t, Function.apply(null, a).apply(null, u) } return Function(t)() } for (var l = Array(arguments.length - 1), p = 0; p < l.length;)l[p] = arguments[++p]; if (p = 0, e = e.replace(/%([%dfijs])/g, function (e, t) { var r = l[p++]; switch (t) { case "d": case "f": return +r + ""; case "i": return Math.floor(r) + ""; case "j": return JSON.stringify(r); case "s": return r + "" }return "%" }), p !== l.length) throw Error("parameter count mismatch"); return s.push(e), i } function o(t) { return "function " + (t || r || "") + "(" + (e && e.join(",") || "") + "){\n " + s.join("\n ") + "\n}" } "string" == typeof e && (r = e, e = t); var s = []; return i.toString = o, i } r.exports = n, n.verbose = !1 }, {}], 4: [function (e, r) { function n() { this.a = {} } r.exports = n, n.prototype.on = function (e, t, r) { return (this.a[e] || (this.a[e] = [])).push({ fn: t, ctx: r || this }), this }, n.prototype.off = function (e, r) { if (e === t) this.a = {}; else if (r === t) this.a[e] = []; else for (var n = this.a[e], i = 0; i < n.length;)n[i].fn === r ? n.splice(i, 1) : ++i; return this }, n.prototype.emit = function (e) { var t = this.a[e]; if (t) { for (var r = [], n = 1; n < arguments.length;)r.push(arguments[n++]); for (n = 0; n < t.length;)t[n].fn.apply(t[n++].ctx, r) } return this } }, {}], 5: [function (e, r) { function n(e, t, r) { return "function" == typeof t ? (r = t, t = {}) : t || (t = {}), r ? !t.xhr && s && s.readFile ? s.readFile(e, function (i, o) { return i && "undefined" != typeof XMLHttpRequest ? n.xhr(e, t, r) : i ? r(i) : r(null, t.binary ? o : o.toString("utf8")) }) : n.xhr(e, t, r) : i(n, this, e, t) } r.exports = n; var i = e(1), o = e(7), s = o("fs"); n.xhr = function (e, r, n) { var i = new XMLHttpRequest; i.onreadystatechange = function () { if (4 !== i.readyState) return t; if (0 !== i.status && 200 !== i.status) return n(Error("status " + i.status)); if (r.binary) { var e = i.response; if (!e) { e = []; for (var o = 0; o < i.responseText.length; ++o)e.push(255 & i.responseText.charCodeAt(o)) } return n(null, "undefined" != typeof Uint8Array ? new Uint8Array(e) : e) } return n(null, i.responseText) }, r.binary && ("overrideMimeType" in i && i.overrideMimeType("text/plain; charset=x-user-defined"), i.responseType = "arraybuffer"), i.open("GET", e), i.send() } }, { 1: 1, 7: 7 }], 6: [function (e, t) { function r(e) { return "undefined" != typeof Float32Array ? function () { function t(e, t, r) { o[0] = e, t[r] = s[0], t[r + 1] = s[1], t[r + 2] = s[2], t[r + 3] = s[3] } function r(e, t, r) { o[0] = e, t[r] = s[3], t[r + 1] = s[2], t[r + 2] = s[1], t[r + 3] = s[0] } function n(e, t) { return s[0] = e[t], s[1] = e[t + 1], s[2] = e[t + 2], s[3] = e[t + 3], o[0] } function i(e, t) { return s[3] = e[t], s[2] = e[t + 1], s[1] = e[t + 2], s[0] = e[t + 3], o[0] } var o = new Float32Array([-0]), s = new Uint8Array(o.buffer), a = 128 === s[3]; e.writeFloatLE = a ? t : r, e.writeFloatBE = a ? r : t, e.readFloatLE = a ? n : i, e.readFloatBE = a ? i : n }() : function () { function t(e, t, r, n) { var i = t < 0 ? 1 : 0; if (i && (t = -t), 0 === t) e(1 / t > 0 ? 0 : 2147483648, r, n); else if (isNaN(t)) e(2143289344, r, n); else if (t > 3.4028234663852886e38) e((i << 31 | 2139095040) >>> 0, r, n); else if (t < 1.1754943508222875e-38) e((i << 31 | Math.round(t / 1.401298464324817e-45)) >>> 0, r, n); else { var o = Math.floor(Math.log(t) / Math.LN2), s = 8388607 & Math.round(t * Math.pow(2, -o) * 8388608); e((i << 31 | o + 127 << 23 | s) >>> 0, r, n) } } function r(e, t, r) { var n = e(t, r), i = 2 * (n >> 31) + 1, o = n >>> 23 & 255, s = 8388607 & n; return 255 === o ? s ? NaN : i * (1 / 0) : 0 === o ? 1.401298464324817e-45 * i * s : i * Math.pow(2, o - 150) * (s + 8388608) } e.writeFloatLE = t.bind(null, n), e.writeFloatBE = t.bind(null, i), e.readFloatLE = r.bind(null, o), e.readFloatBE = r.bind(null, s) }(), "undefined" != typeof Float64Array ? function () { function t(e, t, r) { o[0] = e, t[r] = s[0], t[r + 1] = s[1], t[r + 2] = s[2], t[r + 3] = s[3], t[r + 4] = s[4], t[r + 5] = s[5], t[r + 6] = s[6], t[r + 7] = s[7] } function r(e, t, r) { o[0] = e, t[r] = s[7], t[r + 1] = s[6], t[r + 2] = s[5], t[r + 3] = s[4], t[r + 4] = s[3], t[r + 5] = s[2], t[r + 6] = s[1], t[r + 7] = s[0] } function n(e, t) { return s[0] = e[t], s[1] = e[t + 1], s[2] = e[t + 2], s[3] = e[t + 3], s[4] = e[t + 4], s[5] = e[t + 5], s[6] = e[t + 6], s[7] = e[t + 7], o[0] } function i(e, t) { return s[7] = e[t], s[6] = e[t + 1], s[5] = e[t + 2], s[4] = e[t + 3], s[3] = e[t + 4], s[2] = e[t + 5], s[1] = e[t + 6], s[0] = e[t + 7], o[0] } var o = new Float64Array([-0]), s = new Uint8Array(o.buffer), a = 128 === s[7]; e.writeDoubleLE = a ? t : r, e.writeDoubleBE = a ? r : t, e.readDoubleLE = a ? n : i, e.readDoubleBE = a ? i : n }() : function () { function t(e, t, r, n, i, o) { var s = n < 0 ? 1 : 0; if (s && (n = -n), 0 === n) e(0, i, o + t), e(1 / n > 0 ? 0 : 2147483648, i, o + r); else if (isNaN(n)) e(0, i, o + t), e(2146959360, i, o + r); else if (n > 1.7976931348623157e308) e(0, i, o + t), e((s << 31 | 2146435072) >>> 0, i, o + r); else { var a; if (n < 2.2250738585072014e-308) a = n / 5e-324, e(a >>> 0, i, o + t), e((s << 31 | a / 4294967296) >>> 0, i, o + r); else { var u = Math.floor(Math.log(n) / Math.LN2); 1024 === u && (u = 1023), a = n * Math.pow(2, -u), e(4503599627370496 * a >>> 0, i, o + t), e((s << 31 | u + 1023 << 20 | 1048576 * a & 1048575) >>> 0, i, o + r) } } } function r(e, t, r, n, i) { var o = e(n, i + t), s = e(n, i + r), a = 2 * (s >> 31) + 1, u = s >>> 20 & 2047, f = 4294967296 * (1048575 & s) + o; return 2047 === u ? f ? NaN : a * (1 / 0) : 0 === u ? 5e-324 * a * f : a * Math.pow(2, u - 1075) * (f + 4503599627370496) } e.writeDoubleLE = t.bind(null, n, 0, 4), e.writeDoubleBE = t.bind(null, i, 4, 0), e.readDoubleLE = r.bind(null, o, 0, 4), e.readDoubleBE = r.bind(null, s, 4, 0) }(), e } function n(e, t, r) { t[r] = 255 & e, t[r + 1] = e >>> 8 & 255, t[r + 2] = e >>> 16 & 255, t[r + 3] = e >>> 24 } function i(e, t, r) { t[r] = e >>> 24, t[r + 1] = e >>> 16 & 255, t[r + 2] = e >>> 8 & 255, t[r + 3] = 255 & e } function o(e, t) { return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0 } function s(e, t) { return (e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]) >>> 0 } t.exports = r(r) }, {}], 7: [function (e, t, r) { function n(e) { try { var t = eval("quire".replace(/^/, "re"))(e); if (t && (t.length || Object.keys(t).length)) return t } catch (e) { } return null } t.exports = n }, {}], 8: [function (e, t, r) { var n = r, i = n.isAbsolute = function (e) { return /^(?:\/|\w+:)/.test(e) }, o = n.normalize = function (e) { e = e.replace(/\\/g, "/").replace(/\/{2,}/g, "/"); var t = e.split("/"), r = i(e), n = ""; r && (n = t.shift() + "/"); for (var o = 0; o < t.length;)".." === t[o] ? o > 0 && ".." !== t[o - 1] ? t.splice(--o, 2) : r ? t.splice(o, 1) : ++o : "." === t[o] ? t.splice(o, 1) : ++o; return n + t.join("/") }; n.resolve = function (e, t, r) { return r || (t = o(t)), i(t) ? t : (r || (e = o(e)), (e = e.replace(/(?:\/|^)[^\/]+$/, "")).length ? o(e + "/" + t) : t) } }, {}], 9: [function (e, t) { function r(e, t, r) { var n = r || 8192, i = n >>> 1, o = null, s = n; return function (r) { if (r < 1 || r > i) return e(r); s + r > n && (o = e(n), s = 0); var a = t.call(o, s, s += r); return 7 & s && (s = 1 + (7 | s)), a } } t.exports = r }, {}], 10: [function (e, t, r) { var n = r; n.length = function (e) { for (var t = 0, r = 0, n = 0; n < e.length; ++n)r = e.charCodeAt(n), r < 128 ? t += 1 : r < 2048 ? t += 2 : 55296 == (64512 & r) && 56320 == (64512 & e.charCodeAt(n + 1)) ? (++n, t += 4) : t += 3; return t }, n.read = function (e, t, r) { if (r - t < 1) return ""; for (var n, i = null, o = [], s = 0; t < r;)n = e[t++], n < 128 ? o[s++] = n : n > 191 && n < 224 ? o[s++] = (31 & n) << 6 | 63 & e[t++] : n > 239 && n < 365 ? (n = ((7 & n) << 18 | (63 & e[t++]) << 12 | (63 & e[t++]) << 6 | 63 & e[t++]) - 65536, o[s++] = 55296 + (n >> 10), o[s++] = 56320 + (1023 & n)) : o[s++] = (15 & n) << 12 | (63 & e[t++]) << 6 | 63 & e[t++], s > 8191 && ((i || (i = [])).push(String.fromCharCode.apply(String, o)), s = 0); return i ? (s && i.push(String.fromCharCode.apply(String, o.slice(0, s))), i.join("")) : String.fromCharCode.apply(String, o.slice(0, s)) }, n.write = function (e, t, r) { for (var n, i, o = r, s = 0; s < e.length; ++s)n = e.charCodeAt(s), n < 128 ? t[r++] = n : n < 2048 ? (t[r++] = n >> 6 | 192, t[r++] = 63 & n | 128) : 55296 == (64512 & n) && 56320 == (64512 & (i = e.charCodeAt(s + 1))) ? (n = 65536 + ((1023 & n) << 10) + (1023 & i), ++s, t[r++] = n >> 18 | 240, t[r++] = n >> 12 & 63 | 128, t[r++] = n >> 6 & 63 | 128, t[r++] = 63 & n | 128) : (t[r++] = n >> 12 | 224, t[r++] = n >> 6 & 63 | 128, t[r++] = 63 & n | 128); return r - o } }, {}], 11: [function (e, t) { function r(e, t) { n.test(e) || (e = "google/protobuf/" + e + ".proto", t = { nested: { google: { nested: { protobuf: { nested: t } } } } }), r[e] = t } t.exports = r; var n = /\/|\./; r("any", { Any: { fields: { type_url: { type: "string", id: 1 }, value: { type: "bytes", id: 2 } } } }); var i; r("duration", { Duration: i = { fields: { seconds: { type: "int64", id: 1 }, nanos: { type: "int32", id: 2 } } } }), r("timestamp", { Timestamp: i }), r("empty", { Empty: { fields: {} } }), r("struct", { Struct: { fields: { fields: { keyType: "string", type: "Value", id: 1 } } }, Value: { oneofs: { kind: { oneof: ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"] } }, fields: { nullValue: { type: "NullValue", id: 1 }, numberValue: { type: "double", id: 2 }, stringValue: { type: "string", id: 3 }, boolValue: { type: "bool", id: 4 }, structValue: { type: "Struct", id: 5 }, listValue: { type: "ListValue", id: 6 } } }, NullValue: { values: { NULL_VALUE: 0 } }, ListValue: { fields: { values: { rule: "repeated", type: "Value", id: 1 } } } }), r("wrappers", { DoubleValue: { fields: { value: { type: "double", id: 1 } } }, FloatValue: { fields: { value: { type: "float", id: 1 } } }, Int64Value: { fields: { value: { type: "int64", id: 1 } } }, UInt64Value: { fields: { value: { type: "uint64", id: 1 } } }, Int32Value: { fields: { value: { type: "int32", id: 1 } } }, UInt32Value: { fields: { value: { type: "uint32", id: 1 } } }, BoolValue: { fields: { value: { type: "bool", id: 1 } } }, StringValue: { fields: { value: { type: "string", id: 1 } } }, BytesValue: { fields: { value: { type: "bytes", id: 1 } } } }), r.get = function (e) { return r[e] || null } }, {}], 12: [function (e, t, r) { function n(e, t, r, n) { if (t.resolvedType) if (t.resolvedType instanceof s) { e("switch(d%s){", n); for (var i = t.resolvedType.values, o = Object.keys(i), a = 0; a < o.length; ++a)t.repeated && i[o[a]] === t.typeDefault && e("default:"), e("case%j:", o[a])("case %i:", i[o[a]])("m%s=%j", n, i[o[a]])("break"); e("}") } else e('if(typeof d%s!=="object")', n)("throw TypeError(%j)", t.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", n, r, n); else { var u = !1; switch (t.type) { case "double": case "float": e("m%s=Number(d%s)", n, n); break; case "uint32": case "fixed32": e("m%s=d%s>>>0", n, n); break; case "int32": case "sint32": case "sfixed32": e("m%s=d%s|0", n, n); break; case "uint64": u = !0; case "int64": case "sint64": case "fixed64": case "sfixed64": e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", n, n, u)('else if(typeof d%s==="string")', n)("m%s=parseInt(d%s,10)", n, n)('else if(typeof d%s==="number")', n)("m%s=d%s", n, n)('else if(typeof d%s==="object")', n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", n, n, n, u ? "true" : ""); break; case "bytes": e('if(typeof d%s==="string")', n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", n, n, n)("else if(d%s.length)", n)("m%s=d%s", n, n); break; case "string": e("m%s=String(d%s)", n, n); break; case "bool": e("m%s=Boolean(d%s)", n, n) } } return e } function i(e, t, r, n) { if (t.resolvedType) t.resolvedType instanceof s ? e("d%s=o.enums===String?types[%i].values[m%s]:m%s", n, r, n, n) : e("d%s=types[%i].toObject(m%s,o)", n, r, n); else { var i = !1; switch (t.type) { case "double": case "float": e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", n, n, n, n); break; case "uint64": i = !0; case "int64": case "sint64": case "fixed64": case "sfixed64": e('if(typeof m%s==="number")', n)("d%s=o.longs===String?String(m%s):m%s", n, n, n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", n, n, n, n, i ? "true" : "", n); break; case "bytes": e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", n, n, n, n, n); break; default: e("d%s=m%s", n, n) } } return e } var o = r, s = e(15), a = e(37); o.fromObject = function (e) { var t = e.fieldsArray, r = a.codegen(["d"], e.name + "$fromObject")("if(d instanceof this.ctor)")("return d"); if (!t.length) return r("return new this.ctor"); r("var m=new this.ctor"); for (var i = 0; i < t.length; ++i) { var o = t[i].resolve(), u = a.safeProp(o.name); o.map ? (r("if(d%s){", u)('if(typeof d%s!=="object")', u)("throw TypeError(%j)", o.fullName + ": object expected")("m%s={}", u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", u), n(r, o, i, u + "[ks[i]]")("}")("}")) : o.repeated ? (r("if(d%s){", u)("if(!Array.isArray(d%s))", u)("throw TypeError(%j)", o.fullName + ": array expected")("m%s=[]", u)("for(var i=0;i<d%s.length;++i){", u), n(r, o, i, u + "[i]")("}")("}")) : (o.resolvedType instanceof s || r("if(d%s!=null){", u), n(r, o, i, u), o.resolvedType instanceof s || r("}")) } return r("return m") }, o.toObject = function (e) { var t = e.fieldsArray.slice().sort(a.compareFieldsById); if (!t.length) return a.codegen()("return {}"); for (var r = a.codegen(["m", "o"], e.name + "$toObject")("if(!o)")("o={}")("var d={}"), n = [], o = [], s = [], u = 0; u < t.length; ++u)t[u].partOf || (t[u].resolve().repeated ? n : t[u].map ? o : s).push(t[u]); var f, l, p = !1; for (u = 0; u < t.length; ++u) { var f = t[u], c = e.b.indexOf(f), l = a.safeProp(f.name); f.map ? (p || (p = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", l, l)("d%s={}", l)("for(var j=0;j<ks2.length;++j){"), i(r, f, c, l + "[ks2[j]]")("}")) : f.repeated ? (r("if(m%s&&m%s.length){", l, l)("d%s=[]", l)("for(var j=0;j<m%s.length;++j){", l), i(r, f, c, l + "[j]")("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", l, f.name), i(r, f, c, l), f.partOf && r("if(o.oneofs)")("d%s=%j", a.safeProp(f.partOf.name), f.name)), r("}") } return r("return d") } }, { 15: 15, 37: 37 }], 13: [function (e, r) { function n(e) { return "missing required '" + e.name + "'" } function i(e) { var r = a.codegen(["r", "l"], e.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (e.fieldsArray.filter(function (e) { return e.map }).length ? ",k" : ""))("while(r.pos<c){")("var t=r.uint32()"); e.group && r("if((t&7)===4)")("break"), r("switch(t>>>3){"); for (var i = 0; i < e.fieldsArray.length; ++i) { var u = e.b[i].resolve(), f = u.resolvedType instanceof o ? "int32" : u.type, l = "m" + a.safeProp(u.name); r("case %i:", u.id), u.map ? (r("r.skip().pos++")("if(%s===util.emptyObject)", l)("%s={}", l)("k=r.%s()", u.keyType)("r.pos++"), s.long[u.keyType] !== t ? s.basic[f] === t ? r('%s[typeof k==="object"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())', l, i) : r('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()', l, f) : s.basic[f] === t ? r("%s[k]=types[%i].decode(r,r.uint32())", l, i) : r("%s[k]=r.%s()", l, f)) : u.repeated ? (r("if(!(%s&&%s.length))", l, l)("%s=[]", l), s.packed[f] !== t && r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, f)("}else"), s.basic[f] === t ? r(u.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", l, i) : r("%s.push(r.%s())", l, f)) : s.basic[f] === t ? r(u.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", l, i) : r("%s=r.%s()", l, f), r("break") } for (r("default:")("r.skipType(t&7)")("break")("}")("}"), i = 0; i < e.b.length; ++i) { var p = e.b[i]; p.required && r("if(!m.hasOwnProperty(%j))", p.name)("throw util.ProtocolError(%j,{instance:m})", n(p)) } return r("return m") } r.exports = i; var o = e(15), s = e(36), a = e(37) }, { 15: 15, 36: 36, 37: 37 }], 14: [function (e, r) { function n(e, t, r, n) { return t.resolvedType.group ? e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", r, n, (t.id << 3 | 3) >>> 0, (t.id << 3 | 4) >>> 0) : e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", r, n, (t.id << 3 | 2) >>> 0) } function i(e) { for (var r, i, u = a.codegen(["m", "w"], e.name + "$encode")("if(!w)")("w=Writer.create()"), f = e.fieldsArray.slice().sort(a.compareFieldsById), r = 0; r < f.length; ++r) { var l = f[r].resolve(), p = e.b.indexOf(l), c = l.resolvedType instanceof o ? "int32" : l.type, h = s.basic[c]; i = "m" + a.safeProp(l.name), l.map ? (u("if(%s!=null&&m.hasOwnProperty(%j)){", i, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | s.mapKey[l.keyType], l.keyType), h === t ? u("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", p, i) : u(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | h, c, i), u("}")("}")) : l.repeated ? (u("if(%s!=null&&%s.length){", i, i), l.packed && s.packed[c] !== t ? u("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", i)("w.%s(%s[i])", c, i)("w.ldelim()") : (u("for(var i=0;i<%s.length;++i)", i), h === t ? n(u, l, p, i + "[i]") : u("w.uint32(%i).%s(%s[i])", (l.id << 3 | h) >>> 0, c, i)), u("}")) : (l.optional && u("if(%s!=null&&m.hasOwnProperty(%j))", i, l.name), h === t ? n(u, l, p, i) : u("w.uint32(%i).%s(%s)", (l.id << 3 | h) >>> 0, c, i)) } return u("return w") } r.exports = i; var o = e(15), s = e(36), a = e(37) }, { 15: 15, 36: 36, 37: 37 }], 15: [function (e, r) { function n(e, r, n) { if (i.call(this, e, n), r && "object" != typeof r) throw TypeError("values must be an object"); if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comments = {}, this.reserved = t, r) for (var o = Object.keys(r), s = 0; s < o.length; ++s)"number" == typeof r[o[s]] && (this.valuesById[this.values[o[s]] = r[o[s]]] = o[s]) } r.exports = n; var i = e(24); ((n.prototype = Object.create(i.prototype)).constructor = n).className = "Enum"; var o = e(23), s = e(37); n.fromJSON = function (e, t) { var r = new n(e, t.values, t.options); return r.reserved = t.reserved, r }, n.prototype.toJSON = function () { return s.toObject(["options", this.options, "values", this.values, "reserved", this.reserved && this.reserved.length ? this.reserved : t]) }, n.prototype.add = function (e, r, n) { if (!s.isString(e)) throw TypeError("name must be a string"); if (!s.isInteger(r)) throw TypeError("id must be an integer"); if (this.values[e] !== t) throw Error("duplicate name '" + e + "' in " + this); if (this.isReservedId(r)) throw Error("id " + r + " is reserved in " + this); if (this.isReservedName(e)) throw Error("name '" + e + "' is reserved in " + this); if (this.valuesById[r] !== t) { if (!this.options || !this.options.allow_alias) throw Error("duplicate id " + r + " in " + this); this.values[e] = r } else this.valuesById[this.values[e] = r] = e; return this.comments[e] = n || null, this }, n.prototype.remove = function (e) { if (!s.isString(e)) throw TypeError("name must be a string"); var t = this.values[e]; if (null == t) throw Error("name '" + e + "' does not exist in " + this); return delete this.valuesById[t], delete this.values[e], delete this.comments[e], this }, n.prototype.isReservedId = function (e) { return o.isReservedId(this.reserved, e) }, n.prototype.isReservedName = function (e) { return o.isReservedName(this.reserved, e) } }, { 23: 23, 24: 24, 37: 37 }], 16: [function (e, r) { function n(e, r, n, o, s, l) { if (u.isObject(o) ? (l = o, o = s = t) : u.isObject(s) && (l = s, s = t), i.call(this, e, l), !u.isInteger(r) || r < 0) throw TypeError("id must be a non-negative integer"); if (!u.isString(n)) throw TypeError("type must be a string"); if (o !== t && !f.test(o = ("" + o).toLowerCase())) throw TypeError("rule must be a string rule"); if (s !== t && !u.isString(s)) throw TypeError("extend must be a string"); this.rule = o && "optional" !== o ? o : t, this.type = n, this.id = r, this.extend = s || t, this.required = "required" === o, this.optional = !this.required, this.repeated = "repeated" === o, this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = !!u.Long && a.long[n] !== t, this.bytes = "bytes" === n, this.resolvedType = null, this.extensionField = null, this.declaringField = null, this.c = null } r.exports = n; var i = e(24); ((n.prototype = Object.create(i.prototype)).constructor = n).className = "Field"; var o, s = e(15), a = e(36), u = e(37), f = /^required|optional|repeated$/; n.fromJSON = function (e, t) { return new n(e, t.id, t.type, t.rule, t.extend, t.options) }, Object.defineProperty(n.prototype, "packed", { get: function () { return null === this.c && (this.c = !1 !== this.getOption("packed")), this.c } }), n.prototype.setOption = function (e, t, r) { return "packed" === e && (this.c = null), i.prototype.setOption.call(this, e, t, r) }, n.prototype.toJSON = function () { return u.toObject(["rule", "optional" !== this.rule && this.rule || t, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options]) }, n.prototype.resolve = function () { if (this.resolved) return this; if ((this.typeDefault = a.defaults[this.type]) === t && (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof o ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]), this.options && null != this.options.default && (this.typeDefault = this.options.default, this.resolvedType instanceof s && "string" == typeof this.typeDefault && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && (!0 !== this.options.packed && (this.options.packed === t || !this.resolvedType || this.resolvedType instanceof s) || delete this.options.packed, Object.keys(this.options).length || (this.options = t)), this.long) this.typeDefault = u.Long.fromNumber(this.typeDefault, "u" === this.type.charAt(0)), Object.freeze && Object.freeze(this.typeDefault); else if (this.bytes && "string" == typeof this.typeDefault) { var e; u.base64.test(this.typeDefault) ? u.base64.decode(this.typeDefault, e = u.newBuffer(u.base64.length(this.typeDefault)), 0) : u.utf8.write(this.typeDefault, e = u.newBuffer(u.utf8.length(this.typeDefault)), 0), this.typeDefault = e } return this.map ? this.defaultValue = u.emptyObject : this.repeated ? this.defaultValue = u.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof o && (this.parent.ctor.prototype[this.name] = this.defaultValue), i.prototype.resolve.call(this) }, n.d = function (e, t, r, i) { return "function" == typeof t ? t = u.decorateType(t).name : t && "object" == typeof t && (t = u.decorateEnum(t).name), function (o, s) { u.decorateType(o.constructor).add(new n(s, e, t, r, { default: i })) } }, n.e = function (e) { o = e } }, { 15: 15, 24: 24, 36: 36, 37: 37 }], 17: [function (e, t) { function r(e, t, r) { return "function" == typeof t ? (r = t, t = new i.Root) : t || (t = new i.Root), t.load(e, r) } function n(e, t) { return t || (t = new i.Root), t.loadSync(e) } var i = t.exports = e(18); i.build = "light", i.load = r, i.loadSync = n, i.encoder = e(14), i.decoder = e(13), i.verifier = e(40), i.converter = e(12), i.ReflectionObject = e(24), i.Namespace = e(23), i.Root = e(29), i.Enum = e(15), i.Type = e(35), i.Field = e(16), i.OneOf = e(25), i.MapField = e(20), i.Service = e(33), i.Method = e(22), i.Message = e(21), i.wrappers = e(41), i.types = e(36), i.util = e(37), i.ReflectionObject.e(i.Root), i.Namespace.e(i.Type, i.Service), i.Root.e(i.Type), i.Field.e(i.Type) }, { 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 18: 18, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 29: 29, 33: 33, 35: 35, 36: 36, 37: 37, 40: 40, 41: 41 }], 18: [function (e, t, r) { function n() { i.Reader.e(i.BufferReader), i.util.e() } var i = r; i.build = "minimal", i.Writer = e(42), i.BufferWriter = e(43), i.Reader = e(27), i.BufferReader = e(28), i.util = e(39), i.rpc = e(31), i.roots = e(30), i.configure = n, i.Writer.e(i.BufferWriter), n() }, { 27: 27, 28: 28, 30: 30, 31: 31, 39: 39, 42: 42, 43: 43 }], 19: [function (e, t) { var r = t.exports = e(17); r.build = "full", r.tokenize = e(34), r.parse = e(26), r.common = e(11), r.Root.e(r.Type, r.parse, r.common) }, { 11: 11, 17: 17, 26: 26, 34: 34 }], 20: [function (e, r) { function n(e, t, r, n, o) { if (i.call(this, e, t, n, o), !s.isString(r)) throw TypeError("keyType must be a string"); this.keyType = r, this.resolvedKeyType = null, this.map = !0 } r.exports = n; var i = e(16); ((n.prototype = Object.create(i.prototype)).constructor = n).className = "MapField"; var o = e(36), s = e(37); n.fromJSON = function (e, t) { return new n(e, t.id, t.keyType, t.type, t.options) }, n.prototype.toJSON = function () { return s.toObject(["keyType", this.keyType, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options]) }, n.prototype.resolve = function () { if (this.resolved) return this; if (o.mapKey[this.keyType] === t) throw Error("invalid key type: " + this.keyType); return i.prototype.resolve.call(this) }, n.d = function (e, t, r) { return "function" == typeof r ? r = s.decorateType(r).name : r && "object" == typeof r && (r = s.decorateEnum(r).name), function (i, o) { s.decorateType(i.constructor).add(new n(o, e, t, r)) } } }, { 16: 16, 36: 36, 37: 37 }], 21: [function (e, t) { function r(e) { if (e) for (var t = Object.keys(e), r = 0; r < t.length; ++r)this[t[r]] = e[t[r]] } t.exports = r; var n = e(39); r.create = function (e) { return this.$type.create(e) }, r.encode = function (e, t) { return this.$type.encode(e, t) }, r.encodeDelimited = function (e, t) { return this.$type.encodeDelimited(e, t) }, r.decode = function (e) { return this.$type.decode(e) }, r.decodeDelimited = function (e) { return this.$type.decodeDelimited(e) }, r.verify = function (e) { return this.$type.verify(e) }, r.fromObject = function (e) { return this.$type.fromObject(e) }, r.toObject = function (e, t) { return this.$type.toObject(e, t) }, r.prototype.toJSON = function () { return this.$type.toObject(this, n.toJSONOptions) } }, { 39: 39 }], 22: [function (e, r) { function n(e, r, n, s, a, u, f) { if (o.isObject(a) ? (f = a, a = u = t) : o.isObject(u) && (f = u, u = t), r !== t && !o.isString(r)) throw TypeError("type must be a string"); if (!o.isString(n)) throw TypeError("requestType must be a string"); if (!o.isString(s)) throw TypeError("responseType must be a string"); i.call(this, e, f), this.type = r || "rpc", this.requestType = n, this.requestStream = !!a || t, this.responseType = s, this.responseStream = !!u || t, this.resolvedRequestType = null, this.resolvedResponseType = null } r.exports = n; var i = e(24); ((n.prototype = Object.create(i.prototype)).constructor = n).className = "Method"; var o = e(37); n.fromJSON = function (e, t) { return new n(e, t.type, t.requestType, t.responseType, t.requestStream, t.responseStream, t.options) }, n.prototype.toJSON = function () { return o.toObject(["type", "rpc" !== this.type && this.type || t, "requestType", this.requestType, "requestStream", this.requestStream, "responseType", this.responseType, "responseStream", this.responseStream, "options", this.options]) }, n.prototype.resolve = function () { return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), i.prototype.resolve.call(this)) } }, { 24: 24, 37: 37 }], 23: [function (e, r) { function n(e) { if (!e || !e.length) return t; for (var r = {}, n = 0; n < e.length; ++n)r[e[n].name] = e[n].toJSON(); return r } function i(e, r) { s.call(this, e, r), this.nested = t, this.f = null } function o(e) { return e.f = null, e } r.exports = i; var s = e(24); ((i.prototype = Object.create(s.prototype)).constructor = i).className = "Namespace"; var a, u, f = e(15), l = e(16), p = e(37); i.fromJSON = function (e, t) { return new i(e, t.options).addJSON(t.nested) }, i.arrayToJSON = n, i.isReservedId = function (e, t) { if (e) for (var r = 0; r < e.length; ++r)if ("string" != typeof e[r] && e[r][0] <= t && e[r][1] >= t) return !0; return !1 }, i.isReservedName = function (e, t) { if (e) for (var r = 0; r < e.length; ++r)if (e[r] === t) return !0; return !1 }, Object.defineProperty(i.prototype, "nestedArray", { get: function () { return this.f || (this.f = p.toArray(this.nested)) } }), i.prototype.toJSON = function () { return p.toObject(["options", this.options, "nested", n(this.nestedArray)]) }, i.prototype.addJSON = function (e) { var r = this; if (e) for (var n, o = Object.keys(e), s = 0; s < o.length; ++s)n = e[o[s]], r.add((n.fields !== t ? a.fromJSON : n.values !== t ? f.fromJSON : n.methods !== t ? u.fromJSON : n.id !== t ? l.fromJSON : i.fromJSON)(o[s], n)); return this }, i.prototype.get = function (e) { return this.nested && this.nested[e] || null }, i.prototype.getEnum = function (e) { if (this.nested && this.nested[e] instanceof f) return this.nested[e].values; throw Error("no such enum") }, i.prototype.add = function (e) { if (!(e instanceof l && e.extend !== t || e instanceof a || e instanceof f || e instanceof u || e instanceof i)) throw TypeError("object must be a valid nested object"); if (this.nested) { var r = this.get(e.name); if (r) { if (!(r instanceof i && e instanceof i) || r instanceof a || r instanceof u) throw Error("duplicate name '" + e.name + "' in " + this); for (var n = r.nestedArray, s = 0; s < n.length; ++s)e.add(n[s]); this.remove(r), this.nested || (this.nested = {}), e.setOptions(r.options, !0) } } else this.nested = {}; return this.nested[e.name] = e, e.onAdd(this), o(this) }, i.prototype.remove = function (e) { if (!(e instanceof s)) throw TypeError("object must be a ReflectionObject"); if (e.parent !== this) throw Error(e + " is not a member of " + this); return delete this.nested[e.name], Object.keys(this.nested).length || (this.nested = t), e.onRemove(this), o(this) }, i.prototype.define = function (e, t) { if (p.isString(e)) e = e.split("."); else if (!Array.isArray(e)) throw TypeError("illegal path"); if (e && e.length && "" === e[0]) throw Error("path must be relative"); for (var r = this; e.length > 0;) { var n = e.shift(); if (r.nested && r.nested[n]) { if (!((r = r.nested[n]) instanceof i)) throw Error("path conflicts with non-namespace objects") } else r.add(r = new i(n)) } return t && r.addJSON(t), r }, i.prototype.resolveAll = function () { for (var e = this.nestedArray, t = 0; t < e.length;)e[t] instanceof i ? e[t++].resolveAll() : e[t++].resolve(); return this.resolve() }, i.prototype.lookup = function (e, r, n) { if ("boolean" == typeof r ? (n = r, r = t) : r && !Array.isArray(r) && (r = [r]), p.isString(e) && e.length) { if ("." === e) return this.root; e = e.split(".") } else if (!e.length) return this; if ("" === e[0]) return this.root.lookup(e.slice(1), r); var o = this.get(e[0]); if (o) { if (1 === e.length) { if (!r || r.indexOf(o.constructor) > -1) return o } else if (o instanceof i && (o = o.lookup(e.slice(1), r, !0))) return o } else for (var s = 0; s < this.nestedArray.length; ++s)if (this.f[s] instanceof i && (o = this.f[s].lookup(e, r, !0))) return o; return null === this.parent || n ? null : this.parent.lookup(e, r) }, i.prototype.lookupType = function (e) { var t = this.lookup(e, [a]); if (!t) throw Error("no such type"); return t }, i.prototype.lookupEnum = function (e) { var t = this.lookup(e, [f]); if (!t) throw Error("no such Enum '" + e + "' in " + this); return t }, i.prototype.lookupTypeOrEnum = function (e) { var t = this.lookup(e, [a, f]); if (!t) throw Error("no such Type or Enum '" + e + "' in " + this); return t }, i.prototype.lookupService = function (e) { var t = this.lookup(e, [u]); if (!t) throw Error("no such Service '" + e + "' in " + this); return t }, i.e = function (e, t) { a = e, u = t } }, { 15: 15, 16: 16, 24: 24, 37: 37 }], 24: [function (e, r) { function n(e, t) { if (!o.isString(e)) throw TypeError("name must be a string"); if (t && !o.isObject(t)) throw TypeError("options must be an object"); this.options = t, this.name = e, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null } r.exports = n, n.className = "ReflectionObject"; var i, o = e(37); Object.defineProperties(n.prototype, { root: { get: function () { for (var e = this; null !== e.parent;)e = e.parent; return e } }, fullName: { get: function () { for (var e = [this.name], t = this.parent; t;)e.unshift(t.name), t = t.parent; return e.join(".") } } }), n.prototype.toJSON = function () { throw Error() }, n.prototype.onAdd = function (e) { this.parent && this.parent !== e && this.parent.remove(this), this.parent = e, this.resolved = !1; var t = e.root; t instanceof i && t.g(this) }, n.prototype.onRemove = function (e) { var t = e.root; t instanceof i && t.h(this), this.parent = null, this.resolved = !1 }, n.prototype.resolve = function () { return this.resolved ? this : (this.root instanceof i && (this.resolved = !0), this) }, n.prototype.getOption = function (e) { return this.options ? this.options[e] : t }, n.prototype.setOption = function (e, r, n) { return n && this.options && this.options[e] !== t || ((this.options || (this.options = {}))[e] = r), this }, n.prototype.setOptions = function (e, t) { if (e) for (var r = Object.keys(e), n = 0; n < r.length; ++n)this.setOption(r[n], e[r[n]], t); return this }, n.prototype.toString = function () { var e = this.constructor.className, t = this.fullName; return t.length ? e + " " + t : e }, n.e = function (e) { i = e } }, { 37: 37 }], 25: [function (e, r) { function n(e, r, n) { if (Array.isArray(r) || (n = r, r = t), o.call(this, e, n), r !== t && !Array.isArray(r)) throw TypeError("fieldNames must be an Array"); this.oneof = r || [], this.fieldsArray = [] } function i(e) { if (e.parent) for (var t = 0; t < e.fieldsArray.length; ++t)e.fieldsArray[t].parent || e.parent.add(e.fieldsArray[t]) } r.exports = n; var o = e(24); ((n.prototype = Object.create(o.prototype)).constructor = n).className = "OneOf"; var s = e(16), a = e(37); n.fromJSON = function (e, t) { return new n(e, t.oneof, t.options) }, n.prototype.toJSON = function () { return a.toObject(["options", this.options, "oneof", this.oneof]) }, n.prototype.add = function (e) { if (!(e instanceof s)) throw TypeError("field must be a Field"); return e.parent && e.parent !== this.parent && e.parent.remove(e), this.oneof.push(e.name), this.fieldsArray.push(e), e.partOf = this, i(this), this }, n.prototype.remove = function (e) { if (!(e instanceof s)) throw TypeError("field must be a Field"); var t = this.fieldsArray.indexOf(e); if (t < 0) throw Error(e + " is not a member of " + this); return this.fieldsArray.splice(t, 1), t = this.oneof.indexOf(e.name), t > -1 && this.oneof.splice(t, 1), e.partOf = null, this }, n.prototype.onAdd = function (e) { o.prototype.onAdd.call(this, e); for (var t = this, r = 0; r < this.oneof.length; ++r) { var n = e.get(this.oneof[r]); n && !n.partOf && (n.partOf = t, t.fieldsArray.push(n)) } i(this) }, n.prototype.onRemove = function (e) { for (var t, r = 0; r < this.fieldsArray.length; ++r)(t = this.fieldsArray[r]).parent && t.parent.remove(t); o.prototype.onRemove.call(this, e) }, n.d = function () { for (var e = Array(arguments.length), t = 0; t < arguments.length;)e[t] = arguments[t++]; return function (t, r) { a.decorateType(t.constructor).add(new n(r, e)), Object.defineProperty(t, r, { get: a.oneOfGetter(e), set: a.oneOfSetter(e) }) } } }, { 16: 16, 24: 24, 37: 37 }], 26: [function (e, r) { function n(e, r, A) { function S(e, t, r) { var i = n.filename; return r || (n.filename = null), Error("illegal " + (t || "token") + " '" + e + "' (" + (i ? i + ", " : "") + "line " + Y.line + ")") } function T() { var e, t = []; do { if ('"' !== (e = ee()) && "'" !== e) throw S(e); t.push(ee()), ne(e), e = re() } while ('"' === e || "'" === e); return t.join("") } function E(e) { var t = ee(); switch (t) { case "'": case '"': return te(t), T(); case "true": case "TRUE": return !0; case "false": case "FALSE": return !1 }try { return R(t, !0) } catch (r) { if (e && j.test(t)) return t; throw S(t, "value") } } function N(e, t) { var r, n; do { !t || '"' !== (r = re()) && "'" !== r ? e.push([n = I(ee()), ne("to", !0) ? I(ee()) : n]) : e.push(T()) } while (ne(",", !0)); ne(";") } function R(e, t) { var r = 1; switch ("-" === e.charAt(0) && (r = -1, e = e.substring(1)), e) { case "inf": case "INF": case "Inf": return r * (1 / 0); case "nan": case "NAN": case "Nan": case "NaN": return NaN; case "0": return 0 }if (y.test(e)) return r * parseInt(e, 10); if (m.test(e)) return r * parseInt(e, 16); if (b.test(e)) return r * parseInt(e, 8); if (O.test(e)) return r * parseFloat(e); throw S(e, "number", t) } function I(e, t) { switch (e) { case "max": case "MAX": case "Max": return 536870911; case "0": return 0 }if (!t && "-" === e.charAt(0)) throw S(e, "id"); if (v.test(e)) return parseInt(e, 10); if (g.test(e)) return parseInt(e, 16); if (w.test(e)) return parseInt(e, 8); throw S(e, "id") } function F(e, t) { switch (t) { case "option": return z(e, t), ne(";"), !0; case "message": return B(e, t), !0; case "enum": return V(e, t), !0; case "service": return _(e, t), !0; case "extend": return Z(e, t), !0 }return !1 } function L(e, t, r) { var i = Y.line; if (e && (e.comment = ie(), e.filename = n.filename), ne("{", !0)) { for (var o; "}" !== (o = ee());)t(o); ne(";", !0) } else r && r(), ne(";"), e && "string" != typeof e.comment && (e.comment = ie(i)) } function B(e, t) { if (!k.test(t = ee())) throw S(t, "type name"); var r = new s(t); L(r, function (e) { if (!F(r, e)) switch (e) { case "map": D(r); break; case "required": case "optional": case "repeated": J(r, e); break; case "oneof": P(r, e); break; case "extensions": N(r.extensions || (r.extensions = [])); break; case "reserved": N(r.reserved || (r.reserved = []), !0); break; default: if (!se || !j.test(e)) throw S(e); te(e), J(r, "optional") } }), e.add(r) } function J(e, r, n) { var i = ee(); if ("group" === i) return void $(e, r); if (!j.test(i)) throw S(i, "type"); var o = ee(); if (!k.test(o)) throw S(o, "name"); o = ue(o), ne("="); var s = new a(o, I(ee()), i, r, n); L(s, function (e) { if ("option" !== e) throw S(e); z(s, e), ne(";") }, function () { U(s) }), e.add(s), se || !s.repeated || h.packed[i] === t && h.basic[i] !== t || s.setOption("packed", !1, !0) } function $(e, t) { var r = ee(); if (!k.test(r)) throw S(r, "name"); var i = d.lcFirst(r); r === i && (r = d.ucFirst(r)), ne("="); var o = I(ee()), u = new s(r); u.group = !0; var f = new a(i, o, r, t); f.filename = n.filename, L(u, function (e) { switch (e) { case "option": z(u, e), ne(";"); break; case "required": case "optional": case "repeated": J(u, e); break; default: throw S(e) } }), e.add(u).add(f) } function D(e) { ne("<"); var r = ee(); if (h.mapKey[r] === t) throw S(r, "type"); ne(","); var n = ee(); if (!j.test(n)) throw S(n, "type"); ne(">"); var i = ee(); if (!k.test(i)) throw S(i, "name"); ne("="); var o = new u(ue(i), I(ee()), r, n); L(o, function (e) { if ("option" !== e) throw S(e); z(o, e), ne(";") }, function () { U(o) }), e.add(o) } function P(e, t) { if (!k.test(t = ee())) throw S(t, "name"); var r = new f(ue(t)); L(r, function (e) { "option" === e ? (z(r, e), ne(";")) : (te(e), J(r, "optional")) }), e.add(r) } function V(e, t) { if (!k.test(t = ee())) throw S(t, "name"); var r = new l(t); L(r, function (e) { switch (e) { case "option": z(r, e), ne(";"); break; case "reserved": N(r.reserved || (r.reserved = []), !0); break; default: q(r, e) } }), e.add(r) } function q(e, t) { if (!k.test(t)) throw S(t, "name"); ne("="); var r = I(ee(), !0), n = {}; L(n, function (e) { if ("option" !== e) throw S(e); z(n, e), ne(";") }, function () { U(n) }), e.add(t, r, n.comment) } function z(e, t) { var r = ne("(", !0); if (!j.test(t = ee())) throw S(t, "name"); var n = t; r && (ne(")"), n = "(" + n + ")", t = re(), x.test(t) && (n += t, ee())), ne("="), C(e, n) } function C(e, t) { if (ne("{", !0)) do { if (!k.test(Q = ee())) throw S(Q, "name"); "{" === re() ? C(e, t + "." + Q) : (ne(":"), "{" === re() ? C(e, t + "." + Q) : M(e, t + "." + Q, E(!0))) } while (!ne("}", !0)); else M(e, t, E(!0)) } function M(e, t, r) { e.setOption && e.setOption(t, r) } function U(e) { if (ne("[", !0)) { do { z(e, "option") } while (ne(",", !0)); ne("]") } return e } function _(e, t) { if (!k.test(t = ee())) throw S(t, "service name"); var r = new p(t); L(r, function (e) { if (!F(r, e)) { if ("rpc" !== e) throw S(e); H(r, e) } }), e.add(r) } function H(e, t) { var r = t; if (!k.test(t = ee())) throw S(t, "name"); var n, i, o, s, a = t; if (ne("("), ne("stream", !0) && (i = !0), !j.test(t = ee())) throw S(t); if (n = t, ne(")"), ne("returns"), ne("("), ne("stream", !0) && (s = !0), !j.test(t = ee())) throw S(t); o = t, ne(")"); var u = new c(a, r, n, o, i, s); L(u, function (e) { if ("option" !== e) throw S(e); z(u, e), ne(";") }), e.add(u) } function Z(e, t) { if (!j.test(t = ee())) throw S(t, "reference"); var r = t; L(null, function (t) { switch (t) { case "required": case "repeated": case "optional": J(e, t, r); break; default: if (!se || !j.test(t)) throw S(t); te(t), J(e, "optional", r) } }) } r instanceof o || (A = r, r = new o), A || (A = n.defaults); for (var W, K, G, X, Q, Y = i(e), ee = Y.next, te = Y.push, re = Y.peek, ne = Y.skip, ie = Y.cmnt, oe = !0, se = !1, ae = r, ue = A.keepCase ? function (e) { return e } : d.camelCase; null !== (Q = ee());)switch (Q) { case "package": if (!oe) throw S(Q); !function () { if (W !== t) throw S("package"); if (W = ee(), !j.test(W)) throw S(W, "name"); ae = ae.define(W), ne(";") }(); break; case "import": if (!oe) throw S(Q); !function () { var e, t = re(); switch (t) { case "weak": e = G || (G = []), ee(); break; case "public": ee(); default: e = K || (K = []) }t = T(), ne(";"), e.push(t) }(); break; case "syntax": if (!oe) throw S(Q); !function () { if (ne("="), X = T(), !(se = "proto3" === X) && "proto2" !== X) throw S(X, "syntax"); ne(";") }(); break; case "option": if (!oe) throw S(Q); z(ae, Q), ne(";"); break; default: if (F(ae, Q)) { oe = !1; continue } throw S(Q) }return n.filename = null, { package: W, imports: K, weakImports: G, syntax: X, root: r } } r.exports = n, n.filename = null, n.defaults = { keepCase: !1 }; var i = e(34), o = e(29), s = e(35), a = e(16), u = e(20), f = e(25), l = e(15), p = e(33), c = e(22), h = e(36), d = e(37), y = /^[1-9][0-9]*$/, v = /^-?[1-9][0-9]*$/, m = /^0[x][0-9a-fA-F]+$/, g = /^-?0[x][0-9a-fA-F]+$/, b = /^0[0-7]+$/, w = /^-?0[0-7]+$/, O = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, k = /^[a-zA-Z_][a-zA-Z_0-9]*$/, j = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/, x = /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/ }, { 15: 15, 16: 16, 20: 20, 22: 22, 25: 25, 29: 29, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37 }], 27: [function (e, t) { function r(e, t) { return RangeError("index out of range: " + e.pos + " + " + (t || 1) + " > " + e.len) } function n(e) { this.buf = e, this.pos = 0, this.len = e.length } function i() { var e = new f(0, 0), t = 0; if (!(this.len - this.pos > 4)) { for (; t < 3; ++t) { if (this.pos >= this.len) throw r(this); if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0, this.buf[this.pos++] < 128) return e } return e.lo = (e.lo | (127 & this.buf[this.pos++]) << 7 * t) >>> 0, e } for (; t < 4; ++t)if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0, this.buf[this.pos++] < 128) return e; if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 28) >>> 0, e.hi = (e.hi | (127 & this.buf[this.pos]) >> 4) >>> 0, this.buf[this.pos++] < 128) return e; if (t = 0, this.len - this.pos > 4) { for (; t < 5; ++t)if (e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0, this.buf[this.pos++] < 128) return e } else for (; t < 5; ++t) { if (this.pos >= this.len) throw r(this); if (e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0, this.buf[this.pos++] < 128) return e } throw Error("invalid varint encoding") } function o(e, t) { return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0 } function s() { if (this.pos + 8 > this.len) throw r(this, 8); return new f(o(this.buf, this.pos += 4), o(this.buf, this.pos += 4)) } t.exports = n; var a, u = e(39), f = u.LongBits, l = u.utf8, p = "undefined" != typeof Uint8Array ? function (e) { if (e instanceof Uint8Array || Array.isArray(e)) return new n(e); throw Error("illegal buffer") } : function (e) { if (Array.isArray(e)) return new n(e); throw Error("illegal buffer") }; n.create = u.Buffer ? function (e) { return (n.create = function (e) { return u.Buffer.isBuffer(e) ? new a(e) : p(e) })(e) } : p, n.prototype.i = u.Array.prototype.subarray || u.Array.prototype.slice, n.prototype.uint32 = function () { var e = 4294967295; return function () { if (e = (127 & this.buf[this.pos]) >>> 0, this.buf[this.pos++] < 128) return e; if (e = (e | (127 & this.buf[this.pos]) << 7) >>> 0, this.buf[this.pos++] < 128) return e; if (e = (e | (127 & this.buf[this.pos]) << 14) >>> 0, this.buf[this.pos++] < 128) return e; if (e = (e | (127 & this.buf[this.pos]) << 21) >>> 0, this.buf[this.pos++] < 128) return e; if (e = (e | (15 & this.buf[this.pos]) << 28) >>> 0, this.buf[this.pos++] < 128) return e; if ((this.pos += 5) > this.len) throw this.pos = this.len, r(this, 10); return e } }(), n.prototype.int32 = function () { return 0 | this.uint32() }, n.prototype.sint32 = function () { var e = this.uint32(); return e >>> 1 ^ -(1 & e) | 0 }, n.prototype.bool = function () { return 0 !== this.uint32() }, n.prototype.fixed32 = function () { if (this.pos + 4 > this.len) throw r(this, 4); return o(this.buf, this.pos += 4) }, n.prototype.sfixed32 = function () { if (this.pos + 4 > this.len) throw r(this, 4); return 0 | o(this.buf, this.pos += 4) }, n.prototype.float = function () { if (this.pos + 4 > this.len) throw r(this, 4); var e = u.float.readFloatLE(this.buf, this.pos); return this.pos += 4, e }, n.prototype.double = function () { if (this.pos + 8 > this.len) throw r(this, 4); var e = u.float.readDoubleLE(this.buf, this.pos); return this.pos += 8, e }, n.prototype.bytes = function () { var e = this.uint32(), t = this.pos, n = this.pos + e; if (n > this.len) throw r(this, e); return this.pos += e, Array.isArray(this.buf) ? this.buf.slice(t, n) : t === n ? new this.buf.constructor(0) : this.i.call(this.buf, t, n) }, n.prototype.string = function () { var e = this.bytes(); return l.read(e, 0, e.length) }, n.prototype.skip = function (e) { if ("number" == typeof e) { if (this.pos + e > this.len) throw r(this, e); this.pos += e } else do { if (this.pos >= this.len) throw r(this) } while (128 & this.buf[this.pos++]); return this }, n.prototype.skipType = function (e) { switch (e) { case 0: this.skip(); break; case 1: this.skip(8); break; case 2: this.skip(this.uint32()); break; case 3: for (; ;) { if (4 == (e = 7 & this.uint32())) break; this.skipType(e) } break; case 5: this.skip(4); break; default: throw Error("invalid wire type " + e + " at offset " + this.pos) }return this }, n.e = function (e) { a = e; var t = u.Long ? "toLong" : "toNumber"; u.merge(n.prototype, { int64: function () { return i.call(this)[t](!1) }, uint64: function () { return i.call(this)[t](!0) }, sint64: function () { return i.call(this).zzDecode()[t](!1) }, fixed64: function () { return s.call(this)[t](!0) }, sfixed64: function () { return s.call(this)[t](!1) } }) } }, { 39: 39 }], 28: [function (e, t) { function r(e) { n.call(this, e) } t.exports = r; var n = e(27); (r.prototype = Object.create(n.prototype)).constructor = r; var i = e(39); i.Buffer && (r.prototype.i = i.Buffer.prototype.slice), r.prototype.string = function () { var e = this.uint32(); return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + e, this.len)) } }, { 27: 27, 39: 39 }], 29: [function (e, r) { function n(e) { s.call(this, "", e), this.deferred = [], this.files = [] } function i() { } function o(e, r) { var n = r.parent.lookup(r.extend); if (n) { var i = new l(r.fullName, r.id, r.type, r.rule, t, r.options); return i.declaringField = r, r.extensionField = i, n.add(i), !0 } return !1 } r.exports = n; var s = e(23); ((n.prototype = Object.create(s.prototype)).constructor = n).className = "Root"; var a, u, f, l = e(16), p = e(15), c = e(25), h = e(37); n.fromJSON = function (e, t) { return t || (t = new n), e.options && t.setOptions(e.options), t.addJSON(e.nested) }, n.prototype.resolvePath = h.path.resolve, n.prototype.load = function e(r, n, o) { function s(e, t) { if (o) { var r = o; if (o = null, c) throw e; r(e, t) } } function a(e, t) { try { if (h.isString(t) && "{" === t.charAt(0) && (t = JSON.parse(t)), h.isString(t)) { u.filename = e; var r, i = u(t, p, n), o = 0; if (i.imports) for (; o < i.imports.length; ++o)(r = p.resolvePath(e, i.imports[o])) && l(r); if (i.weakImports) for (o = 0; o < i.weakImports.length; ++o)(r = p.resolvePath(e, i.weakImports[o])) && l(r, !0) } else p.setOptions(t.options).addJSON(t.nested) } catch (e) { s(e) } c || d || s(null, p) } function l(e, t) { var r = e.lastIndexOf("google/protobuf/"); if (r > -1) { var n = e.substring(r); n in f && (e = n) } if (!(p.files.indexOf(e) > -1)) { if (p.files.push(e), e in f) return void (c ? a(e, f[e]) : (++d, setTimeout(function () { --d, a(e, f[e]) }))); if (c) { var i; try { i = h.fs.readFileSync(e).toString("utf8") } catch (e) { return void (t || s(e)) } a(e, i) } else ++d, h.fetch(e, function (r, n) { if (--d, o) return r ? void (t ? d || s(null, p) : s(r)) : void a(e, n) }) } } "function" == typeof n && (o = n, n = t); var p = this; if (!o) return h.asPromise(e, p, r, n); var c = o === i, d = 0; h.isString(r) && (r = [r]); for (var y, v = 0; v < r.length; ++v)(y = p.resolvePath("", r[v])) && l(y); return c ? p : (d || s(null, p), t) }, n.prototype.loadSync = function (e, t) { if (!h.isNode) throw Error("not supported"); return this.load(e, t, i) }, n.prototype.resolveAll = function () { if (this.deferred.length) throw Error("unresolvable extensions: " + this.deferred.map(function (e) { return "'extend " + e.extend + "' in " + e.parent.fullName }).join(", ")); return s.prototype.resolveAll.call(this) }; var d = /^[A-Z]/; n.prototype.g = function (e) { if (e instanceof l) e.extend === t || e.extensionField || o(this, e) || this.deferred.push(e); else if (e instanceof p) d.test(e.name) && (e.parent[e.name] = e.values); else if (!(e instanceof c)) { if (e instanceof a) for (var r = 0; r < this.deferred.length;)o(this, this.deferred[r]) ? this.deferred.splice(r, 1) : ++r; for (var n = 0; n < e.nestedArray.length; ++n)this.g(e.f[n]); d.test(e.name) && (e.parent[e.name] = e) } }, n.prototype.h = function (e) { if (e instanceof l) { if (e.extend !== t) if (e.extensionField) e.extensionField.parent.remove(e.extensionField), e.extensionField = null; else { var r = this.deferred.indexOf(e); r > -1 && this.deferred.splice(r, 1) } } else if (e instanceof p) d.test(e.name) && delete e.parent[e.name]; else if (e instanceof s) { for (var n = 0; n < e.nestedArray.length; ++n)this.h(e.f[n]); d.test(e.name) && delete e.parent[e.name] } }, n.e = function (e, t, r) { a = e, u = t, f = r } }, { 15: 15, 16: 16, 23: 23, 25: 25, 37: 37 }], 30: [function (e, t) { t.exports = {} }, {}], 31: [function (e, t, r) { r.Service = e(32) }, { 32: 32 }], 32: [function (e, r) { function n(e, t, r) { if ("function" != typeof e) throw TypeError("rpcImpl must be a function"); i.EventEmitter.call(this), this.rpcImpl = e, this.requestDelimited = !!t, this.responseDelimited = !!r } r.exports = n; var i = e(39); (n.prototype = Object.create(i.EventEmitter.prototype)).constructor = n, n.prototype.rpcCall = function e(r, n, o, s, a) { if (!s) throw TypeError("request must be specified"); var u = this; if (!a) return i.asPromise(e, u, r, n, o, s); if (!u.rpcImpl) return setTimeout(function () { a(Error("already ended")) }, 0), t; try { return u.rpcImpl(r, n[u.requestDelimited ? "encodeDelimited" : "encode"](s).finish(), function (e, n) { if (e) return u.emit("error", e, r), a(e); if (null === n) return u.end(!0), t; if (!(n instanceof o)) try { n = o[u.responseDelimited ? "decodeDelimited" : "decode"](n) } catch (e) { return u.emit("error", e, r), a(e) } return u.emit("data", n, r), a(null, n) }) } catch (e) { return u.emit("error", e, r), setTimeout(function () { a(e) }, 0), t } }, n.prototype.end = function (e) { return this.rpcImpl && (e || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this } }, { 39: 39 }], 33: [function (e, r) { function n(e, t) { o.call(this, e, t), this.methods = {}, this.j = null } function i(e) { return e.j = null, e } r.exports = n; var o = e(23); ((n.prototype = Object.create(o.prototype)).constructor = n).className = "Service"; var s = e(22), a = e(37), u = e(31); n.fromJSON = function (e, t) { var r = new n(e, t.options); if (t.methods) for (var i = Object.keys(t.methods), o = 0; o < i.length; ++o)r.add(s.fromJSON(i[o], t.methods[i[o]])); return t.nested && r.addJSON(t.nested), r }, n.prototype.toJSON = function () { var e = o.prototype.toJSON.call(this); return a.toObject(["options", e && e.options || t, "methods", o.arrayToJSON(this.methodsArray) || {}, "nested", e && e.nested || t]) }, Object.defineProperty(n.prototype, "methodsArray", { get: function () { return this.j || (this.j = a.toArray(this.methods)) } }), n.prototype.get = function (e) { return this.methods[e] || o.prototype.get.call(this, e) }, n.prototype.resolveAll = function () { for (var e = this.methodsArray, t = 0; t < e.length; ++t)e[t].resolve(); return o.prototype.resolve.call(this) }, n.prototype.add = function (e) { if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " + this); return e instanceof s ? (this.methods[e.name] = e, e.parent = this, i(this)) : o.prototype.add.call(this, e) }, n.prototype.remove = function (e) { if (e instanceof s) { if (this.methods[e.name] !== e) throw Error(e + " is not a member of " + this); return delete this.methods[e.name], e.parent = null, i(this) } return o.prototype.remove.call(this, e) }, n.prototype.create = function (e, t, r) { for (var n, i = new u.Service(e, t, r), o = 0; o < this.methodsArray.length; ++o) { var s = a.lcFirst((n = this.j[o]).resolve().name).replace(/[^$\w_]/g, ""); i[s] = a.codegen(["r", "c"], a.isReserved(s) ? s + "_" : s)("return this.rpcCall(m,q,s,r,c)")({ m: n, q: n.resolvedRequestType.ctor, s: n.resolvedResponseType.ctor }) } return i } }, { 22: 22, 23: 23, 31: 31, 37: 37 }], 34: [function (e, r) { function n(e) { return e.replace(p, function (e, t) { switch (t) { case "\\": case "": return t; default: return c[t] || "" } }) } function i(e) { function r(e) { return Error("illegal " + e + " (line " + w + ")") } function i() { var t = "'" === S ? a : s; t.lastIndex = g - 1; var i = t.exec(e); if (!i) throw r("string"); return g = t.lastIndex, d(S), S = null, n(i[1]) } function p(t) { return e.charAt(t) } function c(t, r) { O = e.charAt(t++), j = w, x = !1; var n, i = t - 3; do { if (--i < 0 || "\n" === (n = e.charAt(i))) { x = !0; break } } while (" " === n || "\t" === n); for (var o = e.substring(t, r).split(f), s = 0; s < o.length; ++s)o[s] = o[s].replace(u, "").trim(); k = o.join("\n").trim() } function h() { if (A.length > 0) return A.shift(); if (S) return i(); var t, n, s, a, u; do { if (g === b) return null; for (t = !1; l.test(s = p(g));)if ("\n" === s && ++w, ++g === b) return null; if ("/" === p(g)) { if (++g === b) throw r("comment"); if ("/" === p(g)) { for (u = "/" === p(a = g + 1); "\n" !== p(++g);)if (g === b) return null; ++g, u && c(a, g - 1), ++w, t = !0 } else { if ("*" !== (s = p(g))) return "/"; u = "*" === p(a = g + 1); do { if ("\n" === s && ++w, ++g === b) throw r("comment"); n = s, s = p(g) } while ("*" !== n || "/" !== s); ++g, u && c(a, g - 2), t = !0 } } } while (t); var f = g; if (o.lastIndex = 0, !o.test(p(f++))) for (; f < b && !o.test(p(f));)++f; var h = e.substring(g, g = f); return '"' !== h && "'" !== h || (S = h), h } function d(e) { A.push(e) } function y() { if (!A.length) { var e = h(); if (null === e) return null; d(e) } return A[0] } function v(e, t) { var n = y(); if (n === e) return h(), !0; if (!t) throw r("token '" + n + "', '" + e + "' expected"); return !1 } function m(e) { var r = null; return e === t ? j !== w - 1 || "*" !== O && !x || (r = k) : (j < e && y(), j !== e || x || "/" !== O || (r = k)), r } e = "" + e; var g = 0, b = e.length, w = 1, O = null, k = null, j = 0, x = !1, A = [], S = null; return Object.defineProperty({ next: h, peek: y, push: d, skip: v, cmnt: m }, "line", { get: function () { return w } }) } r.exports = i; var o = /[\s{}=;:[\],'"()<>]/g, s = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, a = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, u = /^ *[*\/]+ */, f = /\n/g, l = /\s/, p = /\\(.?)/g, c = { 0: "\0", r: "\r", n: "\n", t: "\t" }; i.unescape = n }, {}], 35: [function (e, r) { function n(e, r) { o.call(this, e, r), this.fields = {}, this.oneofs = t, this.extensions = t, this.reserved = t, this.group = t, this.k = null, this.b = null, this.l = null, this.o = null } function i(e) { return e.k = e.b = e.l = null, delete e.encode, delete e.decode, delete e.verify, e } r.exports = n; var o = e(23); ((n.prototype = Object.create(o.prototype)).constructor = n).className = "Type"; var s = e(15), a = e(25), u = e(16), f = e(20), l = e(33), p = e(21), c = e(27), h = e(42), d = e(37), y = e(14), v = e(13), m = e(40), g = e(12), b = e(41); Object.defineProperties(n.prototype, { fieldsById: { get: function () { if (this.k) return this.k; this.k = {}; for (var e = Object.keys(this.fields), t = 0; t < e.length; ++t) { var r = this.fields[e[t]], n = r.id; if (this.k[n]) throw Error("duplicate id " + n + " in " + this); this.k[n] = r } return this.k } }, fieldsArray: { get: function () { return this.b || (this.b = d.toArray(this.fields)) } }, oneofsArray: { get: function () { return this.l || (this.l = d.toArray(this.oneofs)) } }, ctor: { get: function () { return this.o || (this.ctor = n.generateConstructor(this)()) }, set: function (e) { var t = e.prototype; t instanceof p || ((e.prototype = new p).constructor = e, d.merge(e.prototype, t)), e.$type = e.prototype.$type = this, d.merge(e, p, !0), this.o = e; for (var r = 0; r < this.fieldsArray.length; ++r)this.b[r].resolve(); var n = {}; for (r = 0; r < this.oneofsArray.length; ++r)n[this.l[r].resolve().name] = { get: d.oneOfGetter(this.l[r].oneof), set: d.oneOfSetter(this.l[r].oneof) }; r && Object.defineProperties(e.prototype, n) } } }), n.generateConstructor = function (e) { for (var t, r = d.codegen(["p"], e.name), n = 0; n < e.fieldsArray.length; ++n)(t = e.b[n]).map ? r("this%s={}", d.safeProp(t.name)) : t.repeated && r("this%s=[]", d.safeProp(t.name)); return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]") }, n.fromJSON = function (e, r) { var i = new n(e, r.options); i.extensions = r.extensions, i.reserved = r.reserved; for (var p = Object.keys(r.fields), c = 0; c < p.length; ++c)i.add((t !== r.fields[p[c]].keyType ? f.fromJSON : u.fromJSON)(p[c], r.fields[p[c]])); if (r.oneofs) for (p = Object.keys(r.oneofs), c = 0; c < p.length; ++c)i.add(a.fromJSON(p[c], r.oneofs[p[c]])); if (r.nested) for (p = Object.keys(r.nested), c = 0; c < p.length; ++c) { var h = r.nested[p[c]]; i.add((h.id !== t ? u.fromJSON : h.fields !== t ? n.fromJSON : h.values !== t ? s.fromJSON : h.methods !== t ? l.fromJSON : o.fromJSON)(p[c], h)) } return r.extensions && r.extensions.length && (i.extensions = r.extensions), r.reserved && r.reserved.length && (i.reserved = r.reserved), r.group && (i.group = !0), i }, n.prototype.toJSON = function () { var e = o.prototype.toJSON.call(this); return d.toObject(["options", e && e.options || t, "oneofs", o.arrayToJSON(this.oneofsArray), "fields", o.arrayToJSON(this.fieldsArray.filter(function (e) { return !e.declaringField })) || {}, "extensions", this.extensions && this.extensions.length ? this.extensions : t, "reserved", this.reserved && this.reserved.length ? this.reserved : t, "group", this.group || t, "nested", e && e.nested || t]) }, n.prototype.resolveAll = function () { for (var e = this.fieldsArray, t = 0; t < e.length;)e[t++].resolve(); var r = this.oneofsArray; for (t = 0; t < r.length;)r[t++].resolve(); return o.prototype.resolveAll.call(this) }, n.prototype.get = function (e) { return this.fields[e] || this.oneofs && this.oneofs[e] || this.nested && this.nested[e] || null }, n.prototype.add = function (e) { if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " + this); if (e instanceof u && e.extend === t) { if (this.k ? this.k[e.id] : this.fieldsById[e.id]) throw Error("duplicate id " + e.id + " in " + this); if (this.isReservedId(e.id)) throw Error("id " + e.id + " is reserved in " + this); if (this.isReservedName(e.name)) throw Error("name '" + e.name + "' is reserved in " + this); return e.parent && e.parent.remove(e), this.fields[e.name] = e, e.message = this, e.onAdd(this), i(this) } return e instanceof a ? (this.oneofs || (this.oneofs = {}), this.oneofs[e.name] = e, e.onAdd(this), i(this)) : o.prototype.add.call(this, e) }, n.prototype.remove = function (e) { if (e instanceof u && e.extend === t) { if (!this.fields || this.fields[e.name] !== e) throw Error(e + " is not a member of " + this); return delete this.fields[e.name], e.parent = null, e.onRemove(this), i(this) } if (e instanceof a) { if (!this.oneofs || this.oneofs[e.name] !== e) throw Error(e + " is not a member of " + this); return delete this.oneofs[e.name], e.parent = null, e.onRemove(this), i(this) } return o.prototype.remove.call(this, e) }, n.prototype.isReservedId = function (e) { return o.isReservedId(this.reserved, e) }, n.prototype.isReservedName = function (e) { return o.isReservedName(this.reserved, e) }, n.prototype.create = function (e) { return new this.ctor(e) }, n.prototype.setup = function () { for (var e = this.fullName, t = [], r = 0; r < this.fieldsArray.length; ++r)t.push(this.b[r].resolve().resolvedType); this.encode = y(this)({ Writer: h, types: t, util: d }), this.decode = v(this)({ Reader: c, types: t, util: d }), this.verify = m(this)({ types: t, util: d }), this.fromObject = g.fromObject(this)({ types: t, util: d }), this.toObject = g.toObject(this)({ types: t, util: d }); var n = b[e]; if (n) { var i = Object.create(this); i.fromObject = this.fromObject, this.fromObject = n.fromObject.bind(i), i.toObject = this.toObject, this.toObject = n.toObject.bind(i) } return this }, n.prototype.encode = function (e, t) { return this.setup().encode(e, t) }, n.prototype.encodeDelimited = function (e, t) { return this.encode(e, t && t.len ? t.fork() : t).ldelim() }, n.prototype.decode = function (e, t) { return this.setup().decode(e, t) }, n.prototype.decodeDelimited = function (e) { return e instanceof c || (e = c.create(e)), this.decode(e, e.uint32()) }, n.prototype.verify = function (e) { return this.setup().verify(e) }, n.prototype.fromObject = function (e) { return this.setup().fromObject(e) }, n.prototype.toObject = function (e, t) { return this.setup().toObject(e, t) }, n.d = function (e) { return function (t) { d.decorateType(t, e) } } }, { 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 20: 20, 21: 21, 23: 23, 25: 25, 27: 27, 33: 33, 37: 37, 40: 40, 41: 41, 42: 42 }], 36: [function (e, t, r) { function n(e, t) { var r = 0, n = {}; for (t |= 0; r < e.length;)n[s[r + t]] = e[r++]; return n } var i = r, o = e(37), s = ["double", "float", "int32", "uint32", "sint32", "fixed32", "sfixed32", "int64", "uint64", "sint64", "fixed64", "sfixed64", "bool", "string", "bytes"]; i.basic = n([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2, 2]), i.defaults = n([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, !1, "", o.emptyArray, null]), i.long = n([0, 0, 0, 1, 1], 7), i.mapKey = n([0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2], 2), i.packed = n([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0]) }, { 37: 37 }], 37: [function (e, r) { var n, i, o = r.exports = e(39), s = e(30); o.codegen = e(3), o.fetch = e(5), o.path = e(8), o.fs = o.inquire("fs"), o.toArray = function (e) { if (e) { for (var t = Object.keys(e), r = Array(t.length), n = 0; n < t.length;)r[n] = e[t[n++]]; return r } return [] }, o.toObject = function (e) { for (var r = {}, n = 0; n < e.length;) { var i = e[n++], o = e[n++]; o !== t && (r[i] = o) } return r }; var a = /\\/g, u = /"/g; o.isReserved = function (e) { return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e) }, o.safeProp = function (e) { return !/^[$\w_]+$/.test(e) || o.isReserved(e) ? '["' + e.replace(a, "\\\\").replace(u, '\\"') + '"]' : "." + e }, o.ucFirst = function (e) { return e.charAt(0).toUpperCase() + e.substring(1) }; var f = /_([a-z])/g; o.camelCase = function (e) { return e.substring(0, 1) + e.substring(1).replace(f, function (e, t) { return t.toUpperCase() }) }, o.compareFieldsById = function (e, t) { return e.id - t.id }, o.decorateType = function (t, r) { if (t.$type) return r && t.$type.name !== r && (o.decorateRoot.remove(t.$type), t.$type.name = r, o.decorateRoot.add(t.$type)), t.$type; n || (n = e(35)); var i = new n(r || t.name); return o.decorateRoot.add(i), i.ctor = t, Object.defineProperty(t, "$type", { value: i, enumerable: !1 }), Object.defineProperty(t.prototype, "$type", { value: i, enumerable: !1 }), i }; var l = 0; o.decorateEnum = function (t) { if (t.$type) return t.$type; i || (i = e(15)); var r = new i("Enum" + l++, t); return o.decorateRoot.add(r), Object.defineProperty(t, "$type", { value: r, enumerable: !1 }), r }, Object.defineProperty(o, "decorateRoot", { get: function () { return s.decorated || (s.decorated = new (e(29))) } }) }, { 15: 15, 29: 29, 3: 3, 30: 30, 35: 35, 39: 39, 5: 5, 8: 8 }], 38: [function (e, t) { function r(e, t) { this.lo = e >>> 0, this.hi = t >>> 0 } t.exports = r; var n = e(39), i = r.zero = new r(0, 0); i.toNumber = function () { return 0 }, i.zzEncode = i.zzDecode = function () { return this }, i.length = function () { return 1 }; var o = r.zeroHash = "\0\0\0\0\0\0\0\0"; r.fromNumber = function (e) { if (0 === e) return i; var t = e < 0; t && (e = -e); var n = e >>> 0, o = (e - n) / 4294967296 >>> 0; return t && (o = ~o >>> 0, n = ~n >>> 0, ++n > 4294967295 && (n = 0, ++o > 4294967295 && (o = 0))), new r(n, o) }, r.from = function (e) { if ("number" == typeof e) return r.fromNumber(e); if (n.isString(e)) { if (!n.Long) return r.fromNumber(parseInt(e, 10)); e = n.Long.fromString(e) } return e.low || e.high ? new r(e.low >>> 0, e.high >>> 0) : i }, r.prototype.toNumber = function (e) { if (!e && this.hi >>> 31) { var t = 1 + ~this.lo >>> 0, r = ~this.hi >>> 0; return t || (r = r + 1 >>> 0), -(t + 4294967296 * r) } return this.lo + 4294967296 * this.hi }, r.prototype.toLong = function (e) { return n.Long ? new n.Long(0 | this.lo, 0 | this.hi, !!e) : { low: 0 | this.lo, high: 0 | this.hi, unsigned: !!e } }; var s = String.prototype.charCodeAt; r.fromHash = function (e) { return e === o ? i : new r((s.call(e, 0) | s.call(e, 1) << 8 | s.call(e, 2) << 16 | s.call(e, 3) << 24) >>> 0, (s.call(e, 4) | s.call(e, 5) << 8 | s.call(e, 6) << 16 | s.call(e, 7) << 24) >>> 0) }, r.prototype.toHash = function () { return String.fromCharCode(255 & this.lo, this.lo >>> 8 & 255, this.lo >>> 16 & 255, this.lo >>> 24, 255 & this.hi, this.hi >>> 8 & 255, this.hi >>> 16 & 255, this.hi >>> 24) }, r.prototype.zzEncode = function () { var e = this.hi >> 31; return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ e) >>> 0, this.lo = (this.lo << 1 ^ e) >>> 0, this }, r.prototype.zzDecode = function () { var e = -(1 & this.lo); return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ e) >>> 0, this.hi = (this.hi >>> 1 ^ e) >>> 0, this }, r.prototype.length = function () { var e = this.lo, t = (this.lo >>> 28 | this.hi << 4) >>> 0, r = this.hi >>> 24; return 0 === r ? 0 === t ? e < 16384 ? e < 128 ? 1 : 2 : e < 2097152 ? 3 : 4 : t < 16384 ? t < 128 ? 5 : 6 : t < 2097152 ? 7 : 8 : r < 128 ? 9 : 10 } }, { 39: 39 }], 39: [function (r, n, i) { function o(e, r, n) { for (var i = Object.keys(r), o = 0; o < i.length; ++o)e[i[o]] !== t && n || (e[i[o]] = r[i[o]]); return e } function s(e) { function t(e, r) { if (!(this instanceof t)) return new t(e, r); Object.defineProperty(this, "message", { get: function () { return e } }), Error.captureStackTrace ? Error.captureStackTrace(this, t) : Object.defineProperty(this, "stack", { value: Error().stack || "" }), r && o(this, r) } return (t.prototype = Object.create(Error.prototype)).constructor = t, Object.defineProperty(t.prototype, "name", { get: function () { return e } }), t.prototype.toString = function () { return this.name + ": " + this.message }, t } var a = i; a.asPromise = r(1), a.base64 = r(2), a.EventEmitter = r(4), a.float = r(6), a.inquire = r(7), a.utf8 = r(10), a.pool = r(9), a.LongBits = r(38), a.emptyArray = Object.freeze ? Object.freeze([]) : [], a.emptyObject = Object.freeze ? Object.freeze({}) : {}, a.isNode = !!(e.process && e.process.versions && e.process.versions.node), a.isInteger = Number.isInteger || function (e) { return "number" == typeof e && isFinite(e) && Math.floor(e) === e }, a.isString = function (e) { return "string" == typeof e || e instanceof String }, a.isObject = function (e) { return e && "object" == typeof e }, a.isset = a.isSet = function (e, t) { var r = e[t]; return !(null == r || !e.hasOwnProperty(t)) && ("object" != typeof r || (Array.isArray(r) ? r.length : Object.keys(r).length) > 0) }, a.Buffer = function () { try { var e = a.inquire("buffer").Buffer; return e.prototype.utf8Write ? e : null } catch (e) { return null } }(), a.p = null, a.u = null, a.newBuffer = function (e) { return "number" == typeof e ? a.Buffer ? a.u(e) : new a.Array(e) : a.Buffer ? a.p(e) : "undefined" == typeof Uint8Array ? e : new Uint8Array(e) }, a.Array = "undefined" != typeof Uint8Array ? Uint8Array : Array, a.Long = e.dcodeIO && e.dcodeIO.Long || a.inquire("long"), a.key2Re = /^true|false|0|1$/, a.key32Re = /^-?(?:0|[1-9][0-9]*)$/, a.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, a.longToHash = function (e) { return e ? a.LongBits.from(e).toHash() : a.LongBits.zeroHash }, a.longFromHash = function (e, t) { var r = a.LongBits.fromHash(e); return a.Long ? a.Long.fromBits(r.lo, r.hi, t) : r.toNumber(!!t) }, a.merge = o, a.lcFirst = function (e) { return e.charAt(0).toLowerCase() + e.substring(1) }, a.newError = s, a.ProtocolError = s("ProtocolError"), a.oneOfGetter = function (e) { for (var r = {}, n = 0; n < e.length; ++n)r[e[n]] = 1; return function () { for (var e = Object.keys(this), n = e.length - 1; n > -1; --n)if (1 === r[e[n]] && this[e[n]] !== t && null !== this[e[n]]) return e[n] } }, a.oneOfSetter = function (e) { return function (t) { for (var r = 0; r < e.length; ++r)e[r] !== t && delete this[e[r]] } }, a.toJSONOptions = { longs: String, enums: String, bytes: String, json: !0 }, a.e = function () { var e = a.Buffer; if (!e) return void (a.p = a.u = null); a.p = e.from !== Uint8Array.from && e.from || function (t, r) { return new e(t, r) }, a.u = e.allocUnsafe || function (t) { return new e(t) } } }, { 1: 1, 10: 10, 2: 2, 38: 38, 4: 4, 6: 6, 7: 7, 9: 9 }], 40: [function (e, t) { function r(e, t) { return e.name + ": " + t + (e.repeated && "array" !== t ? "[]" : e.map && "object" !== t ? "{k:" + e.keyType + "}" : "") + " expected" } function n(e, t, n, i) { if (t.resolvedType) if (t.resolvedType instanceof s) { e("switch(%s){", i)("default:")("return%j", r(t, "enum value")); for (var o = Object.keys(t.resolvedType.values), a = 0; a < o.length; ++a)e("case %i:", t.resolvedType.values[o[a]]); e("break")("}") } else e("{")("var e=types[%i].verify(%s);", n, i)("if(e)")("return%j+e", t.name + ".")("}"); else switch (t.type) { case "int32": case "uint32": case "sint32": case "fixed32": case "sfixed32": e("if(!util.isInteger(%s))", i)("return%j", r(t, "integer")); break; case "int64": case "uint64": case "sint64": case "fixed64": case "sfixed64": e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", i, i, i, i)("return%j", r(t, "integer|Long")); break; case "float": case "double": e('if(typeof %s!=="number")', i)("return%j", r(t, "number")); break; case "bool": e('if(typeof %s!=="boolean")', i)("return%j", r(t, "boolean")); break; case "string": e("if(!util.isString(%s))", i)("return%j", r(t, "string")); break; case "bytes": e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))', i, i, i)("return%j", r(t, "buffer")) }return e } function i(e, t, n) { switch (t.keyType) { case "int32": case "uint32": case "sint32": case "fixed32": case "sfixed32": e("if(!util.key32Re.test(%s))", n)("return%j", r(t, "integer key")); break; case "int64": case "uint64": case "sint64": case "fixed64": case "sfixed64": e("if(!util.key64Re.test(%s))", n)("return%j", r(t, "integer|Long key")); break; case "bool": e("if(!util.key2Re.test(%s))", n)("return%j", r(t, "boolean key")) }return e } function o(e) { var t = a.codegen(["m"], e.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), o = e.oneofsArray, s = {}; o.length && t("var p={}"); for (var u = 0; u < e.fieldsArray.length; ++u) { var f = e.b[u].resolve(), l = "m" + a.safeProp(f.name); if (f.optional && t("if(%s!=null&&m.hasOwnProperty(%j)){", l, f.name), f.map) t("if(!util.isObject(%s))", l)("return%j", r(f, "object"))("var k=Object.keys(%s)", l)("for(var i=0;i<k.length;++i){"), i(t, f, "k[i]"), n(t, f, u, l + "[k[i]]")("}"); else if (f.repeated) t("if(!Array.isArray(%s))", l)("return%j", r(f, "array"))("for(var i=0;i<%s.length;++i){", l), n(t, f, u, l + "[i]")("}"); else { if (f.partOf) { var p = a.safeProp(f.partOf.name); 1 === s[f.partOf.name] && t("if(p%s===1)", p)("return%j", f.partOf.name + ": multiple values"), s[f.partOf.name] = 1, t("p%s=1", p) } n(t, f, u, l) } f.optional && t("}") } return t("return null") } t.exports = o; var s = e(15), a = e(37) }, { 15: 15, 37: 37 }], 41: [function (e, t, r) { var n = r, i = e(21); n[".google.protobuf.Any"] = { fromObject: function (e) { if (e && e["@type"]) { var t = this.lookup(e["@type"]); if (t) { var r = "." === e["@type"].charAt(0) ? e["@type"].substr(1) : e["@type"]; return this.create({ type_url: "/" + r, value: t.encode(t.fromObject(e)).finish() }) } } return this.fromObject(e) }, toObject: function (e, t) { if (t && t.json && e.type_url && e.value) { var r = e.type_url.substring(e.type_url.lastIndexOf("/") + 1), n = this.lookup(r); n && (e = n.decode(e.value)) } if (!(e instanceof this.ctor) && e instanceof i) { var o = e.$type.toObject(e, t); return o["@type"] = e.$type.fullName, o } return this.toObject(e, t) } } }, { 21: 21 }], 42: [function (e, r) { function n(e, r, n) { this.fn = e, this.len = r, this.next = t, this.val = n } function i() { } function o(e) { this.head = e.head, this.tail = e.tail, this.len = e.len, this.next = e.states } function s() { this.len = 0, this.head = new n(i, 0, 0), this.tail = this.head, this.states = null } function a(e, t, r) { t[r] = 255 & e } function u(e, t, r) { for (; e > 127;)t[r++] = 127 & e | 128, e >>>= 7; t[r] = e } function f(e, r) { this.len = e, this.next = t, this.val = r } function l(e, t, r) { for (; e.hi;)t[r++] = 127 & e.lo | 128, e.lo = (e.lo >>> 7 | e.hi << 25) >>> 0, e.hi >>>= 7; for (; e.lo > 127;)t[r++] = 127 & e.lo | 128, e.lo = e.lo >>> 7; t[r++] = e.lo } function p(e, t, r) { t[r] = 255 & e, t[r + 1] = e >>> 8 & 255, t[r + 2] = e >>> 16 & 255, t[r + 3] = e >>> 24 } r.exports = s; var c, h = e(39), d = h.LongBits, y = h.base64, v = h.utf8; s.create = h.Buffer ? function () { return (s.create = function () { return new c })() } : function () { return new s }, s.alloc = function (e) { return new h.Array(e) }, h.Array !== Array && (s.alloc = h.pool(s.alloc, h.Array.prototype.subarray)), s.prototype.v = function (e, t, r) { return this.tail = this.tail.next = new n(e, t, r), this.len += t, this }, f.prototype = Object.create(n.prototype), f.prototype.fn = u, s.prototype.uint32 = function (e) { return this.len += (this.tail = this.tail.next = new f((e >>>= 0) < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5, e)).len, this }, s.prototype.int32 = function (e) { return e < 0 ? this.v(l, 10, d.fromNumber(e)) : this.uint32(e) }, s.prototype.sint32 = function (e) { return this.uint32((e << 1 ^ e >> 31) >>> 0) }, s.prototype.uint64 = function (e) { var t = d.from(e); return this.v(l, t.length(), t) }, s.prototype.int64 = s.prototype.uint64, s.prototype.sint64 = function (e) { var t = d.from(e).zzEncode(); return this.v(l, t.length(), t) }, s.prototype.bool = function (e) { return this.v(a, 1, e ? 1 : 0) }, s.prototype.fixed32 = function (e) { return this.v(p, 4, e >>> 0) }, s.prototype.sfixed32 = s.prototype.fixed32, s.prototype.fixed64 = function (e) { var t = d.from(e); return this.v(p, 4, t.lo).v(p, 4, t.hi) }, s.prototype.sfixed64 = s.prototype.fixed64, s.prototype.float = function (e) { return this.v(h.float.writeFloatLE, 4, e) }, s.prototype.double = function (e) { return this.v(h.float.writeDoubleLE, 8, e) }; var m = h.Array.prototype.set ? function (e, t, r) { t.set(e, r) } : function (e, t, r) { for (var n = 0; n < e.length; ++n)t[r + n] = e[n] }; s.prototype.bytes = function (e) { var t = e.length >>> 0; if (!t) return this.v(a, 1, 0); if (h.isString(e)) { var r = s.alloc(t = y.length(e)); y.decode(e, r, 0), e = r } return this.uint32(t).v(m, t, e) }, s.prototype.string = function (e) { var t = v.length(e); return t ? this.uint32(t).v(v.write, t, e) : this.v(a, 1, 0) }, s.prototype.fork = function () { return this.states = new o(this), this.head = this.tail = new n(i, 0, 0), this.len = 0, this }, s.prototype.reset = function () { return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new n(i, 0, 0), this.len = 0), this }, s.prototype.ldelim = function () { var e = this.head, t = this.tail, r = this.len; return this.reset().uint32(r), r && (this.tail.next = e.next, this.tail = t, this.len += r), this }, s.prototype.finish = function () { for (var e = this.head.next, t = this.constructor.alloc(this.len), r = 0; e;)e.fn(e.val, t, r), r += e.len, e = e.next; return t }, s.e = function (e) { c = e } }, { 39: 39 }], 43: [function (e, t) { function r() { i.call(this) } function n(e, t, r) { e.length < 40 ? o.utf8.write(e, t, r) : t.utf8Write(e, r) } t.exports = r; var i = e(42); (r.prototype = Object.create(i.prototype)).constructor = r; var o = e(39), s = o.Buffer; r.alloc = function (e) { return (r.alloc = o.u)(e) }; var a = s && s.prototype instanceof Uint8Array && "set" === s.prototype.set.name ? function (e, t, r) { t.set(e, r) } : function (e, t, r) { if (e.copy) e.copy(t, r, 0, e.length); else for (var n = 0; n < e.length;)t[r++] = e[n++] }; r.prototype.bytes = function (e) { o.isString(e) && (e = o.p(e, "base64")); var t = e.length >>> 0; return this.uint32(t), t && this.v(a, t, e), this }, r.prototype.string = function (e) { var t = s.byteLength(e); return this.uint32(t), t && this.v(n, t, e), this } }, { 39: 39, 42: 42 }] }, {}, [19]) }("object" == typeof window && window || "object" == typeof self && self || this); //# sourceMappingURL=protobuf.min.js.map
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class FillNameTransform { constructor() { this.name = "fillName"; } transform(schemaCtx) { const schema = schemaCtx.schema; for (const globName of Object.keys(schema.globals)) schema.globals[globName].name = globName; for (const enumName of Object.keys(schema.enums)) schema.enums[enumName].name = enumName; for (const intfName of Object.keys(schema.interfaces)) schema.interfaces[intfName].name = intfName; for (const className of Object.keys(schema.classes)) { const cls = schema.classes[className]; cls.name = className; if (cls.constructor) cls.constructor.name = "constructor"; for (const propName of Object.keys(cls.properties)) cls.properties[propName].name = propName; for (const fieldName of Object.keys(cls.fields)) cls.fields[fieldName].name = fieldName; for (const methodName of Object.keys(cls.methods)) cls.methods[methodName].name = methodName; } } } exports.FillNameTransform = FillNameTransform; }); //# sourceMappingURL=FillNameTransform.js.map
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'colordialog', 'km', { clear: 'សម្អាត', highlight: 'បន្លិច​ពណ៌', options: 'ជម្រើស​ពណ៌', selected: 'ពណ៌​ដែល​បាន​រើស', title: 'រើស​ពណ៌' } );
/* VRT - Copyright © 2014 Odd Marthon Lende All Rights Reserved */ define([ 'types/widget' ], function ( Widget ) { function BarGraph (fields) { Widget.call(this, fields); } BarGraph.prototype = Object.create(Widget.prototype); BarGraph.required = { '(options)' : { '(align)' : String, '(stacked)' : Boolean, '(hideLabels)' : Boolean, '(blur)' : Number, '(colors)' : Array, '(interpolate)' : Boolean, '(scale)' : Array } } return BarGraph; });
window.addEventListener('scroll', (e) => { const scrollY = window.scrollY; const wantedPoster = document.querySelector('.white-beard'); wantedPoster.setAttribute('style', ` clip-path: inset(0% ${Math.trunc(scrollY / 10)}% 0% 0%); `); });
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.providers = void 0; const default_provider_1 = require("./default.provider"); const javascript_provider_1 = require("./javascript/javascript.provider"); exports.providers = [ javascript_provider_1.JavaScriptProvider, default_provider_1.DefaultProvider, ]; //# sourceMappingURL=index.js.map
"use strict"; var outputFileSync = require("output-file-sync"); var pathExists = require("path-exists"); var chokidar = require("chokidar"); var slash = require("slash"); var path = require("path"); var util = require("./util"); var fs = require("fs"); var _ = require("lodash"); module.exports = function (commander, filenames) { function write(src, relative) { // remove extension and then append back on .js relative = relative.replace(/\.(\w*?)$/, "") + ".js"; var dest = path.join(commander.outDir, relative); var data = util.compile(src, { sourceFileName: slash(path.relative(dest + "/..", src)), sourceMapTarget: path.basename(relative) }); if (!commander.copyFiles && data.ignored) return; // we've requested explicit sourcemaps to be written to disk if (data.map && commander.sourceMaps && commander.sourceMaps !== "inline") { var mapLoc = dest + ".map"; data.code = util.addSourceMappingUrl(data.code, mapLoc); outputFileSync(mapLoc, JSON.stringify(data.map)); } outputFileSync(dest, data.code); util.chmod(src, dest); util.log(src + " -> " + dest); } function handleFile(src, filename) { if (util.shouldIgnore(src)) return; if (util.canCompile(filename, commander.extensions)) { write(src, filename); } else if (commander.copyFiles) { var dest = path.join(commander.outDir, filename); outputFileSync(dest, fs.readFileSync(src)); util.chmod(src, dest); } } function handle(filename) { if (!pathExists.sync(filename)) return; var stat = fs.statSync(filename); if (stat.isDirectory(filename)) { (function () { var dirname = filename; _.each(util.readdir(dirname), function (filename) { var src = path.join(dirname, filename); handleFile(src, filename); }); })(); } else { write(filename, filename); } } _.each(filenames, handle); if (commander.watch) { _.each(filenames, function (dirname) { var watcher = chokidar.watch(dirname, { persistent: true, ignoreInitial: true }); _.each(["add", "change"], function (type) { watcher.on(type, function (filename) { var relative = path.relative(dirname, filename) || filename; try { handleFile(filename, relative); } catch (err) { console.error(err.stack); } }); }); }); } };
macDetailCallback("0050c2c06000/36",[{"a":"2 rue Georges Besse Antony FR 92160","o":"ANALOG WAY","d":"2010-02-07","t":"add","s":"ieee","c":"FR"}]);
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import './badge/index.scss'; import './tabs/index.scss';
'use strict'; eventsApp .directive('greeting', function () { return { restrict: 'E', replace: true, transclude: true, template: "<div><button class='btn' ng-click='sayHello()'>Say Hello</button><div ng-transclude></div></div>", name: 'ctrl', priority: 1, controller: function ($scope) { var greetings = ['hello']; $scope.sayHello = function () { alert(greetings.join()); } this.addGreeting = function (greeting) { greetings.push(greeting); } } }; }) .directive('finnish', function () { return { restrict: 'A', require: '^greeting', priority: 1, link: function (scope, element, attrs, controller) { controller.addGreeting('hei'); } } }) .directive('hindi', function () { return { restrict: 'A', require: '^greeting', priority: 2, link: function (scope, element, attrs, controller) { controller.addGreeting('namasdei'); } } }); //eventsApp.controller('GreetingController', // function GreetingController($scope) { // var greetings = ['hello']; // $scope.sayHello = function () { // alert(greetings.join()); // } // this.addGreeting = function (greeting) { // greetings.push(greeting); // } // });
/*! * Google Analytics Library * https://github.com/open-city/google-analytics-lib * * Copyright 2012, Nick Rougeux and Derek Eder of Open City * Licensed under the MIT license. * https://github.com/open-city/google-analytics-lib/wiki/License * * Date: 5/9/2012 * */ var analyticsTrackingCode = 'UA-39054699-17'; //enter your tracking code here var _gaq = _gaq || []; _gaq.push(['_setAccount', analyticsTrackingCode]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); _trackClickEventWithGA = function (category, action, label) { if (typeof(_gaq) != 'undefined') _gaq.push(['_setAccount', analyticsTrackingCode]); _gaq.push(['_trackEvent', category, action, label]); }; jQuery(function () { jQuery('a').click(function () { var $a = jQuery(this); var href = $a.attr("href"); //links going to outside sites if (href.match(/^http/i) && !href.match(document.domain)) { _trackClickEventWithGA("Outgoing", "Click", href); } //direct links to files if (href.match(/\.(avi|css|csv|doc|docx|exe|gif|js|jpg|mov|mp3|pdf|png|ppt|pptx|rar|txt|vsd|vxd|wma|wmv|xls|xlsx|zip)$/i)) { _trackClickEventWithGA("Downloads", "Click", href); } //email links if (href.match(/^mailto:/i)) { _trackClickEventWithGA("Emails", "Click", href); } }); });
jQuery.support.cors = true; // navigation menu $('#menu-toggle').on('click', function() { $('#menu').slideToggle(150); }) // make table rows highlight-able. Not ideal to attach listener to `body` // but we have some tables that are created by js after page load $('body').on('click', 'tr', function(){ $(this).toggleClass('highlight'); }) // attach browser dimensions for help with charts and tables window.browserWidth = document.documentElement.clientWidth; window.browserHeight = document.documentElement.clientHeight; // usage: log('inside coolFunc', this, arguments); // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ window.log = function(){ log.history = log.history || []; // store logs to an array for reference log.history.push(arguments); arguments.callee = arguments.callee.caller; if(this.console) console.log( Array.prototype.slice.call(arguments) ); }; // make it safe to use console.log always (function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{}); // prepare ajax spinners $('body').append('<div id="body-spinner"></div>'); var spinnerTarget = document.getElementById('body-spinner'), spinner = new Spinner(); $(document).ajaxSend(function(event, request, settings) { spinner.spin(spinnerTarget); }); $(document).ajaxComplete(function(event, request, settings) { spinner.stop(); }); // standard mapping of summary level code to summary level name var sumlevMap = { "010": {"name": "nation", "plural": "nations", "sumlev": "010", "size_sort": 1000, "children": ['020','030','040','050','060','140','150','160','250','310','500','610','620','860','950','960','970']}, "020": {"name": "region", "plural": "regions", "sumlev": "020", "size_sort": 950, "children": ['030','040','050','060','140','150','160','250','310','500','610','620','860','950','960','970']}, "030": {"name": "division", "plural": "divisions", "sumlev": "030", "size_sort": 900, "children": ['040','050','060','140','150','160','250','310','500','610','620','860','950','960','970']}, "040": {"name": "state", "plural": "states", "sumlev": "040", "size_sort": 850, "children": ['050','060','140','150','160','250','310','500','610','620','860','950','960','970']}, "050": {"name": "county", "plural": "counties", "sumlev": "050", "size_sort": 800, "children": ['060','140','150','160','500','610','620','860','950','960','970']}, "060": {"name": "county subdivision", "plural": "county subdivisions", "sumlev": "060", "size_sort": 750, "children": ['140','150','160','250','310','500','610','620','860','950','960','970']}, "140": {"name": "census tract", "plural": "census tracts", "sumlev": "140", "size_sort": 100, "children": ['150']}, "150": {"name": "block group", "plural": "block groups", "sumlev": "150", "size_sort": 50, "children": []}, "160": {"name": "place", "plural": "places", "sumlev": "160", "size_sort": 200, "children": ['140','150','860']}, "170": {"name": "consolidated city", "plural": "consolidated cities", "sumlev": "170", "size_sort": 210, "children": []}, "230": {"name": "Alaska native regional corporation", "plural": "Alaska native regional corporations", "sumlev": "230", "size_sort": 300, "children": []}, "250": {"name": "native area", "plural": "native areas", "sumlev": "250", "size_sort": 300, "children": ['140','150','252','254','860']}, "251": {"name": "tribal subdivision", "plural": "tribal subdivisions", "sumlev": "251", "size_sort": 290, "children": []}, "252": {"name": "native area (reservation)", "plural": "native areas (reservation)", "sumlev": "250", "size_sort": 300, "children": []}, "254": {"name": "native area (off-reservation trust land)", "plural": "native areas (off-reservation trust land)", "sumlev": "250", "size_sort": 300, "children": []}, "256": {"name": "tribal tract", "plural": "tribal tracts", "sumlev": "256", "size_sort": 101, "children": []}, "310": {"name": "metro area", "plural": "metro areas", "sumlev": "310", "size_sort": 825, "children": ['050','060','140','150','160','860']}, "314": {"name": "metropolitan division", "plural": "metropolitan division", "sumlev": "314", "size_sort": 810, "children": []}, "330": {"name": "combined statistical area", "plural": "combined statistical areas", "sumlev": "330", "size_sort": 845, "children": []}, "335": {"name": "combined NECTA", "plural": "combined NECTAs", "sumlev": "335", "size_sort": 844, "children": []}, "350": {"name": "NECTA", "plural": "NECTAs", "sumlev": "350", "size_sort": 824, "children": []}, "364": {"name": "NECTA division", "plural": "NECTA divisions", "sumlev": "364", "size_sort": 811, "children": []}, "400": {"name": "urban area", "plural": "urban areas", "sumlev": "400", "size_sort": 820, "children": []}, "500": {"name": "congressional district", "plural": "congressional districts", "sumlev": "500", "size_sort": 770, "children": ['050','060','140','150','160','860']}, "610": {"name": "state house (upper)", "plural": "state houses (upper)", "sumlev": "610", "size_sort": 765, "children": ['050','060','140','150','160','860']}, "620": {"name": "state house (lower)", "plural": "state houses (lower)", "sumlev": "620", "size_sort": 760, "children": ['050','060','140','150','160','860']}, "795": {"name": "PUMA", "plural": "PUMAs", "sumlev": "795", "size_sort": 195, "children": []}, "860": {"name": "ZIP code", "plural": "ZIP codes", "sumlev": "860", "size_sort": 125, "children": ['140','150']}, "950": {"name": "school district (elementary)", "plural": "school districts (elementary)", "sumlev": "950", "size_sort": 145, "children": ['060','140','150','160','860']}, "960": {"name": "school district (secondary)", "plural": "school districts (secondary)", "sumlev": "960", "size_sort": 150, "children": ['060','140','150','160','860']}, "970": {"name": "school district (unified)", "plural": "school districts (unified)", "sumlev": "970", "size_sort": 155, "children": ['060','140','150','160','860']} }; var releaseNames = { 'acs2018_5yr': {'name': 'ACS 2018 5-year', 'years': '2014-2018'}, 'acs2018_1yr': {'name': 'ACS 2018 1-year', 'years': '2018'}, 'acs2017_5yr': {'name': 'ACS 2017 5-year', 'years': '2013-2017'}, 'acs2017_1yr': {'name': 'ACS 2017 1-year', 'years': '2017'}, 'acs2016_5yr': {'name': 'ACS 2016 5-year', 'years': '2012-2016'}, 'acs2016_1yr': {'name': 'ACS 2016 1-year', 'years': '2016'}, 'acs2015_5yr': {'name': 'ACS 2015 5-year', 'years': '2011-2015'}, 'acs2015_1yr': {'name': 'ACS 2015 1-year', 'years': '2015'}, 'acs2014_5yr': {'name': 'ACS 2014 5-year', 'years': '2010-2014'}, 'acs2014_1yr': {'name': 'ACS 2014 1-year', 'years': '2014'}, 'acs2013_1yr': {'name': 'ACS 2013 1-year', 'years': '2013'}, 'acs2013_3yr': {'name': 'ACS 2013 3-year', 'years': '2011-2013'}, 'acs2013_5yr': {'name': 'ACS 2013 5-year', 'years': '2009-2013'}, 'acs2012_1yr': {'name': 'ACS 2012 1-year', 'years': '2012'}, 'acs2012_3yr': {'name': 'ACS 2012 3-year', 'years': '2010-2012'}, 'acs2012_5yr': {'name': 'ACS 2012 5-year', 'years': '2008-2012'} }; // formatting utils // format percentages and/or dollar signs var valFmt = function(value, statType, disablePct) { if (value >= 0 && value !== null) { if (!disablePct && statType == 'percentage') { value += '%'; } else if (statType == 'dollar') { value = '$' + commaFmt(value); } else { value = commaFmt(value); } return value; } return '' } // commas for human-friendly integers var commaFmt = d3.format(","); var capitalize = function(string) { return string.charAt(0).toUpperCase() + string.slice(1); } // underscore.string formatters var escapeRegExp = function(str) { if (str == null) return ''; return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); } var defaultToWhiteSpace = function(characters) { if (characters == null) return '\\s'; else if (characters.source) return characters.source; else return '[' + escapeRegExp(characters) + ']'; } var nativeTrim = String.prototype.trim; var trim = function(str, characters) { if (str == null) return ''; if (!characters && nativeTrim) return nativeTrim.call(str); characters = defaultToWhiteSpace(characters); return String(str).replace(new RegExp('\^' + characters + '+|' + characters + '+$', 'g'), ''); } var dasherize = function(str) { return trim(str).replace(/([A-Z])/g, '-$1').replace(/[-_\s]+/g, '-').toLowerCase(); } var slugify = function(str) { if (str == null) return ''; var from = "ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź", to = "aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz", regex = new RegExp(defaultToWhiteSpace(from), 'g'); str = String(str).toLowerCase().replace(regex, function(c){ var index = from.indexOf(c); return to.charAt(index) || '-'; }); return dasherize(str.replace(/[^\w\s-]/g, '')); } // math utils var calcPct = function(numerator, denominator) { if (denominator == 0) { return 0 } else if (numerator >= 0 && denominator > 0) { return Math.round(((numerator / denominator) * 100) * 10) / 10 } return null } var calcPctMOE = function(numerator, denominator, numerator_moe, denominator_moe) { // From http://www.census.gov/acs/www/Downloads/handbooks/ACSGeneralHandbook.pdf if (denominator == 0) { return 0 } else if (numerator >= 0 && denominator >= 0) { var estimated_ratio = (numerator / denominator), to_square_root = Math.pow(numerator_moe, 2) - (Math.pow(estimated_ratio, 2) * Math.pow(denominator_moe, 2)); // "There are rare instances where this formula will fail— // the value under the square root will be negative. If that // happens, use the formula for derived ratios in the next // section which will provide a conservative estimate of // the MOE." if (to_square_root < 0) { to_square_root = Math.pow(numerator_moe, 2) + (Math.pow(estimated_ratio, 2) * Math.pow(denominator_moe, 2)); } moe_ratio = Math.sqrt(to_square_root) / denominator; return Math.round((moe_ratio * 100) * 10) / 10 } return null } var roundNumber = function(value, decimals) { var precision = (!!decimals) ? decimals : 0, factor = Math.pow(10, precision), value = Math.round(value * factor) / factor; return value; } var numberWithCommas = function(n, decimals) { var parts = roundNumber(n, decimals).toString().split("."); return parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (parts[1] ? "." + parts[1] : ""); } // parseParams from https://gist.github.com/kares/956897#comment-802666 ;!(function($) { var re = /([^&=]+)=?([^&]*)/g; var decode = function(str) { return decodeURIComponent(str.replace(/\+/g, ' ')); }; $.parseParams = function(query) { var params = {}, e; if (!query) { query = window.location.search; } if (query.substr(0, 1) == '?') { query = query.substr(1); } while (e = re.exec(query)) { var k = decode(e[1]); var v = decode(e[2]); if (params[k] !== undefined) { if (!$.isArray(params[k])) { params[k] = [params[k]]; } params[k].push(v); } else { params[k] = v; } } return params; }; })(jQuery);
import MongoClient from 'mongodb'; const URL = "mongodb+srv://JessicaGray:KVLPnFGHN72uqoo6@cluster0.yuzwq.mongodb.net"; export default class Database { constructor() { this.connection = null; this.database = null; this.collection = null; } async connect() { this.connection = await MongoClient.connect(URL, { useUnifiedTopology: true }); this.database = this.connection.db("lab11"); this.collection = this.database.collection("books"); } async createOne(ISBN, title, author, description) { if(this.collection !== null) { const result = await this.collection.insertOne({"ISBN": ISBN, "title": title, "author": author, "description": description}); return {ISBN, title, author, description}; } else { return null; } } async readOne(ISBN) { if(this.collection !== null) { const result = await this.collection.findOne({"ISBN": ISBN}); return {"book found!": result}; } else { return {"book": "not found"}; // For some reason this is not returning what I want. Keeps giving me "book found!: null"... }; } async readMany(author){ if(this.collection !== null) { const cursor = await this.collection.find({"author": author}).toArray(); return {"books found!": cursor}; } else { return {"books": "not found"}; }; } async updateOne(ISBN, title, author, description){ if(this.collection !== null) { const result = await this.collection.updateOne({"ISBN": ISBN}, {$set: {"title": title, "author": author, "description": description}}); return {ISBN, title, author, description}; } else { return {"book": "update unsuccessful!"}; }; } async deleteOne(ISBN){ if(this.collection !== null) { const result = await this.collection.deleteOne({"ISBN": ISBN}); return {"books": result.deletedCount}; } else { return {"books": "delete unsuccessful!"}; }; } close() { if(this.collection !== null) { this.collection.close(); } } }
import { LitElement, html } from 'lit-element'; import { BsModalCss } from './bs-modal.css.js'; import { BsContentRebootCss } from '@lit-element-bootstrap/content/bs-content-reboot.css.js'; export class BsModal extends LitElement { static get styles() { return [ BsContentRebootCss, BsModalCss ]; } render() { return html` <div class="modal-backdrop"></div> <div class="modal"> <div class="modal-dialog" role="document"> <div class="modal-content"> <slot name="header"></slot> <slot name="body"></slot> <slot name="footer"></slot> </div> </div> </div> `; } static get properties() { return { large: Boolean, small: {type: Boolean, reflect: true}, centered: {type: Boolean, reflect: true}, _openTransition: Boolean, _closeTransition: Boolean, opened: {type: Boolean, reflect: true}, dismissable: {type: Boolean, reflect: true}, backdrop: {type: Boolean, reflect: true}, animated: {type: Boolean, reflect: true} }; } constructor() { super(); this.opened = false; this.centered = false; this.dismissable = false; this.backdrop = false; this.animated = false; this.large = false; this.small = false; this._openTransition = false; this._closeTransition = false; } firstUpdated() { if(!this.animated) { this._removeTransitions(); } this.addEventListener('bs-modal-dismiss', () => this._handleDismissEvent()); const modalBackdrop = this.shadowRoot.querySelector('.modal-backdrop'); modalBackdrop.addEventListener('click', () => this._handleBackdropClickEvent()); modalBackdrop.addEventListener('transitionend', () => this._handleModalBackdropTransitionEnd()); const modalDialogElement = this.shadowRoot.querySelector('.modal-dialog'); modalDialogElement.addEventListener('transitionend', () => this._handleModalDialogTransitionEnd()); } _handleDismissEvent() { if(this.dismissable) { this.close(); } } _handleBackdropClickEvent() { if(this.opened) { this.close(); } } _removeTransitions() { const modalElement = this.shadowRoot.querySelector('.modal'); const modalDialogElement = this.shadowRoot.querySelector('.modal-dialog'); const modalBackdropElement = this.shadowRoot.querySelector('.modal-backdrop'); modalElement.style.transition = 'none'; modalDialogElement.style.transition = 'none'; modalBackdropElement.style.transition = 'none'; } toggle() { if(this.opened) { this.close(); } else { this.open(); } } open() { this._sendModalOpenEvent(); this._openTransition = true; if(this.animated) { this._openWithAnimation(); } else { this._openWithNoAnimation(); } } close() { this._sendModalCloseEvent(); this.opened = false; if(this.animated) { this._closeWithAnimation(); } else { this._closeWithNoAnimation(); } } _closeWithAnimation() { this._hideModal(); } _closeWithNoAnimation() { this._closeTransition = true; if(this.backdrop) { this._hideBackdrop(); this._dismissBackdrop(); } this._dismissModal(); this._closeTransition = false; this._sendModalClosedEvent(); } _openWithAnimation() { if(this.backdrop) { this._showBackdrop(); } else { this._showModal(); this.opened = true; } } _openWithNoAnimation() { if(this.backdrop) { this._showBackdrop(); } this._showModal(); this.opened = true; this._openTransition = false; this._sendModalOpenedEvent(); } _handleModalDialogTransitionEnd() { if(this._openTransition) { this._sendModalOpenedEvent(); this._openTransition = false; } else { this._closeTransition = true; if(this.backdrop) { this._hideBackdrop(); } else { this._dismissModal(); this._closeTransition = false; this._sendModalClosedEvent(); } } } _handleModalBackdropTransitionEnd() { if(this._openTransition) { this._showModal(); this.opened = true; } if(this._closeTransition) { this._dismissModal(); this._dismissBackdrop(); this._closeTransition = false; } } _showModal() { const modalElement = this.shadowRoot.querySelector('.modal'); modalElement.style.setProperty('--bs-modal-display', 'block'); window.getComputedStyle(modalElement).display; modalElement.style.opacity = '1'; } _hideModal() { const modalElement = this.shadowRoot.querySelector('.modal'); modalElement.style.opacity = '0'; } _dismissModal() { const modalElement = this.shadowRoot.querySelector('.modal'); modalElement.style.setProperty('--bs-modal-display', 'none'); } _showBackdrop() { const modalBackdropElement = this.shadowRoot.querySelector('.modal-backdrop'); modalBackdropElement.classList.add('show'); modalBackdropElement.style.opacity = '0.5'; } _hideBackdrop() { const modalBackdropElement = this.shadowRoot.querySelector('.modal-backdrop'); modalBackdropElement.style.opacity = '0'; } _dismissBackdrop() { const modalBackdropElement = this.shadowRoot.querySelector('.modal-backdrop'); modalBackdropElement.classList.remove('show'); } _sendModalOpenEvent() { const modalOpenEvent = new CustomEvent('bs.modal.open', { bubbles: true, composed: true }); this.dispatchEvent(modalOpenEvent); } _sendModalOpenedEvent() { const modalOpenedEvent = new CustomEvent('bs.modal.opened', { bubbles: true, composed: true }); this.dispatchEvent(modalOpenedEvent); } _sendModalCloseEvent() { const modalCloseEvent = new CustomEvent('bs.modal.close', { bubbles: true, composed: true }); this.dispatchEvent(modalCloseEvent); } _sendModalClosedEvent() { const modalClosedEvent = new CustomEvent('bs.modal.closed', { bubbles: true, composed: true }); this.dispatchEvent(modalClosedEvent); } }; if(!window.customElements.get('bs-modal')) window.customElements.define('bs-modal', BsModal);
import styled from 'styled-components/native'; export const Container = styled.View` flex: 1; background: #f3f3f3; `;
var mongoose = require('mongoose'); var bcrypt = require('bcrypt'); var UserSchema = new mongoose.Schema({ username: { type: String, unique: true, required: true, trim: true }, email: { type: String, unique: true, required: true, trim: true }, password: { type: String, required: true, }, passwordConf: { type: String, required: false, }, terms: { type: Boolean, required: false, } }); //authenticate input against database UserSchema.statics.authenticate = function (username, password, callback) { console.log("Inside UserSchema Authentication"); User.findOne({ username: username }) .exec(function (err, user) { if (err) { return callback(err) } else if (!user) { var err = new Error('User not found.'); err.status = 401; console.log("User Not Found"); return callback(err); } bcrypt.compare(password, user.password, function (err, result) { if (result === true) { console.log("User was found"); return callback(null, user); } else { return callback(); } }) }); } //hashing a password before saving it to the database UserSchema.pre('save', function (next) { var user = this; bcrypt.hash(user.password, 10, function (err, hash) { if (err) { return next(err); } user.password = hash; next(); }) }); var User = mongoose.model('User', UserSchema); module.exports = User;
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import Text from '../Text'; /* global atob */ class SsoPage extends Component { constructor(props) { super(props); this.onLoad = this.onLoad.bind(this); this.getElement = this.getElement.bind(this); } onLoad(ssoOrigin, jwtData, originRedirectTo) { return function(e) { if (e.target && e.target.contentWindow && e.target.contentWindow.postMessage) { e.target.contentWindow.postMessage(jwtData.value, ssoOrigin); setTimeout(() => { window.location = originRedirectTo; }, 2000); } }; } getElement() { const {params: {ssoOrigin, appId}} = this.props.match; let result; if (!ssoOrigin || !appId || ssoOrigin === 'login' || appId === 'login') { result = ( <div> <h1 style={{textAlign: 'center'}}><Text>Incorrect url params</Text>...</h1> </div> ); } else { // ssoOrigin should looks like: http://abc:121/redirect/to/here const originRedirectTo = atob(ssoOrigin); const originHostArr = originRedirectTo.split('//'); const prefix = originHostArr.shift(); const sufix = originHostArr.shift().split('/').shift(); const ssoOriginUrl = `${prefix}//${sufix}/sso/client`; result = ( <div> <h1 style={{textAlign: 'center'}}><Text>Authenticating please wait</Text>...</h1> <iframe style={{width: 0, height: 0, display: 'none'}} onLoad={this.onLoad(ssoOriginUrl, this.props.loginData.jwt, originRedirectTo)} src={ssoOriginUrl}> <p><Text>Your browser does not support iframes.</Text></p> </iframe> </div> ); } return result; } render() { return ( (this.props.loginData && this.props.loginData.jwt && this.getElement()) || false ); } } SsoPage.propTypes = { match: PropTypes.object.isRequired, loginData: PropTypes.object }; SsoPage.contextTypes = { implementationStyle: PropTypes.object }; export default connect( ({ login }) => { return { loginData: login.get('result').toJS() }; }, {} )(SsoPage);
const {Item} = require("../src/gilded_rose") class WackyItem extends Item{ constructor(name, sellIn, quality){ super(name, sellIn, quality) this.updateCount = 0 } updateItem(){ if (this.updateCount === 0) { this.quality = 50 } else { this.quality = 0 } this.updateCount += 1 } } module.exports ={ WackyItem }
import DS from 'ember-data'; import AdapterFetch from 'ember-fetch/mixins/adapter-fetch'; export default DS.RESTAdapter.extend(AdapterFetch, { namespace: 'api/v1', });
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow strict-local */ import { DynamicallyInjectedByGestureHandler, ConditionallyIgnoredEventHandlers, } from './ViewConfigIgnore'; import ReactNativeStyleAttributes from '../Components/View/ReactNativeStyleAttributes'; import type {PartialViewConfigWithoutName} from './PlatformBaseViewConfig'; const bubblingEventTypes = { // Generic Events topPress: { phasedRegistrationNames: { bubbled: 'onPress', captured: 'onPressCapture', }, }, topChange: { phasedRegistrationNames: { bubbled: 'onChange', captured: 'onChangeCapture', }, }, topFocus: { phasedRegistrationNames: { bubbled: 'onFocus', captured: 'onFocusCapture', }, }, topBlur: { phasedRegistrationNames: { bubbled: 'onBlur', captured: 'onBlurCapture', }, }, topSubmitEditing: { phasedRegistrationNames: { bubbled: 'onSubmitEditing', captured: 'onSubmitEditingCapture', }, }, topEndEditing: { phasedRegistrationNames: { bubbled: 'onEndEditing', captured: 'onEndEditingCapture', }, }, topKeyPress: { phasedRegistrationNames: { bubbled: 'onKeyPress', captured: 'onKeyPressCapture', }, }, // Touch Events topTouchStart: { phasedRegistrationNames: { bubbled: 'onTouchStart', captured: 'onTouchStartCapture', }, }, topTouchMove: { phasedRegistrationNames: { bubbled: 'onTouchMove', captured: 'onTouchMoveCapture', }, }, topTouchCancel: { phasedRegistrationNames: { bubbled: 'onTouchCancel', captured: 'onTouchCancelCapture', }, }, topTouchEnd: { phasedRegistrationNames: { bubbled: 'onTouchEnd', captured: 'onTouchEndCapture', }, }, // Experimental/Work in Progress Pointer Events (not yet ready for use) topPointerCancel: { phasedRegistrationNames: { captured: 'onPointerCancelCapture', bubbled: 'onPointerCancel', }, }, topPointerDown: { phasedRegistrationNames: { captured: 'onPointerDownCapture', bubbled: 'onPointerDown', }, }, topPointerMove2: { phasedRegistrationNames: { captured: 'onPointerMove2Capture', bubbled: 'onPointerMove2', }, }, topPointerUp: { phasedRegistrationNames: { captured: 'onPointerUpCapture', bubbled: 'onPointerUp', }, }, topPointerEnter2: { phasedRegistrationNames: { captured: 'onPointerEnter2Capture', bubbled: 'onPointerEnter2', skipBubbling: true, }, }, topPointerLeave2: { phasedRegistrationNames: { captured: 'onPointerLeave2Capture', bubbled: 'onPointerLeave2', skipBubbling: true, }, }, topPointerOver: { phasedRegistrationNames: { captured: 'onPointerOverCapture', bubbled: 'onPointerOver', }, }, topPointerOut: { phasedRegistrationNames: { captured: 'onPointerOutCapture', bubbled: 'onPointerOut', }, }, }; const directEventTypes = { topAccessibilityAction: { registrationName: 'onAccessibilityAction', }, topAccessibilityTap: { registrationName: 'onAccessibilityTap', }, topMagicTap: { registrationName: 'onMagicTap', }, topAccessibilityEscape: { registrationName: 'onAccessibilityEscape', }, topLayout: { registrationName: 'onLayout', }, onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({ registrationName: 'onGestureHandlerEvent', }), onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({ registrationName: 'onGestureHandlerStateChange', }), }; const validAttributesForNonEventProps = { // View Props accessible: true, accessibilityActions: true, accessibilityLabel: true, accessibilityHint: true, accessibilityLanguage: true, accessibilityValue: true, accessibilityViewIsModal: true, accessibilityElementsHidden: true, accessibilityIgnoresInvertColors: true, testID: true, backgroundColor: {process: require('../StyleSheet/processColor')}, backfaceVisibility: true, opacity: true, shadowColor: {process: require('../StyleSheet/processColor')}, shadowOffset: {diff: require('../Utilities/differ/sizesDiffer')}, shadowOpacity: true, shadowRadius: true, needsOffscreenAlphaCompositing: true, overflow: true, shouldRasterizeIOS: true, transform: {diff: require('../Utilities/differ/matricesDiffer')}, accessibilityRole: true, accessibilityState: true, nativeID: true, pointerEvents: true, removeClippedSubviews: true, borderRadius: true, borderColor: {process: require('../StyleSheet/processColor')}, borderWidth: true, borderStyle: true, hitSlop: {diff: require('../Utilities/differ/insetsDiffer')}, collapsable: true, borderTopWidth: true, borderTopColor: {process: require('../StyleSheet/processColor')}, borderRightWidth: true, borderRightColor: {process: require('../StyleSheet/processColor')}, borderBottomWidth: true, borderBottomColor: {process: require('../StyleSheet/processColor')}, borderLeftWidth: true, borderLeftColor: {process: require('../StyleSheet/processColor')}, borderStartWidth: true, borderStartColor: {process: require('../StyleSheet/processColor')}, borderEndWidth: true, borderEndColor: {process: require('../StyleSheet/processColor')}, borderTopLeftRadius: true, borderTopRightRadius: true, borderTopStartRadius: true, borderTopEndRadius: true, borderBottomLeftRadius: true, borderBottomRightRadius: true, borderBottomStartRadius: true, borderBottomEndRadius: true, display: true, zIndex: true, // ShadowView properties top: true, right: true, start: true, end: true, bottom: true, left: true, width: true, height: true, minWidth: true, maxWidth: true, minHeight: true, maxHeight: true, // Also declared as ViewProps // borderTopWidth: true, // borderRightWidth: true, // borderBottomWidth: true, // borderLeftWidth: true, // borderStartWidth: true, // borderEndWidth: true, // borderWidth: true, marginTop: true, marginRight: true, marginBottom: true, marginLeft: true, marginStart: true, marginEnd: true, marginVertical: true, marginHorizontal: true, margin: true, paddingTop: true, paddingRight: true, paddingBottom: true, paddingLeft: true, paddingStart: true, paddingEnd: true, paddingVertical: true, paddingHorizontal: true, padding: true, flex: true, flexGrow: true, flexShrink: true, flexBasis: true, flexDirection: true, flexWrap: true, justifyContent: true, alignItems: true, alignSelf: true, alignContent: true, position: true, aspectRatio: true, // Also declared as ViewProps // overflow: true, // display: true, direction: true, style: ReactNativeStyleAttributes, }; // Props for bubbling and direct events const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({ onLayout: true, onMagicTap: true, // Accessibility onAccessibilityAction: true, onAccessibilityEscape: true, onAccessibilityTap: true, // PanResponder handlers onMoveShouldSetResponder: true, onMoveShouldSetResponderCapture: true, onStartShouldSetResponder: true, onStartShouldSetResponderCapture: true, onResponderGrant: true, onResponderReject: true, onResponderStart: true, onResponderEnd: true, onResponderRelease: true, onResponderMove: true, onResponderTerminate: true, onResponderTerminationRequest: true, onShouldBlockNativeResponder: true, // Touch events onTouchStart: true, onTouchMove: true, onTouchEnd: true, onTouchCancel: true, // Pointer events onPointerUp: true, onPointerDown: true, onPointerCancel: true, onPointerEnter2: true, onPointerMove2: true, onPointerLeave2: true, onPointerOver: true, onPointerOut: true, }); /** * On iOS, view managers define all of a component's props. * All view managers extend RCTViewManager, and RCTViewManager declares these props. */ const PlatformBaseViewConfigIos: PartialViewConfigWithoutName = { bubblingEventTypes, directEventTypes, validAttributes: { ...validAttributesForNonEventProps, ...validAttributesForEventProps, }, }; export default PlatformBaseViewConfigIos;
import request from 'request' import path from 'path' import shell from '../../util/shell'; export default { key : 'test', taskName : '基于Docker镜像测试', desc : '选择一个Dockerfile用来测试', config : {}, async context(ctx) { ctx.log(`当前工作目录:${ctx.REPOSITORY_WORKSPACE}`); try { if (!this.config.dockerfile) { throw new Error('dockerfile参数不能为空'); } const testImageName = `test/${ctx.REPOSITORY_NAME}`; await shell('docker', [ 'build', '-t', testImageName, '-f', `${this.config.dockerfile}`, '.' ], ctx.REPOSITORY_WORKSPACE, (log) => { ctx.log(log); }); await shell('docker', [ 'run', '--rm', '-i', testImageName ], ctx.REPOSITORY_WORKSPACE, (log) => { ctx.log(log); }); await shell('docker', [ 'rmi', testImageName ], ctx.REPOSITORY_WORKSPACE, (log) => { ctx.log(log); }) this.success(); } catch (e) { this.fail(e); } } };
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import {Dimensions, PixelRatio, Platform, StyleSheet} from 'react-native'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; export function getCodeFont() { return Platform.OS === 'ios' ? 'Menlo' : 'monospace'; } const portraitWidth = Dimensions.get('window').width <= Dimensions.get('window').height ? Dimensions.get('window').width : Dimensions.get('window').height; const scale = portraitWidth / 320; export const normalizeFontSizeByDevice = (size) => { return Math.ceil(PixelRatio.roundToNearestPixel(size * scale)); }; export const getMarkdownTextStyles = makeStyleSheetFromTheme((theme) => { const codeFont = getCodeFont(); return { emph: { fontStyle: 'italic' }, strong: { fontWeight: 'bold' }, del: { textDecorationLine: 'line-through' }, link: { color: theme.linkColor }, heading1: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', lineHeight: normalizeFontSizeByDevice(22) }, heading1Text: { paddingBottom: normalizeFontSizeByDevice(6) }, heading2: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', lineHeight: normalizeFontSizeByDevice(22) }, heading2Text: { paddingBottom: normalizeFontSizeByDevice(6) }, heading3: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', lineHeight: normalizeFontSizeByDevice(22) }, heading3Text: { paddingBottom: normalizeFontSizeByDevice(6) }, heading4: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', lineHeight: normalizeFontSizeByDevice(22) }, heading4Text: { paddingBottom: normalizeFontSizeByDevice(6) }, heading5: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', lineHeight: normalizeFontSizeByDevice(22) }, heading5Text: { paddingBottom: normalizeFontSizeByDevice(6) }, heading6: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', lineHeight: normalizeFontSizeByDevice(22) }, heading6Text: { paddingBottom: normalizeFontSizeByDevice(6) }, code: { alignSelf: 'center', backgroundColor: changeOpacity(theme.centerChannelColor, 0.07), fontFamily: codeFont }, codeBlock: { fontFamily: codeFont }, mention: { color: theme.linkColor }, error: { color: theme.errorTextColor }, table_header_row: { fontWeight: '700' } }; }); export const getMarkdownBlockStyles = makeStyleSheetFromTheme((theme) => { return { adjacentParagraph: { marginTop: 6 }, horizontalRule: { backgroundColor: theme.centerChannelColor, height: StyleSheet.hairlineWidth, flex: 1, marginVertical: 10 }, quoteBlockIcon: { color: changeOpacity(theme.centerChannelColor, 0.5), padding: 5 } }; }); const languages = { actionscript: 'ActionScript', applescript: 'AppleScript', bash: 'Bash', clojure: 'Clojure', coffeescript: 'CoffeeScript', cpp: 'C++', cs: 'C#', css: 'CSS', d: 'D', dart: 'Dart', delphi: 'Delphi', diff: 'Diff', django: 'Django', dockerfile: 'Dockerfile', erlang: 'Erlang', fortran: 'Fortran', fsharp: 'F#', gcode: 'G-code', go: 'Go', groovy: 'Groovy', handlebars: 'Handlebars', haskell: 'Haskell', haxe: 'Haxe', html: 'HTML', java: 'Java', javascript: 'JavaScript', json: 'JSON', julia: 'Julia', kotlin: 'Kotlin', latex: 'LaTeX', less: 'Less', lisp: 'Lisp', lua: 'Lua', makefile: 'Makefile', markdown: 'Markdown', matlab: 'Matlab', objectivec: 'Objective-C', ocaml: 'OCaml', perl: 'Perl', php: 'PHP', powershell: 'PowerShell', puppet: 'Puppet', python: 'Python', r: 'R', ruby: 'Ruby', rust: 'Rust', scala: 'Scala', scheme: 'Scheme', scss: 'SCSS', smalltalk: 'Smalltalk', sql: 'SQL', swift: 'Swift', tex: 'TeX', vbnet: 'VB.NET', vbscript: 'VBScript', verilog: 'Verilog', xml: 'XML', yaml: 'YAML' }; export function getDisplayNameForLanguage(language) { return languages[language.toLowerCase()] || ''; }
var class_ext_1_1_net_1_1_function_items_collection_json_converter = [ [ "End", "db/d40/class_ext_1_1_net_1_1_function_items_collection_json_converter.html#a6c9688163ecfa042e121b492586c0782", null ], [ "Start", "db/d40/class_ext_1_1_net_1_1_function_items_collection_json_converter.html#a89f28c3962b503f78a96995e84e38d11", null ] ];
function updateStatus(typ,value,id) { console.log(typ); var urlbase = FULL_PATH+"/status/update/"+typ+"/"+value+"/"+id; $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, url : urlbase, type: "GET", success: function(response){ console.log(response); if(response.error ==0){ toastr.success(response.success_message); setTimeout(function(){ console.log(typ) if(typ =='offer'){ window.location = FULL_PATH+'/get/offer'; }else if(typ == 'blog') { window.location = FULL_PATH+'/get/blog'; } else if(typ =='video'){ window.location = FULL_PATH+'/get/video'; }else{ window.location = FULL_PATH+'/get/pfd'; } }, 1800); }else{ toastr.error('Somethink wrong please try again'); } }, }); }
const { Order, ProductCart } = require("../models/order"); // get Order by ID exports.getOrderById = (req, res, next, id) => { Order.findById(id) .populate("products.product", "name price") .exec((err, order) => { if (err) { return res.status(400).json({ error: "NO order found in DB", }); } req.order = order; next(); }); }; // create Order exports.createOrder = (req, res) => { req.body.order.user = req.profile; const order = new Order(req.body.order); order.save((err, order) => { if (err) { return res.status(400).json({ error: "Failed to save your order in DB", }); } res.json(order); }); }; // get All Orders exports.getAllOrders = (req, res) => { Order.find() .populate("user", "_id name") .exec((err, order) => { if (err) { return res.status(400).json({ error: "No orders found in DB", }); } res.json(order); }); }; // Order Status exports.getOrderStatus = (req, res) => { res.json(Order.schema.path("status").enumValues); }; // Update Status of Order exports.updateStatus = (req, res) => { Order.update( { _id: req.body.orderId }, { $set: { status: req.body.status } }, (err, order) => { if (err) { return res.status(400).json({ error: "Cannot update order status", }); } res.json(order); } ); };
import { useEffect, useRef } from 'react'; import EditorJS from '@editorjs/editorjs'; import Header from '@editorjs/header'; import List from '@editorjs/list'; import ImageTool from '@editorjs/image'; import Underline from '@editorjs/underline'; import Checklist from '@editorjs/checklist'; import Delimiter from '@editorjs/delimiter'; import Embed from '@editorjs/embed'; import InlineCode from '@editorjs/inline-code'; import Link from '@editorjs/link'; import Marker from '@editorjs/marker'; import Quote from '@editorjs/quote'; import Table from '@editorjs/table'; import Warning from '@editorjs/warning'; import Attaches from './editorjsAttaches'; // import Attaches from '@editorjs/attaches'; // import InlineImage from 'editorjs-inline-image'; import { apiAddImage } from '../../../store/modules/attachment/attachment.api'; const imageUpload = async (file) => { const fdata = new FormData(); fdata.append('title', 'editor_upload'); fdata.append('file', file); try { const resData = await apiAddImage(fdata); if (resData.result.code !== 'RS0000') throw new Error(resData.result.message || 'error'); return resData; } catch (error) { throw new Error(error || 'error'); } }; const onAddImageBlobHook = async (file) => { const resData = await imageUpload(file); const returnValue = { success: 1, file: { url: resData.data.download }, }; return new Promise((resolve) => { resolve(returnValue); }); }; const EDITTOR_HOLDER_ID = 'editorjs'; const Editor = (props) => { const ejInstance = useRef(); // This will run only once useEffect(() => { if (!ejInstance.current) { initEditor(); } return () => { if (ejInstance.current) { ejInstance.current.destroy(); ejInstance.current = null; } }; }, []); const initEditor = () => { const editor = new EditorJS({ holder: EDITTOR_HOLDER_ID, logLevel: 'ERROR', data: props.data || '', onReady: () => { ejInstance.current = editor; props.onReadyEditor(editor); }, autofocus: true, tools: { header: Header, list: List, underline: Underline, checklist: Checklist, delimiter: Delimiter, embed: Embed, inlineCode: InlineCode, marker: Marker, quote: Quote, table: Table, warning: Warning, linkTool: { class: Link, config: { endpoint: `${ process.env.NODE_ENV === 'development' ? process.env.REACT_APP_API_URL_DEV : process.env.REACT_APP_API_URL_PROD }/pagemeta`, }, }, image: { class: ImageTool, config: { uploader: { uploadByFile: onAddImageBlobHook }, }, }, attaches: { class: Attaches, config: { endpoint: `${ process.env.NODE_ENV === 'development' ? process.env.REACT_APP_API_URL_DEV : process.env.REACT_APP_API_URL_PROD }/attachments/file`, field: 'file', }, }, }, }); }; return ( <> <div id={EDITTOR_HOLDER_ID}> </div> </> ); }; export default Editor;
require('../css/app.scss'); const $ = require('jquery'); require('webpack-jquery-ui'); const hamburger = document.querySelector(".hamburger"); hamburger.addEventListener("click", function() { hamburger.classList.toggle("is-active"); $('#mobile-menu').toggle("slide", { direction: "right" }, 500); });
var gulp = require('gulp'); var connect = require('gulp-connect'); gulp.task('connect', function() { connect.server({ host: '127.0.0.1', //地址,可不写,不写的话,默认localhost port: 3000, //端口号,可不写,默认8000 root: './', //当前项目主目录 livereload: true //自npm ins动刷新 }); }); gulp.task('reload', function() { return gulp.src('*').pipe(connect.reload()); }); gulp.task('watch', function() { gulp.watch('*', ['reload']); }); //执行gulp server开启服务器 gulp.task('server', ['connect', 'watch']); gulp.task('default', function() { gulp.start('server'); });
define(["create-audiobuffer"], function(createAudioBuffer){ var Looper = function(){ this.initialize.apply(this, arguments); }; Looper.prototype= { initialize: function(context){ this._context = context; this.destination = context.createMediaStreamDestination(); this._recorder = new MediaRecorder(this.destination.stream); var self = this; var setAudioBuffer = function(buffer){ self._source.buffer = buffer; }; this._recorder.ondataavailable = function(event){ createAudioBuffer(event.data, context).then(setAudioBuffer, console.log); }; this._source = context.createBufferSource(); this._source.loop = true; this._source.connect(this.destination); }, connect: function(node){ this._source.connect(node); }, disconnect: function(){ this._source.disconnect(); this.source.connect(this.destination); }, startRecording: function(){ this._recorder.start(); }, stopRecording: function(){ this._recorder.stop(); }, play: function(){ this._source.start(0); }, stop: function(){ this._source.stop(); } }; return Looper; });
_.max = function (obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.max.apply(Math, obj); } if (!iterator && _.isEmpty(obj)) return -Infinity; var result = { computed: -Infinity, value: -Infinity }; each(obj, function (value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed > result.computed && (result = { value: value, computed: computed }); }); return result.value; };
import React, { useState, useEffect, useContext } from 'react'; import { Tabs, Tab, Container } from 'react-bootstrap'; import { useHistory } from 'react-router-dom'; import LoggedIn from '../components/LoginContext'; import ShipmentForm from '../components/ShipmentForm'; import SingleShipment from '../components/SingleShipment'; import OldShipment from '../components/OldShipment'; import '../styles/ShipmentListPage.css'; function ShipmentListPage() { const [trackings, setTrackings] = useState([]); const { loggedIn, setLoggedInHelper } = useContext(LoggedIn); const history = useHistory(); const getTrackings = async () => { let trackings = []; try { trackings = await fetch('/shipment').then((res) => res.json()); if (trackings.loggedIn === false) { localStorage.setItem( 'loginInfo', JSON.stringify({ loggedIn: false, username: null, userId: null, }) ); if (loggedIn.loggedIn) setLoggedInHelper(false, null, null); history.push('/login'); return; } else { console.log('got trackings'); } } catch (err) { console.log('error occurs ', err); } setTrackings(trackings); }; useEffect(() => { getTrackings(); }, []); // Only run the first time const inactiveTracking = async (id) => { let url = '/shipment/' + id; let result = await fetch(url, { method: 'PUT' }).then((res) => res.json()); if (result.success) { for (let i = 0; i < trackings.length; i++) { if (trackings[i]._id === id) { const newTrackings = [...trackings]; newTrackings[i].active = false; setTrackings(newTrackings); return; } } } else { alert('Something goes wrong.Please try again'); } }; const deleteTracking = async (id) => { let url = '/shipment/' + id; let result = await fetch(url, { method: 'DELETE' }).then((res) => res.json() ); if (result.success) { for (let i = 0; i < trackings.length; i++) { if (trackings[i]._id === id) { const newTrackings = [...trackings]; newTrackings.splice(i, 1); setTrackings(newTrackings); return; } } } else { alert('Something goes wrong.Please try again'); } }; function addTracking(value) { const newTrackings = [value, ...trackings]; setTrackings(newTrackings); alert('One tracking record is added successfully!'); } return ( <div className="shipment-list"> <Container> <h1 className="greeting"> Hello, {JSON.parse(localStorage.getItem('loginInfo')).username} </h1> <Tabs defaultActiveKey="tracking"> <Tab eventKey="new-tracking" title="New Tracking"> <ShipmentForm onCreateSuccess={addTracking} /> </Tab> <Tab eventKey="tracking" title="Active Trackings"> {trackings .filter((tracking) => tracking.active) .map((tracking) => ( <SingleShipment key={tracking._id} tracking={tracking} inactiveTracking={inactiveTracking} deleteTracking={deleteTracking} /> ))} </Tab> <Tab eventKey="history" title="Archived Trackings"> {trackings .filter((tracking) => !tracking.active) .map((tracking) => ( <OldShipment key={tracking._id} tracking={tracking} deleteTracking={deleteTracking} /> ))} </Tab> </Tabs> </Container> </div> ); } export default ShipmentListPage;
import Cookies from 'universal-cookie'; global.cookie = new Cookies(); export const saveCookie = (value) => { const expires = new Date(); expires.setDate(Date.now() + 60 * 60 * 4); global.cookie.set('userid', value, { path: '/', expires, maxAge: 100000 }); }; export const deleteCookie = (value) => { global.cookie.remove('userid', { path: '/' }); }; export const retrieveCookie = (value) => { if (global.cookie.get('userid') !== null) { return global.cookie.get('userid'); console.log(); } else return false; };
import React, {Component} from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Button, Loader } from 'semantic-ui-react'; import { generateMessage } from "../../actions/chartActions"; class MarkovGenerator extends Component { constructor(props) { super(props); this.state = { message: '', isLoading: false, }; this.generateMessage = this.generateMessage.bind(this); } componentDidMount() { this.generateMessage(); } generateMessage() { this.setState({isLoading: true}); this.props.dispatch(generateMessage()) .then(message => { this.setState({message: message.data.message, isLoading: false}); }) } render() { const { isLoading, message } = this.state; return ( <div> <p>{message}</p> <Loader active={isLoading} /> <Button disabled={isLoading} onClick={this.generateMessage}>Generate</Button> </div> ); } } MarkovGenerator.propTypes = {}; export default connect()(MarkovGenerator);
var mysql = require("mysql"); var connection; // if (process.env.JAWSDB_URL) { connection = mysql.createConnection(process.env.JAWSDB_URL); // } else { // connection = mysql.createConnection({ // host: "localhost", // user: "root", // password: "Apollo1215!", // database: "burgers_db" // }); // }; connection.connect(function(err) { if (err) { console.error("error connecting: " + err.stack); return; } console.log("connected as id " + connection.threadId); }); module.exports = connection;
const fs = require('fs'); const path = require('path'); const request = require('request'); const chalk = require('chalk'); const datafire = require('../index'); const logger = require('../util/logger'); const INTEGRATION_LOCATIONS = [ path.join(process.cwd(), 'integrations'), path.join(process.cwd(), 'node_modules', '@datafire'), '@datafire', ]; const INTEGRATION_LIST_URL = "https://raw.githubusercontent.com/DataFire/Integrations/master/json/list.json"; const getAllIntegrations = (callback) => { if (process.env.DATAFIRE_REGISTRY_DIR) { let list = require(process.env.DATAFIRE_REGISTRY_DIR + '/list.json'); callback(null, list); } else { request.get(INTEGRATION_LIST_URL, {json: true}, (err, resp, body) => { callback(err, body); }) } } module.exports = (args) => { return new Promise((resolve, reject) => { if (args.all) { getAllIntegrations((err, list) => { if (err) return reject(err); let keys = Object.keys(list); keys.forEach(k => { let api = list[k]; if (args.query && !integrationMatchesQuery(k, api, args.query)) return; logger.logIntegration(k, {info: api}); logger.log(); }); resolve(); }); } else { INTEGRATION_LOCATIONS.forEach(dir => { fs.readdir(dir, (err, dirs) => { if (err) { if (err.code === 'ENOENT') return; return reject(err); } dirs.forEach(name => { logger.log(chalk.magenta(name)); }) resolve(); }) }); } }); } const integrationMatchesQuery = (name, info, query) => { let searchText = name; if (info.title) searchText += info.title; if (info.description) searchText += info.description; searchText = searchText.toLowerCase(); query = query.toLowerCase(); return searchText.indexOf(query) !== -1; }
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; const msRest = require('ms-rest'); const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** * @summary Creates or updates an artifact source. * * Synchronously creates a new artifact source or updates an existing artifact * source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.artifactSourceInfo] Source object that defines the * resource. * * @param {string} options.artifactSourceInfo.sourceType The type of artifact * source used. * * @param {string} [options.artifactSourceInfo.artifactRoot] The path from the * location that the 'authentication' property [say, a SAS URI to the blob * container] refers to, to the location of the artifacts. This can be used to * differentiate different versions of the artifacts. Or, different types of * artifacts like binaries or templates. The location referenced by the * authentication property concatenated with this optional artifactRoot path * forms the artifact source location where the artifacts are expected to be * found. * * @param {object} options.artifactSourceInfo.authentication The authentication * method to use to access the artifact source. * * @param {string} options.artifactSourceInfo.authentication.type Polymorphic * Discriminator * * @param {object} [options.artifactSourceInfo.tags] Resource tags. * * @param {string} options.artifactSourceInfo.location The geo-location where * the resource lives * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link ArtifactSource} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _createOrUpdate(resourceGroupName, artifactSourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } let artifactSourceInfo = (options && options.artifactSourceInfo !== undefined) ? options.artifactSourceInfo : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } if (resourceGroupName !== null && resourceGroupName !== undefined) { if (resourceGroupName.length > 90) { throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); } if (resourceGroupName.length < 1) { throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); } if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) { throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); } } if (artifactSourceName === null || artifactSourceName === undefined || typeof artifactSourceName.valueOf() !== 'string') { throw new Error('artifactSourceName cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{artifactSourceName}', encodeURIComponent(artifactSourceName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } // Serialize Request let requestContent = null; let requestModel = null; try { if (artifactSourceInfo !== null && artifactSourceInfo !== undefined) { let requestModelMapper = new client.models['ArtifactSource']().mapper(); requestModel = client.serialize(requestModelMapper, artifactSourceInfo, 'artifactSourceInfo'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + `payload - ${JSON.stringify(artifactSourceInfo, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ArtifactSource']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } return callback(null, result, httpRequest, response); }); } /** * @summary Gets an artifact source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link ArtifactSource} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _get(resourceGroupName, artifactSourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } if (resourceGroupName !== null && resourceGroupName !== undefined) { if (resourceGroupName.length > 90) { throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); } if (resourceGroupName.length < 1) { throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); } if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) { throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); } } if (artifactSourceName === null || artifactSourceName === undefined || typeof artifactSourceName.valueOf() !== 'string') { throw new Error('artifactSourceName cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{artifactSourceName}', encodeURIComponent(artifactSourceName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['ArtifactSource']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } return callback(null, result, httpRequest, response); }); } /** * @summary Deletes an artifact source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _deleteMethod(resourceGroupName, artifactSourceName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } if (resourceGroupName !== null && resourceGroupName !== undefined) { if (resourceGroupName.length > 90) { throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); } if (resourceGroupName.length < 1) { throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); } if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) { throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); } } if (artifactSourceName === null || artifactSourceName === undefined || typeof artifactSourceName.valueOf() !== 'string') { throw new Error('artifactSourceName cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{artifactSourceName}', encodeURIComponent(artifactSourceName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; return callback(null, result, httpRequest, response); }); } /** Class representing a ArtifactSources. */ class ArtifactSources { /** * Create a ArtifactSources. * @param {AzureDeploymentManager} client Reference to the service client. */ constructor(client) { this.client = client; this._createOrUpdate = _createOrUpdate; this._get = _get; this._deleteMethod = _deleteMethod; } /** * @summary Creates or updates an artifact source. * * Synchronously creates a new artifact source or updates an existing artifact * source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.artifactSourceInfo] Source object that defines the * resource. * * @param {string} options.artifactSourceInfo.sourceType The type of artifact * source used. * * @param {string} [options.artifactSourceInfo.artifactRoot] The path from the * location that the 'authentication' property [say, a SAS URI to the blob * container] refers to, to the location of the artifacts. This can be used to * differentiate different versions of the artifacts. Or, different types of * artifacts like binaries or templates. The location referenced by the * authentication property concatenated with this optional artifactRoot path * forms the artifact source location where the artifacts are expected to be * found. * * @param {object} options.artifactSourceInfo.authentication The authentication * method to use to access the artifact source. * * @param {string} options.artifactSourceInfo.authentication.type Polymorphic * Discriminator * * @param {object} [options.artifactSourceInfo.tags] Resource tags. * * @param {string} options.artifactSourceInfo.location The geo-location where * the resource lives * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<ArtifactSource>} - The deserialized result object. * * @reject {Error} - The error object. */ createOrUpdateWithHttpOperationResponse(resourceGroupName, artifactSourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._createOrUpdate(resourceGroupName, artifactSourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * @summary Creates or updates an artifact source. * * Synchronously creates a new artifact source or updates an existing artifact * source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.artifactSourceInfo] Source object that defines the * resource. * * @param {string} options.artifactSourceInfo.sourceType The type of artifact * source used. * * @param {string} [options.artifactSourceInfo.artifactRoot] The path from the * location that the 'authentication' property [say, a SAS URI to the blob * container] refers to, to the location of the artifacts. This can be used to * differentiate different versions of the artifacts. Or, different types of * artifacts like binaries or templates. The location referenced by the * authentication property concatenated with this optional artifactRoot path * forms the artifact source location where the artifacts are expected to be * found. * * @param {object} options.artifactSourceInfo.authentication The authentication * method to use to access the artifact source. * * @param {string} options.artifactSourceInfo.authentication.type Polymorphic * Discriminator * * @param {object} [options.artifactSourceInfo.tags] Resource tags. * * @param {string} options.artifactSourceInfo.location The geo-location where * the resource lives * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {ArtifactSource} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link ArtifactSource} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ createOrUpdate(resourceGroupName, artifactSourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._createOrUpdate(resourceGroupName, artifactSourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._createOrUpdate(resourceGroupName, artifactSourceName, options, optionalCallback); } } /** * @summary Gets an artifact source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<ArtifactSource>} - The deserialized result object. * * @reject {Error} - The error object. */ getWithHttpOperationResponse(resourceGroupName, artifactSourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._get(resourceGroupName, artifactSourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * @summary Gets an artifact source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {ArtifactSource} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link ArtifactSource} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ get(resourceGroupName, artifactSourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._get(resourceGroupName, artifactSourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._get(resourceGroupName, artifactSourceName, options, optionalCallback); } } /** * @summary Deletes an artifact source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<null>} - The deserialized result object. * * @reject {Error} - The error object. */ deleteMethodWithHttpOperationResponse(resourceGroupName, artifactSourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._deleteMethod(resourceGroupName, artifactSourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * @summary Deletes an artifact source. * * @param {string} resourceGroupName The name of the resource group. The name * is case insensitive. * * @param {string} artifactSourceName The name of the artifact source. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ deleteMethod(resourceGroupName, artifactSourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._deleteMethod(resourceGroupName, artifactSourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._deleteMethod(resourceGroupName, artifactSourceName, options, optionalCallback); } } } module.exports = ArtifactSources;
/* Plugin Name: Geodanmaps Plugin URI: www.geodanmaps.nl Description: Geodanmaps plugin to embed multiple maps from different public configurations. Version: 0.1 Author: Gabriel Guita Author http://www.geodanmaps.nl License: MIT */ define( ['gdmap-config2ol'], function(G) { 'use strict'; return { initialize: function() { var map = new G.config2ol.Map('map'); map.createMapFromConfiguration( urlApi, orgCode, 'config', confValue, { context: this }).then(function() { map.map.zoomToMaxExtent(); var newLan = 105000; var newLat = 489000; var zoom = map.map.zoom; map.map.setCenter(new OpenLayers.LonLat(newLan, newLat), zoomLevel); }, function(e) { console.log('this is the error'); console.log(e); }); //getJson from url based on public configurations var getJSON = function(publicUrlHaar) { return new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest(); xhr.open('get', publicUrlHaar, true); xhr.responseType = 'json'; xhr.onload = function() { var status = xhr.status; if (status == 200) { resolve(xhr.response); } else { reject(status); } }; xhr.send(); }); }; getJSON(publicUrlHaar).then(function(data) { $('#selectConf').empty(); $.each(data, function(i, data){ $('#selectConf').append($('<option>').text(data.title).attr('value', data.name).attr('name', data.name)); }); $('#selectConf').val(); var hiddenField = $('#gd_map_selectConf_value').val(); $( "option[value='"+hiddenField+"']" ).prop('selected', true); }, function(status) { //error detection.... var status = status; if (status == '404'){ alert("Current organisation code doesn't exist, please try again."); } console.log(status + ' Something went wrong..'); }); $("#selectConf").change(function(){ $(this[this.selectedIndex]).val(); $(this[this.selectedIndex]).text(); $('#gd_map_selectConf_value').val($(this[this.selectedIndex]).val()); $('#gd_map_selectConf_value').text($(this[this.selectedIndex]).text()); var dynamicConfName = $('#gd_map_selectConf_value').val(); $('#map > div').remove(); map.createMapFromConfiguration( urlApi, orgCode, 'config', dynamicConfName, { context: this }).then(function() { map.map.zoomToMaxExtent(); var newLan = 105000; var newLat = 489000; var zoom = map.map.zoom; map.map.setCenter(new OpenLayers.LonLat(newLan, newLat), zoomLevel); }, function(e) { console.log('this is the error'); console.log(e); }); }); }, }; } );
// Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts const { SpecReporter } = require('jasmine-spec-reporter'); exports.config = { allScriptsTimeout: 11000, specs: [ './e2e/**/*.e2e-spec.ts' ], capabilities: { 'browserName': 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', framework: 'jasmine', jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, print: function() {} }, onPrepare() { require('ts-node').register({ project: 'e2e/tsconfig.e2e.json' }); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); } };
const page = { bankInternalRefNameInput: () => cy.get('[data-cy="bank-supply-contract-id"]'), additionalRefNameInput: () => cy.get('[data-cy="bank-supply-contract-name"]'), cloneTransactionsInput: () => cy.get('[data-cy="clone-transactions"]'), submit: () => cy.get('[data-cy="submit-button"]'), }; module.exports = page;
import pick from "../../src/object/pick"; test("pick", () => { const result = pick(["a", "c", "d"], { a: 1, b: 2, c: 3 }); expect(result).toEqual({ a: 1, c: 3 }); });
export default { 'form.basic-form.basic.title': '基础表单', 'form.basic-form.basic.description': '表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。', 'form.basic-form.title.label': '标题', 'form.basic-form.title.placeholder': '给目标起个名字', 'form.basic-form.title.required': '请输入标题', 'form.basic-form.date.label': '起止日期', 'form.basic-form.placeholder.start': '开始日期', 'form.basic-form.placeholder.end': '结束日期', 'form.basic-form.date.required': '请选择起止日期', 'form.basic-form.goal.label': '目标描述', 'form.basic-form.goal.placeholder': '请输入你的阶段性工作目标', 'form.basic-form.goal.required': '请输入目标描述', 'form.basic-form.standard.label': '衡量标准', 'form.basic-form.standard.placeholder': '请输入衡量标准', 'form.basic-form.standard.required': '请输入衡量标准', 'form.basic-form.client.label': '客户', 'form.basic-form.client.required': '请描述你服务的客户', 'form.basic-form.label.tooltip': '目标的服务对象', 'form.basic-form.client.placeholder': '请描述你服务的客户,内部客户直接 @姓名/工号', 'form.basic-form.invites.label': '邀评人', 'form.basic-form.invites.placeholder': '请直接 @姓名/工号,最多可邀请 5 人', 'form.basic-form.weight.label': '权重', 'form.basic-form.weight.placeholder': '请输入', 'form.basic-form.public.label': '目标公开', 'form.basic-form.label.help': '客户、邀评人默认被分享', 'form.basic-form.radio.public': '公开', 'form.basic-form.radio.partially-public': '部分公开', 'form.basic-form.radio.private': '不公开', 'form.basic-form.publicUsers.placeholder': '公开给', 'form.basic-form.option.A': '同事一', 'form.basic-form.option.B': '同事二', 'form.basic-form.option.C': '同事三', 'form.basic-form.email.required': '请输入邮箱地址!', 'form.basic-form.email.wrong-format': '邮箱地址格式错误!', 'form.basic-form.userName.required': '请输入用户名!', 'form.basic-form.password.required': '请输入密码!', 'form.basic-form.password.twice': '两次输入的密码不匹配!', 'form.basic-form.strength.msg': '请至少输入 6 个字符。请不要使用容易被猜到的密码。', 'form.basic-form.strength.strong': '强度:强', 'form.basic-form.strength.medium': '强度:中', 'form.basic-form.strength.short': '强度:太短', 'form.basic-form.confirm-password.required': '请确认密码!', 'form.basic-form.phone-number.required': '请输入手机号!', 'form.basic-form.phone-number.wrong-format': '手机号格式错误!', 'form.basic-form.verification-code.required': '请输入验证码!', 'form.basic-form.form.get-captcha': '获取验证码', 'form.basic-form.captcha.second': '秒', 'form.basic-form.form.optional': '(选填)', 'form.basic-form.form.submit': '提交', 'form.basic-form.form.save': '保存', 'form.basic-form.email.placeholder': '邮箱', 'form.basic-form.password.placeholder': '至少6位密码,区分大小写', 'form.basic-form.confirm-password.placeholder': '确认密码', 'form.basic-form.phone-number.placeholder': '手机号', 'form.basic-form.verification-code.placeholder': '验证码' }
/** * Module dependencies */ var _ = require('lodash'); var types = require('../utils/types'); var utils = require('../utils/helpers'); var hasOwnProperty = utils.object.hasOwnProperty; /** * Builds a Schema Object from an attributes * object in a model. * * Loops through an attributes object to build a schema * containing attribute name as key and a type for casting * in the database. Also includes a default value if supplied. * * Example: * * attributes: { * name: 'string', * phone: { * type: 'string', * defaultsTo: '555-555-5555' * } * } * * Returns: { * name: { type: 'string' }, * phone: { type: 'string, defaultsTo: '555-555-5555' } * } * * @param {Object} context * @return {Object} */ var Schema = module.exports = function(context) { this.context = context || {}; this.schema = {}; return this; }; /** * Initialize the internal schema object * * @param {Object} attrs * @param {Object} associations * @param {Boolean} hasSchema */ Schema.prototype.initialize = function(attrs, hasSchema, reservedAttributes) { var self = this; // Build normal attributes Object.keys(attrs).forEach(function(key) { if (hasOwnProperty(attrs[key], 'collection')) return; self.schema[key] = self.objectAttribute(key, attrs[key]); }); // Build Reserved Attributes if (Array.isArray(reservedAttributes)) { reservedAttributes.forEach(function(key) { self.schema[key] = {}; }); } // Set hasSchema to determine if values should be cleansed or not this.hasSchema = typeof hasSchema !== 'undefined' ? hasSchema : true; }; /** * Handle the building of an Object attribute * * Cleans any unnecessary attributes such as validation properties off of * the internal schema and set's defaults for incorrect values. * * @param {Object} value * @return {Object} */ Schema.prototype.objectAttribute = function(attrName, value) { var attr = {}; for (var key in value) { switch (key) { // Set schema[attribute].type case 'type': if (value[key].indexOf('pg_') == 0) { // Postgresql specific types. attr.type = value[key]; } else { // Allow validation types in attributes and transform them to strings attr.type = ~types.indexOf(value[key]) ? value[key] : 'string'; } break; // Set schema[attribute].defaultsTo case 'defaultsTo': attr.defaultsTo = value[key]; break; // Set schema[attribute].primaryKey case 'primaryKey': attr.primaryKey = value[key]; attr.unique = true; break; // Set schema[attribute].foreignKey case 'foreignKey': attr.foreignKey = value[key]; break; // Set schema[attribute].references case 'references': attr.references = value[key]; break; // Set schema[attribute].on case 'on': attr.on = value[key]; break; // Set schema[attribute].via case 'via': attr.via = value[key]; break; // Set schema[attribute].autoIncrement case 'autoIncrement': attr.autoIncrement = value[key]; attr.type = 'integer'; break; // Set schema[attribute].unique case 'unique': attr.unique = value[key]; break; // Set schema[attribute].index case 'index': attr.index = value[key]; break; // Set schema[attribute].enum case 'enum': attr.enum = value[key]; break; // Set schema[attribute].size case 'size': attr.size = value[key]; break; // Set schema[attribute].notNull case 'notNull': attr.notNull = value[key]; break; // Handle Belongs To Attributes case 'model': var type; var attrs = this.context.waterline.schema[value[key].toLowerCase()].attributes; for (var attribute in attrs) { if (hasOwnProperty(attrs[attribute], 'primaryKey') && attrs[attribute].primaryKey) { type = attrs[attribute].type; break; } } attr.type = type.toLowerCase(); attr.model = value[key].toLowerCase(); attr.foreignKey = true; attr.alias = attrName; break; } } return attr; }; /** * Clean Values * * Takes user inputted data and strips out any values not defined in * the schema. * * This is run after all the validations and right before being sent to the * adapter. This allows you to add temporary properties when doing validation * callbacks and have them stripped before being sent to the database. * * @param {Object} values to clean * @return {Object} clone of values, stripped of any extra properties */ Schema.prototype.cleanValues = function(values) { var clone = {}; for (var key in values) { // The value can pass through if either the collection does have a schema and the key is in the schema, // or otherwise if the collection is schemaless and the key does not represent an associated collection. if ((this.hasSchema && hasOwnProperty(this.schema, key)) || (!this.hasSchema && !(hasOwnProperty(this.context._attributes, key) && hasOwnProperty(this.context._attributes[key], 'collection')))) { clone[key] = values[key]; } } return clone; };
var assert = require("assert"); exports.setUp = function (setUp){ //throw new Error("error setUp"); setUp.done(); }; exports.tearDown = function (tearDown){ //throw new Error("error tearDown"); tearDown.done(); }; exports.testA = function (test){ //throw new Error("error A"); // setTimeout(function(){ // throw new Error("unmanaged error!!!"); // }, 500); test.done(); }; exports.testB = function (test){ //test.setTimeout(5000); //throw new Error("error B"); //assert.equal(1, 2, "failed"); //assert.ok(false, "failed"); test.done(); }; exports.testC = function (test){ test.done(); }; exports.nonTest = function (){ //this is not a test!! };
if(window.SimpleSlide) { new SimpleSlide({ slide: "quote", // nome do atributo data-slide time: 8000 // tempo de transição dos slides }); new SimpleSlide({ slide: "portfolio", time: 8000, nav: true }) } if(window.SimpleAnime) { new SimpleAnime(); } if(window.SimpleForm) { new SimpleForm({ form: ".formphp", // seletor do formulário button: "#enviar", // seletor do botão erro: "<div id='form-erro'><h2>Erro no envio!</h2><p>Um erro ocorreu, tente para o email contato@domínio.com.</p></div>", // mensagem de erro sucesso: "<div id='form-sucesso'><h2>Formulário enviado com sucesso</h2><p>Em breve eu entro em contato com você.</p></div>", // mensagem de sucesso }); }
var express = require('express'); var app = express(); var bodyParser = require('body-parser'); var port = process.env.PORT || 8888; var router = express.Router() const JSum = require('jsum') let { default: Neon, api, nep5, rpc, sc, wallet } = require('@cityofzion/neon-js') getByteArrayAddress = (address) => { if (address.length !== 34) { alert(`Address ${address} needs to be 34 length. Instead it's ${address.length}.`) } else { return sc.ContractParam.byteArray(address, 'address'); } } function hex_to_ascii(str1) { var hex = str1.toString(); var str = ''; for (var n = 0; n < hex.length; n += 2) { str += String.fromCharCode(parseInt(hex.substr(n, 2), 16)); } return str; } async function getRequest() { console.log("Something happened"); return new Promise((resolve, reject) => { let scriptHash = '0c9b501f156839994d5c788aea55fb07192958c6' let operation = "tokensDataOfOwner" // owner let myAddress = 'AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y' let args = [getByteArrayAddress(myAddress), 1] let script = Neon.create.script( { scriptHash: scriptHash, operation: operation, args: args } ); rpc.Query.invokeScript(script).execute('http://46.101.237.125:30333') .then(res => { // console.log("res: " + JSON.stringify(res)) // console.log("Stack: " + JSON.stringify(res.result.stack)) if (res.result.stack) { let value = res.result.stack[0]["value"] const regex = /\\u.{1,4}/gm; const subst = ``; // The substituted value will be contained in the result variable const result = value.replace(regex, subst); resolve(hex_to_ascii(result)) } else { reject("there is no stack!") } }).catch(err => { reject(err) }) }) } app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); router.get('/', function (req, res) { console.log("Something happened"); getRequest().then((resp) => { res.json({ message: resp }) }).catch((err) => { res.json({ error: err }) }) }); app.use('/api', router); app.listen(port); console.log('Running on port ' + port);
module.exports = { env: { mocha: true }, rules: { 'no-unused-expressions': 'off' } }
(this.webpackJsonpcleanfolio=this.webpackJsonpcleanfolio||[]).push([[0],{26:function(e,t,a){},32:function(e,t,a){},33:function(e,t,a){},35:function(e,t,a){},36:function(e,t,a){},37:function(e,t,a){},38:function(e,t,a){},39:function(e,t,a){},40:function(e,t,a){},41:function(e,t,a){},42:function(e,t,a){},44:function(e,t,a){"use strict";a.r(t);var n=a(9),c=a(3),s=a(1),i=a(0),r=Object(s.createContext)(),l=function(e){var t=e.children,a=Object(s.useState)("light"),n=Object(c.a)(a,2),l=n[0],o=n[1];Object(s.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)");o(e.matches?"dark":"light"),e.addEventListener("change",(function(e){o(e.matches?"dark":"light")}))}),[]);return Object(i.jsx)(r.Provider,{value:[{themeName:l,toggleTheme:function(){var e="dark"===l?"light":"dark";localStorage.setItem("themeName",e),o(e)}}],children:t})},o="https://www.linkedin.com/in/mariaeli492/",d="MariaEli...",j="Maria Elisa",u="Front End Developer",b='\xa1Hola, soy Maria Elisa! Front End developer con conocimientos en tecnolog\xedas PERN y MERN stack. Actualmente me encuentro estudiando en Digital House a trav\xe9s de la Beca de Mercado Libre y Globant en la carrera "Certified Tech Developer\u201d. Me gusta crear dise\xf1os creativos y que generen la mejor experiencia a los usuarios. Actualmente estoy buscando oportunidades para seguir creciendo en el campo de TI como Frontend developer. He trabajado en equipos aplicando metodolog\xedas \xe1giles. Me gusta participar en retos en donde se debe sacar a flote la capacidad de adaptabilidad, colaborar en equipos y aprender constantemente. En mi experiencia me destaco por ser emp\xe1tica, proactiva, responsable pero sobre todo por generar espacios adecuados de comunicaci\xf3n.',m="https://www.linkedin.com/in/mariaeli492",p={linkedin:"https://www.linkedin.com/in/mariaeli492",github:"https://github.com/mariaelisa492?tab=repositories"},h=[{name:"Pokemon App",description:"Desarrollo Full Stack de una Single Page Application. Este consisti\xf3 en crear una aplicaci\xf3n web con la tem\xe1tica de Pok\xe9mon. Para el Backend utilice Nodejs, ExpressJS, PostgreSQL y Sequelize como ORM, el Frontend est\xe1 desarrollado en React, Redux y Sass. La aplicaci\xf3n permite ver m\xe1s de 40 Pokemons, ver el detalle de sus datos y estad\xedsticas, buscar por el nombre, filtrar por el tipo al que pertenece cada uno, ordenarlos en orden alfab\xe9tico y por su fuerza o ataque. Finalmente permite crear tu propio Pok\xe9mon",stack:["SASS","NodeJS","Express","React","Redux","PostgreSQL","Sequelize"],sourceCode:"https://github.com/mariaelisa492/App-Pokemon-PI"},{name:"Wave Music",description:"En este proyecto se utiliz\xf3 para poder comprender el github flow, la metodolog\xeda de scrum y las responsabilidades del trabajo en equipo. Para el e-commerce utilizamos Javascript, CSS, React, Redux, MongoDB y Mongoose. En el deploy se utiliz\xf3 Mongo Atlas para la base de datos, Heroku para el servidor y Firebase para el front.",stack:["NodeJS","Express","React","Redux","MongoDB","Mongoose"],sourceCode:"https://github.com/mariaelisa492/Repo-para-PG",livePreview:"https://proyecto-grupal-18c81.web.app/"},{name:"Project 3",description:"Amet asperiores et impedit aliquam consectetur? Voluptates sed a nulla ipsa officia et esse aliquam",stack:["SASS","TypeScript","React"],sourceCode:"https://github.com",livePreview:"https://github.com"}],O=["HTML","CSS","JavaScript","TypeScript","React","Redux","SASS","LESS","Git","GitHub","Jest","Enzyme","NodeJS","Express","MongoDB"],x="mariahernandez@unicauca.edu.co",k=a(14),f=a.n(k),g=a(12),v=a.n(g),N=a(16),_=a.n(N),S=a(15),w=a.n(S),y=(a(26),function(){var e=Object(s.useContext)(r),t=Object(c.a)(e,1)[0],a=t.themeName,n=t.toggleTheme,l=Object(s.useState)(!1),o=Object(c.a)(l,2),d=o[0],j=o[1],u=function(){return j(!d)};return Object(i.jsxs)("nav",{className:"center nav",children:[Object(i.jsxs)("ul",{style:{display:d?"flex":null},className:"nav__list",children:[h.length?Object(i.jsx)("li",{className:"nav__list-item",children:Object(i.jsx)("a",{href:"#projects",onClick:u,className:"link link--nav",target:"blank",children:"Proyectos"})}):null,O.length?Object(i.jsx)("li",{className:"nav__list-item",children:Object(i.jsx)("a",{href:"#skills",onClick:u,className:"link link--nav",target:"blank",children:"Skills"})}):null,x?Object(i.jsx)("li",{className:"nav__list-item",children:Object(i.jsx)("a",{href:"#contact",onClick:u,className:"link link--nav",target:"blank",children:"Contacto"})}):null]}),Object(i.jsx)("button",{type:"button",onClick:n,className:"btn btn--icon nav__theme","aria-label":"toggle theme",children:"dark"===a?Object(i.jsx)(v.a,{}):Object(i.jsx)(f.a,{})}),Object(i.jsx)("button",{type:"button",onClick:u,className:"btn btn--icon nav__hamburger","aria-label":"toggle navigation",children:d?Object(i.jsx)(w.a,{}):Object(i.jsx)(_.a,{})})]})}),E=(a(32),function(){var e=o,t=d;return Object(i.jsxs)("header",{className:"header center",children:[Object(i.jsx)("h3",{children:e?Object(i.jsx)("a",{href:e,className:"link",target:"blank",children:t}):t}),Object(i.jsx)(y,{})]})}),P=a(10),C=a.n(P),M=a(17),R=a.n(M),q=(a(33),function(){var e=j,t=u,a=b,n=m,c=p;return Object(i.jsxs)("div",{className:"about center",children:[e&&Object(i.jsxs)("h1",{children:["Hola, soy ",Object(i.jsx)("span",{className:"about__name",children:e})]}),t&&Object(i.jsx)("h2",{className:"about__role",children:t}),Object(i.jsx)("p",{className:"about__desc",children:a&&a}),Object(i.jsxs)("div",{className:"about__contact center",children:[n&&Object(i.jsx)("a",{href:n,target:"blank",children:Object(i.jsx)("span",{type:"button",className:"btn btn--outline",children:"Resumen"})}),c&&Object(i.jsxs)(i.Fragment,{children:[c.github&&Object(i.jsx)("a",{href:c.github,"aria-label":"github",className:"link link--icon",target:"blank",children:Object(i.jsx)(C.a,{})}),c.linkedin&&Object(i.jsx)("a",{href:c.linkedin,"aria-label":"linkedin",className:"link link--icon",target:"blank",children:Object(i.jsx)(R.a,{})})]})]})]})}),A=a(7),z=a.n(A),J=a(18),L=a.n(J),F=(a(35),function(e){var t=e.project;return Object(i.jsxs)("div",{className:"project",children:[Object(i.jsx)("h3",{children:t.name}),Object(i.jsx)("p",{className:"project__description",children:t.description}),t.stack&&Object(i.jsx)("ul",{className:"project__stack",children:t.stack.map((function(e){return Object(i.jsx)("li",{className:"project__stack-item",children:e},z()())}))}),t.sourceCode&&Object(i.jsx)("a",{href:t.sourceCode,"aria-label":"source code",className:"link link--icon",target:"blank",children:Object(i.jsx)(C.a,{})}),t.livePreview&&Object(i.jsx)("a",{href:t.livePreview,"aria-label":"live preview",className:"link link--icon",children:Object(i.jsx)(L.a,{})})]})}),B=(a(36),function(){return h.length?Object(i.jsxs)("section",{id:"projects",className:"section projects",children:[Object(i.jsx)("h2",{className:"section__title",children:"Proyectos"}),Object(i.jsx)("div",{className:"projects__grid",children:h.map((function(e){return Object(i.jsx)(F,{project:e},z()())}))})]}):null}),D=(a(37),function(){return O.length?Object(i.jsxs)("section",{className:"section skills",id:"skills",children:[Object(i.jsx)("h2",{className:"section__title",children:"Skills"}),Object(i.jsx)("ul",{className:"skills__list",children:O.map((function(e){return Object(i.jsx)("li",{className:"skills__list-item btn btn--plain",children:e},z()())}))})]}):null}),H=a(19),T=a.n(H),G=(a(38),function(){var e=Object(s.useState)(!1),t=Object(c.a)(e,2),a=t[0],n=t[1];return Object(s.useEffect)((function(){var e=function(){return window.pageYOffset>500?n(!0):n(!1)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]),a?Object(i.jsx)("div",{className:"scroll-top",children:Object(i.jsx)("a",{href:"#top",target:"blank",children:Object(i.jsx)(T.a,{fontSize:"large"})})}):null}),I=(a(39),function(){return x?Object(i.jsxs)("section",{className:"section contact center",id:"contact",children:[Object(i.jsx)("h2",{className:"section__title",children:"Contacto"}),Object(i.jsx)("a",{href:"mailto:".concat(x),target:"blank",children:Object(i.jsx)("span",{type:"button",className:"btn btn--outline",children:"Email"})})]}):null}),Q=(a(40),function(){return Object(i.jsx)("footer",{className:"footer",children:Object(i.jsx)("a",{href:"https://www.linkedin.com/in/mariaeli492/",className:"link footer__link",target:"blank",children:"Created By Maria Elisa"})})}),V=(a(41),function(){var e=Object(s.useContext)(r),t=Object(c.a)(e,1)[0].themeName;return Object(i.jsxs)("div",{id:"top",className:"".concat(t," app"),children:[Object(i.jsx)(E,{}),Object(i.jsxs)("main",{children:[Object(i.jsx)(q,{}),Object(i.jsx)(B,{}),Object(i.jsx)(D,{}),Object(i.jsx)(I,{})]}),Object(i.jsx)(G,{}),Object(i.jsx)(Q,{})]})});a(42);Object(n.render)(Object(i.jsx)(l,{children:Object(i.jsx)(V,{})}),document.getElementById("root"))}},[[44,1,2]]]); //# sourceMappingURL=main.17c3e38a.chunk.js.map
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Directive, Inject, InjectionToken, Optional, ViewContainerRef, } from '@angular/core'; /** * Injection token used to provide a `CdkTreeNode` to its outlet. * Used primarily to avoid circular imports. * @docs-private */ export const CDK_TREE_NODE_OUTLET_NODE = new InjectionToken('CDK_TREE_NODE_OUTLET_NODE'); /** * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes * inside the outlet. */ let CdkTreeNodeOutlet = /** @class */ (() => { class CdkTreeNodeOutlet { constructor(viewContainer, _node) { this.viewContainer = viewContainer; this._node = _node; } } CdkTreeNodeOutlet.decorators = [ { type: Directive, args: [{ selector: '[cdkTreeNodeOutlet]' },] } ]; CdkTreeNodeOutlet.ctorParameters = () => [ { type: ViewContainerRef }, { type: undefined, decorators: [{ type: Inject, args: [CDK_TREE_NODE_OUTLET_NODE,] }, { type: Optional }] } ]; return CdkTreeNodeOutlet; })(); export { CdkTreeNodeOutlet }; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0bGV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2Nkay90cmVlL291dGxldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFDSCxPQUFPLEVBQ0wsU0FBUyxFQUNULE1BQU0sRUFDTixjQUFjLEVBQ2QsUUFBUSxFQUNSLGdCQUFnQixHQUNqQixNQUFNLGVBQWUsQ0FBQztBQUV2Qjs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLE1BQU0seUJBQXlCLEdBQUcsSUFBSSxjQUFjLENBQUssMkJBQTJCLENBQUMsQ0FBQztBQUU3Rjs7O0dBR0c7QUFDSDtJQUFBLE1BR2EsaUJBQWlCO1FBQzVCLFlBQ1csYUFBK0IsRUFDZ0IsS0FBVztZQUQxRCxrQkFBYSxHQUFiLGFBQWEsQ0FBa0I7WUFDZ0IsVUFBSyxHQUFMLEtBQUssQ0FBTTtRQUFHLENBQUM7OztnQkFOMUUsU0FBUyxTQUFDO29CQUNULFFBQVEsRUFBRSxxQkFBcUI7aUJBQ2hDOzs7Z0JBaEJDLGdCQUFnQjtnREFvQlgsTUFBTSxTQUFDLHlCQUF5QixjQUFHLFFBQVE7O0lBQ2xELHdCQUFDO0tBQUE7U0FKWSxpQkFBaUIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIExMQyBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cbmltcG9ydCB7XG4gIERpcmVjdGl2ZSxcbiAgSW5qZWN0LFxuICBJbmplY3Rpb25Ub2tlbixcbiAgT3B0aW9uYWwsXG4gIFZpZXdDb250YWluZXJSZWYsXG59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG4vKipcbiAqIEluamVjdGlvbiB0b2tlbiB1c2VkIHRvIHByb3ZpZGUgYSBgQ2RrVHJlZU5vZGVgIHRvIGl0cyBvdXRsZXQuXG4gKiBVc2VkIHByaW1hcmlseSB0byBhdm9pZCBjaXJjdWxhciBpbXBvcnRzLlxuICogQGRvY3MtcHJpdmF0ZVxuICovXG5leHBvcnQgY29uc3QgQ0RLX1RSRUVfTk9ERV9PVVRMRVRfTk9ERSA9IG5ldyBJbmplY3Rpb25Ub2tlbjx7fT4oJ0NES19UUkVFX05PREVfT1VUTEVUX05PREUnKTtcblxuLyoqXG4gKiBPdXRsZXQgZm9yIG5lc3RlZCBDZGtOb2RlLiBQdXQgYFtjZGtUcmVlTm9kZU91dGxldF1gIG9uIGEgdGFnIHRvIHBsYWNlIGNoaWxkcmVuIGRhdGFOb2Rlc1xuICogaW5zaWRlIHRoZSBvdXRsZXQuXG4gKi9cbkBEaXJlY3RpdmUoe1xuICBzZWxlY3RvcjogJ1tjZGtUcmVlTm9kZU91dGxldF0nXG59KVxuZXhwb3J0IGNsYXNzIENka1RyZWVOb2RlT3V0bGV0IHtcbiAgY29uc3RydWN0b3IoXG4gICAgICBwdWJsaWMgdmlld0NvbnRhaW5lcjogVmlld0NvbnRhaW5lclJlZixcbiAgICAgIEBJbmplY3QoQ0RLX1RSRUVfTk9ERV9PVVRMRVRfTk9ERSkgQE9wdGlvbmFsKCkgcHVibGljIF9ub2RlPzogYW55KSB7fVxufVxuIl19
import styled from 'styled-components'; import View from '../View'; const Label = styled(View)` position: relative; cursor: pointer; pointer-events: ${(props) => (props.disabled ? 'none' : '')}; `; export default Label;
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; // beeper@1.1.0 has a return statement outside of a function // and therefore doesn't parse. Let's mock it so that we can // run the tests. module.exports = function () {};