From 525e6af6a531fe1cb26b8bd4446885c954876893 Mon Sep 17 00:00:00 2001 From: zino Date: Sun, 23 May 2021 19:44:01 +0200 Subject: [PATCH] minify fixed, panzoom button selectors fixed --- client/dist/inject.css | 2 +- client/dist/inject.js | 28305 +------------------------------- client/dist/seatmap.css | 2 +- client/dist/seatmap.js | 8 +- client/package.json | 7 +- client/src/modules/panzoom.ts | 6 +- 6 files changed, 132 insertions(+), 28198 deletions(-) diff --git a/client/dist/inject.css b/client/dist/inject.css index 170d0ba..1a8a012 100644 --- a/client/dist/inject.css +++ b/client/dist/inject.css @@ -1 +1 @@ -#containerBookingBtn{display:none;margin:0}#get_flash{display:none}.ui-dialog-titlebar{margin-left:1rem;margin-right:1rem}.ui-dialog-title{text-align:center}.ui-widget-overlay{background:#fff;opacity:1;width:100vw;height:100vh}#openSeatmap img{width:64px}#openSeatmap{padding:1rem;font-weight:700;color:#ffb201;font-size:1rem;cursor:pointer}#openSeatmap span{font-size:.8rem}#foobarParent{display:none}div#dialogSeatmap{padding-top:0}.ui-widget-header{background:#fff;border:1px solid #c6c6c6;border-bottom-right-radius:0;border-bottom-left-radius:0}.ui-dialog{background:#fff;left:0!important;padding:0;top:0!important;right:0!important}.ui-dialog .ui-dialog-content{padding:0}.ui-dialog-titlebar{margin-left:0;margin-right:0;padding:0!important;display:none}#iframeSeatmap{height:100vh;background:#fff;width:100%}.ui-corner-all{border-radius:0}.ui-dialog-title{display:none}.ui-widget{border:none!important} \ No newline at end of file +#containerBookingBtn{display:none;margin:0}#get_flash{display:none}.ui-dialog-title{text-align:center;display:none}.ui-widget-overlay{background:#fff;opacity:1;width:100vw;height:100vh}#openSeatmap img{width:64px}#openSeatmap{padding:1rem;font-weight:700;color:#ffb201;font-size:1rem;cursor:pointer}#openSeatmap span{font-size:.8rem}#foobarParent{display:none}div#dialogSeatmap{padding-top:0}.ui-widget-header{background:#fff;border:1px solid #c6c6c6;border-bottom-right-radius:0;border-bottom-left-radius:0}.ui-dialog{background:#fff;left:0!important;padding:0;top:0!important;right:0!important}.ui-dialog .ui-dialog-content{padding:0}.ui-dialog-titlebar{margin-left:0;margin-right:0;padding:0!important;display:none}#iframeSeatmap{height:100vh;background:#fff;width:100%}.ui-corner-all{border-radius:0}.ui-widget{border:none!important} \ No newline at end of file diff --git a/client/dist/inject.js b/client/dist/inject.js index 298baa7..abf3ba5 100644 --- a/client/dist/inject.js +++ b/client/dist/inject.js @@ -1,28444 +1,375 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) { - pointers.splice(i, 1); - } - pointers.push(event); - } - function removePointer(pointers, event) { - // Add touches if applicable - if (event.touches) { - // Remove all touches - while (pointers.length) { - pointers.pop(); - } - return; - } - var i = findEventIndex(pointers, event); - if (i > -1) { - pointers.splice(i, 1); - } - } - /** - * Calculates a center point between - * the given pointer events, for panning - * with multiple pointers. - */ - function getMiddle(pointers) { - // Copy to avoid changing by reference - pointers = pointers.slice(0); - var event1 = pointers.pop(); - var event2; - while ((event2 = pointers.pop())) { - event1 = { - clientX: (event2.clientX - event1.clientX) / 2 + event1.clientX, - clientY: (event2.clientY - event1.clientY) / 2 + event1.clientY - }; - } - return event1; - } - /** - * Calculates the distance between two points - * for pinch zooming. - * Limits to the first 2 - */ - function getDistance(pointers) { - if (pointers.length < 2) { - return 0; - } - var event1 = pointers[0]; - var event2 = pointers[1]; - return Math.sqrt(Math.pow(Math.abs(event2.clientX - event1.clientX), 2) + - Math.pow(Math.abs(event2.clientY - event1.clientY), 2)); - } - - var events = { - down: 'mousedown', - move: 'mousemove', - up: 'mouseup mouseleave' - }; - if (typeof window !== 'undefined') { - if (typeof window.PointerEvent === 'function') { - events = { - down: 'pointerdown', - move: 'pointermove', - up: 'pointerup pointerleave pointercancel' - }; - } - else if (typeof window.TouchEvent === 'function') { - events = { - down: 'touchstart', - move: 'touchmove', - up: 'touchend touchcancel' - }; - } - } - function onPointer(event, elem, handler, eventOpts) { - events[event].split(' ').forEach(function (name) { - elem.addEventListener(name, handler, eventOpts); - }); - } - function destroyPointer(event, elem, handler) { - events[event].split(' ').forEach(function (name) { - elem.removeEventListener(name, handler); - }); - } - - var isIE = typeof document !== 'undefined' && !!document.documentMode; - /** - * Lazy creation of a CSS style declaration - */ - var divStyle; - function createStyle() { - if (divStyle) { - return divStyle; - } - return (divStyle = document.createElement('div').style); - } - /** - * Proper prefixing for cross-browser compatibility - */ - var prefixes = ['webkit', 'moz', 'ms']; - var prefixCache = {}; - function getPrefixedName(name) { - if (prefixCache[name]) { - return prefixCache[name]; - } - var divStyle = createStyle(); - if (name in divStyle) { - return (prefixCache[name] = name); - } - var capName = name[0].toUpperCase() + name.slice(1); - var i = prefixes.length; - while (i--) { - var prefixedName = "" + prefixes[i] + capName; - if (prefixedName in divStyle) { - return (prefixCache[name] = prefixedName); - } - } - } - /** - * Gets a style value expected to be a number - */ - function getCSSNum(name, style) { - return parseFloat(style[getPrefixedName(name)]) || 0; - } - function getBoxStyle(elem, name, style) { - if (style === void 0) { style = window.getComputedStyle(elem); } - // Support: FF 68+ - // Firefox requires specificity for border - var suffix = name === 'border' ? 'Width' : ''; - return { - left: getCSSNum(name + "Left" + suffix, style), - right: getCSSNum(name + "Right" + suffix, style), - top: getCSSNum(name + "Top" + suffix, style), - bottom: getCSSNum(name + "Bottom" + suffix, style) - }; - } - /** - * Set a style using the properly prefixed name - */ - function setStyle(elem, name, value) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - elem.style[getPrefixedName(name)] = value; - } - /** - * Constructs the transition from panzoom options - * and takes care of prefixing the transition and transform - */ - function setTransition(elem, options) { - var transform = getPrefixedName('transform'); - setStyle(elem, 'transition', transform + " " + options.duration + "ms " + options.easing); - } - /** - * Set the transform using the proper prefix - */ - function setTransform(elem, _a, _options) { - var x = _a.x, y = _a.y, scale = _a.scale, isSVG = _a.isSVG; - setStyle(elem, 'transform', "scale(" + scale + ") translate(" + x + "px, " + y + "px)"); - if (isSVG && isIE) { - var matrixValue = window.getComputedStyle(elem).getPropertyValue('transform'); - elem.setAttribute('transform', matrixValue); - } - } - /** - * Dimensions used in containment and focal point zooming - */ - function getDimensions(elem) { - var parent = elem.parentNode; - var style = window.getComputedStyle(elem); - var parentStyle = window.getComputedStyle(parent); - var rectElem = elem.getBoundingClientRect(); - var rectParent = parent.getBoundingClientRect(); - return { - elem: { - style: style, - width: rectElem.width, - height: rectElem.height, - top: rectElem.top, - bottom: rectElem.bottom, - left: rectElem.left, - right: rectElem.right, - margin: getBoxStyle(elem, 'margin', style), - border: getBoxStyle(elem, 'border', style) - }, - parent: { - style: parentStyle, - width: rectParent.width, - height: rectParent.height, - top: rectParent.top, - bottom: rectParent.bottom, - left: rectParent.left, - right: rectParent.right, - padding: getBoxStyle(parent, 'padding', parentStyle), - border: getBoxStyle(parent, 'border', parentStyle) - } - }; - } - - /** - * Determine if an element is attached to the DOM - * Panzoom requires this so events work properly - */ - function isAttached(elem) { - var doc = elem.ownerDocument; - var parent = elem.parentNode; - return (doc && - parent && - doc.nodeType === 9 && - parent.nodeType === 1 && - doc.documentElement.contains(parent)); - } - - function getClass(elem) { - return (elem.getAttribute('class') || '').trim(); - } - function hasClass(elem, className) { - return elem.nodeType === 1 && (" " + getClass(elem) + " ").indexOf(" " + className + " ") > -1; - } - function isExcluded(elem, options) { - for (var cur = elem; cur != null; cur = cur.parentNode) { - if (hasClass(cur, options.excludeClass) || options.exclude.indexOf(cur) > -1) { - return true; - } - } - return false; - } - - /** - * Determine if an element is SVG by checking the namespace - * Exception: the element itself should be treated like HTML - */ - var rsvg = /^http:[\w\.\/]+svg$/; - function isSVGElement(elem) { - return rsvg.test(elem.namespaceURI) && elem.nodeName.toLowerCase() !== 'svg'; - } - - function shallowClone(obj) { - var clone = {}; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - clone[key] = obj[key]; - } - } - return clone; - } - - var defaultOptions = { - animate: false, - canvas: false, - cursor: 'move', - disablePan: false, - disableZoom: false, - disableXAxis: false, - disableYAxis: false, - duration: 200, - easing: 'ease-in-out', - exclude: [], - excludeClass: 'panzoom-exclude', - handleStartEvent: function (e) { - e.preventDefault(); - e.stopPropagation(); - }, - maxScale: 4, - minScale: 0.125, - overflow: 'hidden', - panOnlyWhenZoomed: false, - relative: false, - setTransform: setTransform, - startX: 0, - startY: 0, - startScale: 1, - step: 0.3, - touchAction: 'none' - }; - function Panzoom(elem, options) { - if (!elem) { - throw new Error('Panzoom requires an element as an argument'); - } - if (elem.nodeType !== 1) { - throw new Error('Panzoom requires an element with a nodeType of 1'); - } - if (!isAttached(elem)) { - throw new Error('Panzoom should be called on elements that have been attached to the DOM'); - } - options = __assign(__assign({}, defaultOptions), options); - var isSVG = isSVGElement(elem); - var parent = elem.parentNode; - // Set parent styles - parent.style.overflow = options.overflow; - parent.style.userSelect = 'none'; - // This is important for mobile to - // prevent scrolling while panning - parent.style.touchAction = options.touchAction; - (options.canvas ? parent : elem).style.cursor = options.cursor; - // Set element styles - elem.style.userSelect = 'none'; - elem.style.touchAction = options.touchAction; - // The default for SVG is '0 0' - // SVG can't be changed in IE - setStyle(elem, 'transformOrigin', typeof options.origin === 'string' ? options.origin : isSVG ? '0 0' : '50% 50%'); - function setOptions(opts) { - if (opts === void 0) { opts = {}; } - for (var key in opts) { - if (opts.hasOwnProperty(key)) { - options[key] = opts[key]; - } - } - // Handle option side-effects - if (opts.hasOwnProperty('cursor')) { - elem.style.cursor = opts.cursor; - } - if (opts.hasOwnProperty('overflow')) { - parent.style.overflow = opts.overflow; - } - if (opts.hasOwnProperty('touchAction')) { - parent.style.touchAction = opts.touchAction; - elem.style.touchAction = opts.touchAction; - } - if (opts.hasOwnProperty('minScale') || - opts.hasOwnProperty('maxScale') || - opts.hasOwnProperty('contain')) { - setMinMax(); - } - } - var x = 0; - var y = 0; - var scale = 1; - var isPanning = false; - zoom(options.startScale, { animate: false }); - // Wait for scale to update - // for accurate dimensions - // to constrain initial values - setTimeout(function () { - setMinMax(); - pan(options.startX, options.startY, { animate: false }); - }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - function trigger(eventName, detail, opts) { - if (opts.silent) { - return; - } - var event = new CustomEvent(eventName, { detail: detail }); - elem.dispatchEvent(event); - } - function setTransformWithEvent(eventName, opts) { - var value = { x: x, y: y, scale: scale, isSVG: isSVG }; - requestAnimationFrame(function () { - if (typeof opts.animate === 'boolean') { - if (opts.animate) { - setTransition(elem, opts); - } - else { - setStyle(elem, 'transition', 'none'); - } - } - opts.setTransform(elem, value, opts); - }); - trigger(eventName, value, opts); - trigger('panzoomchange', value, opts); - return value; - } - function setMinMax() { - if (options.contain) { - var dims = getDimensions(elem); - var parentWidth = dims.parent.width - dims.parent.border.left - dims.parent.border.right; - var parentHeight = dims.parent.height - dims.parent.border.top - dims.parent.border.bottom; - var elemWidth = dims.elem.width / scale; - var elemHeight = dims.elem.height / scale; - var elemScaledWidth = parentWidth / elemWidth; - var elemScaledHeight = parentHeight / elemHeight; - if (options.contain === 'inside') { - options.maxScale = Math.min(elemScaledWidth, elemScaledHeight); - } - else if (options.contain === 'outside') { - options.minScale = Math.max(elemScaledWidth, elemScaledHeight); - } - } - } - function constrainXY(toX, toY, toScale, panOptions) { - var opts = __assign(__assign({}, options), panOptions); - var result = { x: x, y: y, opts: opts }; - if (!opts.force && (opts.disablePan || (opts.panOnlyWhenZoomed && scale === opts.startScale))) { - return result; - } - toX = parseFloat(toX); - toY = parseFloat(toY); - if (!opts.disableXAxis) { - result.x = (opts.relative ? x : 0) + toX; - } - if (!opts.disableYAxis) { - result.y = (opts.relative ? y : 0) + toY; - } - if (opts.contain === 'inside') { - var dims = getDimensions(elem); - result.x = Math.max(-dims.elem.margin.left - dims.parent.padding.left, Math.min(dims.parent.width - - dims.elem.width / toScale - - dims.parent.padding.left - - dims.elem.margin.left - - dims.parent.border.left - - dims.parent.border.right, result.x)); - result.y = Math.max(-dims.elem.margin.top - dims.parent.padding.top, Math.min(dims.parent.height - - dims.elem.height / toScale - - dims.parent.padding.top - - dims.elem.margin.top - - dims.parent.border.top - - dims.parent.border.bottom, result.y)); - } - else if (opts.contain === 'outside') { - var dims = getDimensions(elem); - var realWidth = dims.elem.width / scale; - var realHeight = dims.elem.height / scale; - var scaledWidth = realWidth * toScale; - var scaledHeight = realHeight * toScale; - var diffHorizontal = (scaledWidth - realWidth) / 2; - var diffVertical = (scaledHeight - realHeight) / 2; - var minX = (-(scaledWidth - dims.parent.width) - - dims.parent.padding.left - - dims.parent.border.left - - dims.parent.border.right + - diffHorizontal) / - toScale; - var maxX = (diffHorizontal - dims.parent.padding.left) / toScale; - result.x = Math.max(Math.min(result.x, maxX), minX); - var minY = (-(scaledHeight - dims.parent.height) - - dims.parent.padding.top - - dims.parent.border.top - - dims.parent.border.bottom + - diffVertical) / - toScale; - var maxY = (diffVertical - dims.parent.padding.top) / toScale; - result.y = Math.max(Math.min(result.y, maxY), minY); - } - return result; - } - function constrainScale(toScale, zoomOptions) { - var opts = __assign(__assign({}, options), zoomOptions); - var result = { scale: scale, opts: opts }; - if (!opts.force && opts.disableZoom) { - return result; - } - result.scale = Math.min(Math.max(toScale, opts.minScale), opts.maxScale); - return result; - } - function pan(toX, toY, panOptions) { - var result = constrainXY(toX, toY, scale, panOptions); - var opts = result.opts; - x = result.x; - y = result.y; - return setTransformWithEvent('panzoompan', opts); - } - function zoom(toScale, zoomOptions) { - var result = constrainScale(toScale, zoomOptions); - var opts = result.opts; - if (!opts.force && opts.disableZoom) { - return; - } - toScale = result.scale; - var toX = x; - var toY = y; - if (opts.focal) { - // The difference between the point after the scale and the point before the scale - // plus the current translation after the scale - // neutralized to no scale (as the transform scale will apply to the translation) - var focal = opts.focal; - toX = (focal.x / toScale - focal.x / scale + x * toScale) / toScale; - toY = (focal.y / toScale - focal.y / scale + y * toScale) / toScale; - } - var panResult = constrainXY(toX, toY, toScale, { relative: false, force: true }); - x = panResult.x; - y = panResult.y; - scale = toScale; - return setTransformWithEvent('panzoomzoom', opts); - } - function zoomInOut(isIn, zoomOptions) { - var opts = __assign(__assign(__assign({}, options), { animate: true }), zoomOptions); - return zoom(scale * Math.exp((isIn ? 1 : -1) * opts.step), opts); - } - function zoomIn(zoomOptions) { - return zoomInOut(true, zoomOptions); - } - function zoomOut(zoomOptions) { - return zoomInOut(false, zoomOptions); - } - function zoomToPoint(toScale, point, zoomOptions) { - var dims = getDimensions(elem); - // Instead of thinking of operating on the panzoom element, - // think of operating on the area inside the panzoom - // element's parent - // Subtract padding and border - var effectiveArea = { - width: dims.parent.width - - dims.parent.padding.left - - dims.parent.padding.right - - dims.parent.border.left - - dims.parent.border.right, - height: dims.parent.height - - dims.parent.padding.top - - dims.parent.padding.bottom - - dims.parent.border.top - - dims.parent.border.bottom - }; - // Adjust the clientX/clientY to ignore the area - // outside the effective area - var clientX = point.clientX - - dims.parent.left - - dims.parent.padding.left - - dims.parent.border.left - - dims.elem.margin.left; - var clientY = point.clientY - - dims.parent.top - - dims.parent.padding.top - - dims.parent.border.top - - dims.elem.margin.top; - // Adjust the clientX/clientY for HTML elements, - // because they have a transform-origin of 50% 50% - if (!isSVG) { - clientX -= dims.elem.width / scale / 2; - clientY -= dims.elem.height / scale / 2; - } - // Convert the mouse point from it's position over the - // effective area before the scale to the position - // over the effective area after the scale. - var focal = { - x: (clientX / effectiveArea.width) * (effectiveArea.width * toScale), - y: (clientY / effectiveArea.height) * (effectiveArea.height * toScale) - }; - return zoom(toScale, __assign(__assign({ animate: false }, zoomOptions), { focal: focal })); - } - function zoomWithWheel(event, zoomOptions) { - // Need to prevent the default here - // or it conflicts with regular page scroll - event.preventDefault(); - var opts = __assign(__assign({}, options), zoomOptions); - // Normalize to deltaX in case shift modifier is used on Mac - var delta = event.deltaY === 0 && event.deltaX ? event.deltaX : event.deltaY; - var wheel = delta < 0 ? 1 : -1; - var toScale = constrainScale(scale * Math.exp((wheel * opts.step) / 3), opts).scale; - return zoomToPoint(toScale, event, opts); - } - function reset(resetOptions) { - var opts = __assign(__assign(__assign({}, options), { animate: true, force: true }), resetOptions); - scale = constrainScale(opts.startScale, opts).scale; - var panResult = constrainXY(opts.startX, opts.startY, scale, opts); - x = panResult.x; - y = panResult.y; - return setTransformWithEvent('panzoomreset', opts); - } - var origX; - var origY; - var startClientX; - var startClientY; - var startScale; - var startDistance; - var pointers = []; - function handleDown(event) { - // Don't handle this event if the target is excluded - if (isExcluded(event.target, options)) { - return; - } - addPointer(pointers, event); - isPanning = true; - options.handleStartEvent(event); - origX = x; - origY = y; - trigger('panzoomstart', { x: x, y: y, scale: scale }, options); - // This works whether there are multiple - // pointers or not - var point = getMiddle(pointers); - startClientX = point.clientX; - startClientY = point.clientY; - startScale = scale; - startDistance = getDistance(pointers); - } - function move(event) { - if (!isPanning || - origX === undefined || - origY === undefined || - startClientX === undefined || - startClientY === undefined) { - return; - } - addPointer(pointers, event); - var current = getMiddle(pointers); - if (pointers.length > 1) { - // Use the distance between the first 2 pointers - // to determine the current scale - var diff = getDistance(pointers) - startDistance; - var toScale = constrainScale((diff * options.step) / 80 + startScale).scale; - zoomToPoint(toScale, current); - } - pan(origX + (current.clientX - startClientX) / scale, origY + (current.clientY - startClientY) / scale, { - animate: false - }); - } - function handleUp(event) { - // Don't call panzoomend when panning with 2 touches - // until both touches end - if (pointers.length === 1) { - trigger('panzoomend', { x: x, y: y, scale: scale }, options); - } - // Note: don't remove all pointers - // Can restart without having to reinitiate all of them - // Remove the pointer regardless of the isPanning state - removePointer(pointers, event); - if (!isPanning) { - return; - } - isPanning = false; - origX = origY = startClientX = startClientY = undefined; - } - var bound = false; - function bind() { - if (bound) { - return; - } - bound = true; - onPointer('down', options.canvas ? parent : elem, handleDown); - onPointer('move', document, move, { passive: true }); - onPointer('up', document, handleUp, { passive: true }); - } - function destroy() { - bound = false; - destroyPointer('down', options.canvas ? parent : elem, handleDown); - destroyPointer('move', document, move); - destroyPointer('up', document, handleUp); - } - if (!options.noBind) { - bind(); - } - return { - bind: bind, - destroy: destroy, - eventNames: events, - getPan: function () { return ({ x: x, y: y }); }, - getScale: function () { return scale; }, - getOptions: function () { return shallowClone(options); }, - pan: pan, - reset: reset, - setOptions: setOptions, - setStyle: function (name, value) { return setStyle(elem, name, value); }, - zoom: zoom, - zoomIn: zoomIn, - zoomOut: zoomOut, - zoomToPoint: zoomToPoint, - zoomWithWheel: zoomWithWheel - }; - } - Panzoom.defaultOptions = defaultOptions; - - return Panzoom; - -}))); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Panzoom=e()}(this,function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,n=1,o=arguments.length;n-1&&t.splice(r,1),t.push(o)}function o(t){for(var e,n=(t=t.slice(0)).pop();e=t.pop();)n={clientX:(e.clientX-n.clientX)/2+n.clientX,clientY:(e.clientY-n.clientY)/2+n.clientY};return n}function r(t){if(t.length<2)return 0;var e=t[0],n=t[1];return Math.sqrt(Math.pow(Math.abs(n.clientX-e.clientX),2)+Math.pow(Math.abs(n.clientY-e.clientY),2))}"undefined"!=typeof window&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}));var a={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};function i(t,e,n,o){a[t].split(" ").forEach(function(t){e.addEventListener(t,n,o)})}function c(t,e,n){a[t].split(" ").forEach(function(t){e.removeEventListener(t,n)})}"undefined"!=typeof window&&("function"==typeof window.PointerEvent?a={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:"function"==typeof window.TouchEvent&&(a={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));var l,p="undefined"!=typeof document&&!!document.documentMode;function u(){return l||(l=document.createElement("div").style)}var d=["webkit","moz","ms"],s={};function f(t){if(s[t])return s[t];var e=u();if(t in e)return s[t]=t;for(var n=t[0].toUpperCase()+t.slice(1),o=d.length;o--;){var r=""+d[o]+n;if(r in e)return s[t]=r}}function m(t,e){return parseFloat(e[f(t)])||0}function h(t,e,n){void 0===n&&(n=window.getComputedStyle(t));var o="border"===e?"Width":"";return{left:m(e+"Left"+o,n),right:m(e+"Right"+o,n),top:m(e+"Top"+o,n),bottom:m(e+"Bottom"+o,n)}}function v(t,e,n){t.style[f(e)]=n}function g(t){var e=t.parentNode,n=window.getComputedStyle(t),o=window.getComputedStyle(e),r=t.getBoundingClientRect(),a=e.getBoundingClientRect();return{elem:{style:n,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:h(t,"margin",n),border:h(t,"border",n)},parent:{style:o,width:a.width,height:a.height,top:a.top,bottom:a.bottom,left:a.left,right:a.right,padding:h(e,"padding",o),border:h(e,"border",o)}}}function y(t,e){return 1===t.nodeType&&(" "+function(t){return(t.getAttribute("class")||"").trim()}(t)+" ").indexOf(" "+e+" ")>-1}var w=/^http:[\w\.\/]+svg$/;var b={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:function(t){t.preventDefault(),t.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,relative:!1,setTransform:function(t,e,n){var o=e.x,r=e.y,a=e.scale,i=e.isSVG;if(v(t,"transform","scale("+a+") translate("+o+"px, "+r+"px)"),i&&p){var c=window.getComputedStyle(t).getPropertyValue("transform");t.setAttribute("transform",c)}},startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function x(l,p){if(!l)throw new Error("Panzoom requires an element as an argument");if(1!==l.nodeType)throw new Error("Panzoom requires an element with a nodeType of 1");if(!function(t){var e=t.ownerDocument,n=t.parentNode;return e&&n&&9===e.nodeType&&1===n.nodeType&&e.documentElement.contains(n)}(l))throw new Error("Panzoom should be called on elements that have been attached to the DOM");p=t(t({},b),p);var u=function(t){return w.test(t.namespaceURI)&&"svg"!==t.nodeName.toLowerCase()}(l),d=l.parentNode;d.style.overflow=p.overflow,d.style.userSelect="none",d.style.touchAction=p.touchAction,(p.canvas?d:l).style.cursor=p.cursor,l.style.userSelect="none",l.style.touchAction=p.touchAction,v(l,"transformOrigin","string"==typeof p.origin?p.origin:u?"0 0":"50% 50%");var s,m,h,x,S,E,M=0,O=0,P=1,z=!1;function A(t,e,n){if(!n.silent){var o=new CustomEvent(t,{detail:e});l.dispatchEvent(o)}}function X(t,e){var n={x:M,y:O,scale:P,isSVG:u};return requestAnimationFrame(function(){"boolean"==typeof e.animate&&(e.animate?function(t,e){v(t,"transition",f("transform")+" "+e.duration+"ms "+e.easing)}(l,e):v(l,"transition","none")),e.setTransform(l,n,e)}),A(t,n,e),A("panzoomchange",n,e),n}function Y(){if(p.contain){var t=g(l),e=t.parent.width-t.parent.border.left-t.parent.border.right,n=t.parent.height-t.parent.border.top-t.parent.border.bottom,o=e/(t.elem.width/P),r=n/(t.elem.height/P);"inside"===p.contain?p.maxScale=Math.min(o,r):"outside"===p.contain&&(p.minScale=Math.max(o,r))}}function C(e,n,o,r){var a=t(t({},p),r),i={x:M,y:O,opts:a};if(!a.force&&(a.disablePan||a.panOnlyWhenZoomed&&P===a.startScale))return i;if(e=parseFloat(e),n=parseFloat(n),a.disableXAxis||(i.x=(a.relative?M:0)+e),a.disableYAxis||(i.y=(a.relative?O:0)+n),"inside"===a.contain){var c=g(l);i.x=Math.max(-c.elem.margin.left-c.parent.padding.left,Math.min(c.parent.width-c.elem.width/o-c.parent.padding.left-c.elem.margin.left-c.parent.border.left-c.parent.border.right,i.x)),i.y=Math.max(-c.elem.margin.top-c.parent.padding.top,Math.min(c.parent.height-c.elem.height/o-c.parent.padding.top-c.elem.margin.top-c.parent.border.top-c.parent.border.bottom,i.y))}else if("outside"===a.contain){var u=(c=g(l)).elem.width/P,d=c.elem.height/P,s=u*o,f=d*o,m=(s-u)/2,h=(f-d)/2,v=(-(s-c.parent.width)-c.parent.padding.left-c.parent.border.left-c.parent.border.right+m)/o,y=(m-c.parent.padding.left)/o;i.x=Math.max(Math.min(i.x,y),v);var w=(-(f-c.parent.height)-c.parent.padding.top-c.parent.border.top-c.parent.border.bottom+h)/o,b=(h-c.parent.padding.top)/o;i.y=Math.max(Math.min(i.y,b),w)}return i}function T(e,n){var o=t(t({},p),n),r={scale:P,opts:o};return!o.force&&o.disableZoom?r:(r.scale=Math.min(Math.max(e,o.minScale),o.maxScale),r)}function N(t,e,n){var o=C(t,e,P,n),r=o.opts;return M=o.x,O=o.y,X("panzoompan",r)}function L(t,e){var n=T(t,e),o=n.opts;if(o.force||!o.disableZoom){t=n.scale;var r=M,a=O;if(o.focal){var i=o.focal;r=(i.x/t-i.x/P+M*t)/t,a=(i.y/t-i.y/P+O*t)/t}var c=C(r,a,t,{relative:!1,force:!0});return M=c.x,O=c.y,P=t,X("panzoomzoom",o)}}function I(e,n){var o=t(t(t({},p),{animate:!0}),n);return L(P*Math.exp((e?1:-1)*o.step),o)}function W(e,n,o){var r=g(l),a=r.parent.width-r.parent.padding.left-r.parent.padding.right-r.parent.border.left-r.parent.border.right,i=r.parent.height-r.parent.padding.top-r.parent.padding.bottom-r.parent.border.top-r.parent.border.bottom,c=n.clientX-r.parent.left-r.parent.padding.left-r.parent.border.left-r.elem.margin.left,p=n.clientY-r.parent.top-r.parent.padding.top-r.parent.border.top-r.elem.margin.top;u||(c-=r.elem.width/P/2,p-=r.elem.height/P/2);var d={x:c/a*(a*e),y:p/i*(i*e)};return L(e,t(t({animate:!1},o),{focal:d}))}L(p.startScale,{animate:!1}),setTimeout(function(){Y(),N(p.startX,p.startY,{animate:!1})});var Z=[];function q(t){if(!function(t,e){for(var n=t;null!=n;n=n.parentNode)if(y(n,e.excludeClass)||e.exclude.indexOf(n)>-1)return!0;return!1}(t.target,p)){n(Z,t),z=!0,p.handleStartEvent(t),s=M,m=O,A("panzoomstart",{x:M,y:O,scale:P},p);var e=o(Z);h=e.clientX,x=e.clientY,S=P,E=r(Z)}}function B(t){if(z&&void 0!==s&&void 0!==m&&void 0!==h&&void 0!==x){n(Z,t);var e=o(Z);if(Z.length>1)W(T((r(Z)-E)*p.step/80+S).scale,e);N(s+(e.clientX-h)/P,m+(e.clientY-x)/P,{animate:!1})}}function D(t){1===Z.length&&A("panzoomend",{x:M,y:O,scale:P},p),function(t,n){if(n.touches)for(;t.length;)t.pop();else{var o=e(t,n);o>-1&&t.splice(o,1)}}(Z,t),z&&(z=!1,s=m=h=x=void 0)}var F=!1;function R(){F||(F=!0,i("down",p.canvas?d:l,q),i("move",document,B,{passive:!0}),i("up",document,D,{passive:!0}))}return p.noBind||R(),{bind:R,destroy:function(){F=!1,c("down",p.canvas?d:l,q),c("move",document,B),c("up",document,D)},eventNames:a,getPan:function(){return{x:M,y:O}},getScale:function(){return P},getOptions:function(){return function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(p)},pan:N,reset:function(e){var n=t(t(t({},p),{animate:!0,force:!0}),e);P=T(n.startScale,n).scale;var o=C(n.startX,n.startY,P,n);return M=o.x,O=o.y,X("panzoomreset",n)},setOptions:function(t){for(var e in void 0===t&&(t={}),t)t.hasOwnProperty(e)&&(p[e]=t[e]);t.hasOwnProperty("cursor")&&(l.style.cursor=t.cursor),t.hasOwnProperty("overflow")&&(d.style.overflow=t.overflow),t.hasOwnProperty("touchAction")&&(d.style.touchAction=t.touchAction,l.style.touchAction=t.touchAction),(t.hasOwnProperty("minScale")||t.hasOwnProperty("maxScale")||t.hasOwnProperty("contain"))&&Y()},setStyle:function(t,e){return v(l,t,e)},zoom:L,zoomIn:function(t){return I(!0,t)},zoomOut:function(t){return I(!1,t)},zoomToPoint:W,zoomWithWheel:function(e,n){e.preventDefault();var o=t(t({},p),n),r=(0===e.deltaY&&e.deltaX?e.deltaX:e.deltaY)<0?1:-1;return W(T(P*Math.exp(r*o.step/3),o).scale,e,o)}}}return x.defaultOptions=b,x}); },{}],2:[function(require,module,exports){ -module.exports = require('./lib/axios'); +module.exports=require("./lib/axios"); + },{"./lib/axios":4}],3:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var cookies = require('./../helpers/cookies'); -var buildURL = require('./../helpers/buildURL'); -var buildFullPath = require('../core/buildFullPath'); -var parseHeaders = require('./../helpers/parseHeaders'); -var isURLSameOrigin = require('./../helpers/isURLSameOrigin'); -var createError = require('../core/createError'); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - var fullPath = buildFullPath(config.baseURL, config.url); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (!requestData) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; +"use strict";var utils=require("./../utils"),settle=require("./../core/settle"),cookies=require("./../helpers/cookies"),buildURL=require("./../helpers/buildURL"),buildFullPath=require("../core/buildFullPath"),parseHeaders=require("./../helpers/parseHeaders"),isURLSameOrigin=require("./../helpers/isURLSameOrigin"),createError=require("../core/createError");module.exports=function(e){return new Promise(function(r,t){var s=e.data,o=e.headers;utils.isFormData(s)&&delete o["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var n=e.auth.username||"",i=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(n+":"+i)}var u=buildFullPath(e.baseURL,e.url);if(a.open(e.method.toUpperCase(),buildURL(u,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var s="getAllResponseHeaders"in a?parseHeaders(a.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:s,config:e,request:a};settle(r,t,o),a=null}},a.onabort=function(){a&&(t(createError("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){t(createError("Network Error",e,null,a)),a=null},a.ontimeout=function(){var r="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(r=e.timeoutErrorMessage),t(createError(r,e,"ECONNABORTED",a)),a=null},utils.isStandardBrowserEnv()){var l=(e.withCredentials||isURLSameOrigin(u))&&e.xsrfCookieName?cookies.read(e.xsrfCookieName):void 0;l&&(o[e.xsrfHeaderName]=l)}if("setRequestHeader"in a&&utils.forEach(o,function(e,r){void 0===s&&"content-type"===r.toLowerCase()?delete o[r]:a.setRequestHeader(r,e)}),utils.isUndefined(e.withCredentials)||(a.withCredentials=!!e.withCredentials),e.responseType)try{a.responseType=e.responseType}catch(r){if("json"!==e.responseType)throw r}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){a&&(a.abort(),t(e),a=null)}),s||(s=null),a.send(s)})}; },{"../core/buildFullPath":10,"../core/createError":11,"./../core/settle":15,"./../helpers/buildURL":19,"./../helpers/cookies":21,"./../helpers/isURLSameOrigin":24,"./../helpers/parseHeaders":26,"./../utils":28}],4:[function(require,module,exports){ -'use strict'; - -var utils = require('./utils'); -var bind = require('./helpers/bind'); -var Axios = require('./core/Axios'); -var mergeConfig = require('./core/mergeConfig'); -var defaults = require('./defaults'); - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - return instance; -} - -// Create the default instance to be exported -var axios = createInstance(defaults); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios; - -// Factory for creating new instances -axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); -}; - -// Expose Cancel & CancelToken -axios.Cancel = require('./cancel/Cancel'); -axios.CancelToken = require('./cancel/CancelToken'); -axios.isCancel = require('./cancel/isCancel'); - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = require('./helpers/spread'); - -// Expose isAxiosError -axios.isAxiosError = require('./helpers/isAxiosError'); - -module.exports = axios; - -// Allow use of default import syntax in TypeScript -module.exports.default = axios; +"use strict";var utils=require("./utils"),bind=require("./helpers/bind"),Axios=require("./core/Axios"),mergeConfig=require("./core/mergeConfig"),defaults=require("./defaults");function createInstance(e){var r=new Axios(e),i=bind(Axios.prototype.request,r);return utils.extend(i,Axios.prototype,r),utils.extend(i,r),i}var axios=createInstance(defaults);axios.Axios=Axios,axios.create=function(e){return createInstance(mergeConfig(axios.defaults,e))},axios.Cancel=require("./cancel/Cancel"),axios.CancelToken=require("./cancel/CancelToken"),axios.isCancel=require("./cancel/isCancel"),axios.all=function(e){return Promise.all(e)},axios.spread=require("./helpers/spread"),axios.isAxiosError=require("./helpers/isAxiosError"),module.exports=axios,module.exports.default=axios; },{"./cancel/Cancel":5,"./cancel/CancelToken":6,"./cancel/isCancel":7,"./core/Axios":8,"./core/mergeConfig":14,"./defaults":17,"./helpers/bind":18,"./helpers/isAxiosError":23,"./helpers/spread":27,"./utils":28}],5:[function(require,module,exports){ -'use strict'; - -/** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function Cancel(message) { - this.message = message; -} - -Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); -}; - -Cancel.prototype.__CANCEL__ = true; - -module.exports = Cancel; +"use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,module.exports=Cancel; },{}],6:[function(require,module,exports){ -'use strict'; - -var Cancel = require('./Cancel'); - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ -function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); -} - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } -}; - -/** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ -CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; -}; - -module.exports = CancelToken; +"use strict";var Cancel=require("./Cancel");function CancelToken(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(e){n=e});var o=this;e(function(e){o.reason||(o.reason=new Cancel(e),n(o.reason))})}CancelToken.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},CancelToken.source=function(){var e;return{token:new CancelToken(function(n){e=n}),cancel:e}},module.exports=CancelToken; },{"./Cancel":5}],7:[function(require,module,exports){ -'use strict'; - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; +"use strict";module.exports=function(t){return!(!t||!t.__CANCEL__)}; },{}],8:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); -var buildURL = require('../helpers/buildURL'); -var InterceptorManager = require('./InterceptorManager'); -var dispatchRequest = require('./dispatchRequest'); -var mergeConfig = require('./mergeConfig'); - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ -function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; -} - -/** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ -Axios.prototype.request = function request(config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; - } - - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } - - // Hook up interceptors middleware - var chain = [dispatchRequest, undefined]; - var promise = Promise.resolve(config); - - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - chain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - chain.push(interceptor.fulfilled, interceptor.rejected); - }); - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; -}; - -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); -}; - -// Provide aliases for supported request methods -utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: data - })); - }; -}); - -module.exports = Axios; +"use strict";var utils=require("./../utils"),buildURL=require("../helpers/buildURL"),InterceptorManager=require("./InterceptorManager"),dispatchRequest=require("./dispatchRequest"),mergeConfig=require("./mergeConfig");function Axios(e){this.defaults=e,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=mergeConfig(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[dispatchRequest,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},Axios.prototype.getUri=function(e){return e=mergeConfig(this.defaults,e),buildURL(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},utils.forEach(["delete","get","head","options"],function(e){Axios.prototype[e]=function(t,r){return this.request(mergeConfig(r||{},{method:e,url:t,data:(r||{}).data}))}}),utils.forEach(["post","put","patch"],function(e){Axios.prototype[e]=function(t,r,o){return this.request(mergeConfig(o||{},{method:e,url:t,data:r}))}}),module.exports=Axios; },{"../helpers/buildURL":19,"./../utils":28,"./InterceptorManager":9,"./dispatchRequest":12,"./mergeConfig":14}],9:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -function InterceptorManager() { - this.handlers = []; -} - -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; -}; - -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; - -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); -}; - -module.exports = InterceptorManager; +"use strict";var utils=require("./../utils");function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function(e){utils.forEach(this.handlers,function(t){null!==t&&e(t)})},module.exports=InterceptorManager; },{"./../utils":28}],10:[function(require,module,exports){ -'use strict'; - -var isAbsoluteURL = require('../helpers/isAbsoluteURL'); -var combineURLs = require('../helpers/combineURLs'); - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ -module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -}; +"use strict";var isAbsoluteURL=require("../helpers/isAbsoluteURL"),combineURLs=require("../helpers/combineURLs");module.exports=function(e,s){return e&&!isAbsoluteURL(s)?combineURLs(e,s):s}; },{"../helpers/combineURLs":20,"../helpers/isAbsoluteURL":22}],11:[function(require,module,exports){ -'use strict'; - -var enhanceError = require('./enhanceError'); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; +"use strict";var enhanceError=require("./enhanceError");module.exports=function(r,e,n,o,a){var c=new Error(r);return enhanceError(c,e,n,o,a)}; },{"./enhanceError":13}],12:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); -var transformData = require('./transformData'); -var isCancel = require('../cancel/isCancel'); -var defaults = require('../defaults'); - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); -}; +"use strict";var utils=require("./../utils"),transformData=require("./transformData"),isCancel=require("../cancel/isCancel"),defaults=require("../defaults");function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}module.exports=function(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=transformData(e.data,e.headers,e.transformRequest),e.headers=utils.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),utils.forEach(["delete","get","head","post","put","patch","common"],function(a){delete e.headers[a]}),(e.adapter||defaults.adapter)(e).then(function(a){return throwIfCancellationRequested(e),a.data=transformData(a.data,a.headers,e.transformResponse),a},function(a){return isCancel(a)||(throwIfCancellationRequested(e),a&&a.response&&(a.response.data=transformData(a.response.data,a.response.headers,e.transformResponse))),Promise.reject(a)})}; },{"../cancel/isCancel":7,"../defaults":17,"./../utils":28,"./transformData":16}],13:[function(require,module,exports){ -'use strict'; - -/** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ -module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; - return error; -}; +"use strict";module.exports=function(e,i,s,t,n){return e.config=i,s&&(e.code=s),e.request=t,e.response=n,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}; },{}],14:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - var valueFromConfig2Keys = ['url', 'method', 'data']; - var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; - var defaultToConfig2Keys = [ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', - 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', - 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' - ]; - var directMergeKeys = ['validateStatus']; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - } - - utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } - }); - - utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); - - utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - utils.forEach(directMergeKeys, function merge(prop) { - if (prop in config2) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - var axiosKeys = valueFromConfig2Keys - .concat(mergeDeepPropertiesKeys) - .concat(defaultToConfig2Keys) - .concat(directMergeKeys); - - var otherKeys = Object - .keys(config1) - .concat(Object.keys(config2)) - .filter(function filterAxiosKeys(key) { - return axiosKeys.indexOf(key) === -1; - }); - - utils.forEach(otherKeys, mergeDeepProperties); - - return config; -}; +"use strict";var utils=require("../utils");module.exports=function(e,t){t=t||{};var i={},s=["url","method","data"],n=["headers","auth","proxy","params"],r=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function a(e,t){return utils.isPlainObject(e)&&utils.isPlainObject(t)?utils.merge(e,t):utils.isPlainObject(t)?utils.merge({},t):utils.isArray(t)?t.slice():t}function u(s){utils.isUndefined(t[s])?utils.isUndefined(e[s])||(i[s]=a(void 0,e[s])):i[s]=a(e[s],t[s])}utils.forEach(s,function(e){utils.isUndefined(t[e])||(i[e]=a(void 0,t[e]))}),utils.forEach(n,u),utils.forEach(r,function(s){utils.isUndefined(t[s])?utils.isUndefined(e[s])||(i[s]=a(void 0,e[s])):i[s]=a(void 0,t[s])}),utils.forEach(o,function(s){s in t?i[s]=a(e[s],t[s]):s in e&&(i[s]=a(void 0,e[s]))});var c=s.concat(n).concat(r).concat(o),l=Object.keys(e).concat(Object.keys(t)).filter(function(e){return-1===c.indexOf(e)});return utils.forEach(l,u),i}; },{"../utils":28}],15:[function(require,module,exports){ -'use strict'; - -var createError = require('./createError'); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } -}; +"use strict";var createError=require("./createError");module.exports=function(t,r,e){var s=e.config.validateStatus;e.status&&s&&!s(e.status)?r(createError("Request failed with status code "+e.status,e.config,null,e.request,e)):t(e)}; },{"./createError":11}],16:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -/** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ -module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); - }); - - return data; -}; +"use strict";var utils=require("./../utils");module.exports=function(t,u,r){return utils.forEach(r,function(r){t=r(t,u)}),t}; },{"./../utils":28}],17:[function(require,module,exports){ (function (process){(function (){ -'use strict'; - -var utils = require('./utils'); -var normalizeHeaderName = require('./helpers/normalizeHeaderName'); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = require('./adapters/xhr'); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = require('./adapters/http'); - } - return adapter; -} - -var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } -}; - -defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } -}; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; +"use strict";var utils=require("./utils"),normalizeHeaderName=require("./helpers/normalizeHeaderName"),DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!utils.isUndefined(e)&&utils.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function getDefaultAdapter(){var e;return"undefined"!=typeof XMLHttpRequest?e=require("./adapters/xhr"):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(e=require("./adapters/http")),e}var defaults={adapter:getDefaultAdapter(),transformRequest:[function(e,t){return normalizeHeaderName(t,"Accept"),normalizeHeaderName(t,"Content-Type"),utils.isFormData(e)||utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e)?e:utils.isArrayBufferView(e)?e.buffer:utils.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):utils.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],function(e){defaults.headers[e]={}}),utils.forEach(["post","put","patch"],function(e){defaults.headers[e]=utils.merge(DEFAULT_CONTENT_TYPE)}),module.exports=defaults; }).call(this)}).call(this,require('_process')) },{"./adapters/http":3,"./adapters/xhr":3,"./helpers/normalizeHeaderName":25,"./utils":28,"_process":96}],18:[function(require,module,exports){ -'use strict'; - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; -}; +"use strict";module.exports=function(r,n){return function(){for(var t=new Array(arguments.length),e=0;e://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); -}; +"use strict";module.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}; },{}],23:[function(require,module,exports){ -'use strict'; - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -module.exports = function isAxiosError(payload) { - return (typeof payload === 'object') && (payload.isAxiosError === true); -}; +"use strict";module.exports=function(o){return"object"==typeof o&&!0===o.isAxiosError}; },{}],24:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); +"use strict";var utils=require("./../utils");module.exports=utils.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");function o(t){var o=t;return r&&(e.setAttribute("href",o),o=e.href),e.setAttribute("href",o),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return t=o(window.location.href),function(r){var e=utils.isString(r)?o(r):r;return e.protocol===t.protocol&&e.host===t.host}}():function(){return!0}; },{"./../utils":28}],25:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); - -module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); -}; +"use strict";var utils=require("../utils");module.exports=function(e,t){utils.forEach(e,function(r,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[s])})}; },{"../utils":28}],26:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; +"use strict";var utils=require("./../utils"),ignoreDuplicateOf=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];module.exports=function(t){var e,i,r,o={};return t?(utils.forEach(t.split("\n"),function(t){if(r=t.indexOf(":"),e=utils.trim(t.substr(0,r)).toLowerCase(),i=utils.trim(t.substr(r+1)),e){if(o[e]&&ignoreDuplicateOf.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([i]):o[e]?o[e]+", "+i:i}}),o):o}; },{"./../utils":28}],27:[function(require,module,exports){ -'use strict'; - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -}; +"use strict";module.exports=function(n){return function(t){return n.apply(null,t)}}; },{}],28:[function(require,module,exports){ -'use strict'; - -var bind = require('./helpers/bind'); - -/*global toString:true*/ - -// utils is a library of generic helper functions non-specific to axios - -var toString = Object.prototype.toString; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return toString.call(val) === '[object Array]'; -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); -} - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ -function isPlainObject(val) { - if (toString.call(val) !== '[object Object]') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} - -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} - -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; -} - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ -function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM -}; +"use strict";var bind=require("./helpers/bind"),toString=Object.prototype.toString;function isArray(r){return"[object Array]"===toString.call(r)}function isUndefined(r){return void 0===r}function isBuffer(r){return null!==r&&!isUndefined(r)&&null!==r.constructor&&!isUndefined(r.constructor)&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r)}function isArrayBuffer(r){return"[object ArrayBuffer]"===toString.call(r)}function isFormData(r){return"undefined"!=typeof FormData&&r instanceof FormData}function isArrayBufferView(r){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer&&r.buffer instanceof ArrayBuffer}function isString(r){return"string"==typeof r}function isNumber(r){return"number"==typeof r}function isObject(r){return null!==r&&"object"==typeof r}function isPlainObject(r){if("[object Object]"!==toString.call(r))return!1;var e=Object.getPrototypeOf(r);return null===e||e===Object.prototype}function isDate(r){return"[object Date]"===toString.call(r)}function isFile(r){return"[object File]"===toString.call(r)}function isBlob(r){return"[object Blob]"===toString.call(r)}function isFunction(r){return"[object Function]"===toString.call(r)}function isStream(r){return isObject(r)&&isFunction(r.pipe)}function isURLSearchParams(r){return"undefined"!=typeof URLSearchParams&&r instanceof URLSearchParams}function trim(r){return r.replace(/^\s*/,"").replace(/\s*$/,"")}function isStandardBrowserEnv(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function forEach(r,e){if(null!=r)if("object"!=typeof r&&(r=[r]),isArray(r))for(var t=0,n=r.length;t",{id:this.id,class:"jBox-wrapper"+(this.type?" jBox-"+this.type:"")+(this.options.theme?" jBox-"+this.options.theme:"")+(this.options.addClass?" "+this.options.addClass:"")}).css({position:this.options.fixed?"fixed":"absolute",display:"none",opacity:0,zIndex:this.options.zIndex}).data("jBox",this),this.options.closeOnMouseleave&&this.wrapper.on("mouseleave",function(t){!this.source||t.relatedTarget!=this.source[0]&&-1===b.inArray(this.source[0],b(t.relatedTarget).parents("*"))&&this.close()}.bind(this)),"box"==this.options.closeOnClick&&this.wrapper.on("click tap",function(){this.close({ignoreDelay:!0})}.bind(this)),this.container=b('
').appendTo(this.wrapper),this.content=b('
').appendTo(this.container),this.options.footer&&(this.footer=b('