(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','swDataLayer','GTM-WB4TJBQ'); swDataLayer = []; /* This file is read by mySkiline.js.php and sent to the client inlined to save a request. */ function SkilineNode(par) { if (!(this instanceof SkilineNode)) return new SkilineNode(par); this.els = []; var _this = this; this.ex = function(ex) { if (typeof ex === 'undefined') return null; var r = {}; r.isClass = ex.indexOf('.') == 0; r.isId = ex.indexOf('#') == 0; r.isTag = !r.isClass && !r.isId; r.name = r.isTag ? ex : ex.substr(1); return r; } this._children = function(par, ex) { el = par; if (typeof ex === 'string') ex = this.ex(ex); if (par instanceof Array || par instanceof HTMLCollection) { if (par.length == 0) return []; // ATT a limitation of this implementation is that we only use the first element of an array. el = par[0]; } if (typeof ex === 'undefined') return el.children; if (ex.isClass) return el.getElementsByClassName(ex.name); if (ex.isId) return [el.getElementById(ex.name)]; if (ex.isTag) return el.getElementsByTagName(ex.name); throw new Exception('unsupported ex type'); } this._parent = function(par, ex) { el = par; if (typeof ex === 'string') ex = this.ex(ex); if (par instanceof Array || par instanceof HTMLCollection) { if (par.length == 0) return []; // ATT a limitation of this implementation is that we only use the first element of an array. el = par[0]; } if (typeof ex === 'undefined') return [el.parentNode]; while (true) { if (ex.isClass && el.classList.contains(ex.name)) return el; else if (ex.isId && el.id == ex.name) return el; else if (ex.isTag && el.tagName.toLowerCase() == ex.name.toLowerCase()) return el; el = el.parentElement; if (!el) return []; } } this.length = function(ex) { return this.els.length; } this.child = function(ex) { return new SkilineNode(this._children(this.els, ex)); } this.parent = function(ex) { return new SkilineNode(this._parent(this.els, ex)); } this.each = function(f) { // we clone the els if they are part of a collection (we do this because .child('.xx').removeClass('xx') will not work) // TODO: we may want to set this.els with that.. var els = par instanceof HTMLCollection ? [].slice.call(this.els) : this.els; for (var i = 0; i < els.length; i++) { var r = f(i, els[i]); if (r === false) break; } // TODO: it would be nice to actually only return the elements the each was applied to return this; } this.attr = function(a, v) { // TODO: handle certain (id, ..) properties as a simple "." access, but others as a property access! if (typeof v === 'undefined') { if (this.els.length == 0) return null; var aa = this.els[0].attributes; if (a == null) return aa; a = aa[a]; if (a == null) return null; return a.value; } return this.each(function(i,o) { o.setAttribute(a, v); }); } this.val = function(v) { if (typeof v === 'undefined') { if (this.els.length == 0) return this; return this.els[0].value; } if (this.els.length == 0) return null; return this.each(function(i,o) { o.value = v; }); } this.html = function(v) { return this.each(function(i,o) { o.innerHTML = v; }); } this.css = function(a, v) { if (typeof v === 'undefined') { if (this.els.length == 0) return null; var aa = this.els[0].style; if (a == null) return aa; a = aa[a]; if (a == null) return null; return a; } return this.each(function(i,o) { o.style[a] = v; }); } this.src = function(v) { return this.attr('src', v); }; this.call = function(f) { for (var i = 0; i < this.els.length; i++) { this.els[i][f](); } return this; } this.get = function(i) { if (typeof i === 'undefined') i = 0; if (this.els.length <= i) return null; return this.els[i]; } this.hide = function() { return this.css('display', 'none'); } this.show = function() { return this.css('display', 'block'); } this.removeClass = function(v) { return this.each(function(i,o) { o.classList.remove(v); }); } this.addClass = function(v) { return this.each(function(i,o) { o.classList.add(v); }); } // TODO: get current css class .class this.click = function(h) { return this.each(function(i,o) { o.addEventListener('click', h, false); }); } this.ajax = function(u, cb, err, addHtml) { if (typeof addHtml === 'undefined') addHtml = true; _this.addClass('ajaxLoading'); var rq = new XMLHttpRequest(); rq.withCredentials = true; rq.open('GET', u, true); var error = function() { _this.addClass('ajaxError'); var t = rq.responseText; if (typeof err === 'function') err(t, rq, _this); else console.error('ajax error server', rq); }; var success = function() { _this.addClass('ajaxSuccess'); var t = rq.responseText; // TODO: find a possibility for NOT adding the html if (addHtml) _this.html(t); if (typeof cb === 'function') cb(t, rq, _this); }; rq.onload = function() { console.log('ajax.loaded', rq); _this.removeClass('ajaxLoading'); if (rq.status >= 200 && rq.status < 400) success(); else error(); } rq.onerror = error; rq.send(); return this; } if (typeof par === 'undefined') this.els = []; else if (typeof par === 'string') this.els = this._children(document, this.ex(par)) else if (par instanceof Array) this.els = par; else if (par instanceof HTMLCollection) this.els = par; else if (par instanceof HTMLElement) this.els = [par]; else this.els = [document]; } /* This file is read by mySkiline.js.php and sent to the client inlined to save a request. */ function SkilineWidget(element, options) { var _this = this; swObject = this; // BASICS, Node { var Node = SkilineNode; SkilineWidget.Node = Node; if (options.shadowStyle || options.shadowStyleUrl) { // this code may seem weird, but we do it to encapsulate the css inside a shadow dom so it cannot bleed out into the host page. var shadow = element; if (element.attachShadow) { var shadow = element.attachShadow({ mode: 'open' }); element = document.createElement('div'); shadow.appendChild(element); } if (options.shadowStyle) { var shadowStyle = document.createElement('style'); shadowStyle.innerHTML = options.shadowStyle; shadow.appendChild(shadowStyle); } if (options.shadowStyleUrl) { var shadowStyleLink = document.createElement('link'); shadowStyleLink.rel = 'stylesheet'; shadowStyleLink.href = options.shadowStyleUrl; shadow.appendChild(shadowStyleLink); } } var node = Node(element); this.node = node; var matches = window.location.search.match(/swAuthToken=([a-zA-Z0-9=\-]+)/); if (matches) { options.authToken = matches[1]; } this.baseUrl = 'https://api.skiline.cc/php/tools/myskiline-widget/'; // TODO: it is a bit hacky to inject the params here, but we are unlikely to need 2 of this widget on one page with different params. this.commonUrlParams = '&config=chamonix&locale=fr'; if (options.authToken) this.commonUrlParams += '&authToken=' + options.authToken.replace(/=/g, '-'); if (options.serialNumber) this.commonUrlParams += '&serialNumber=' + options.serialNumber; var containerUrl = window.location.href; if (containerUrl.indexOf('?') < 0) containerUrl += '?' this.commonUrlParams += '&containerUrl=' + encodeURIComponent(containerUrl); this.trackEventGa = function(name, data) { if (data !== undefined) for (var k in data) swDataLayer.push({k: data[k]}); swDataLayer.push({'event': name}); } { var input = document.createElement('input'); var value = 'a'; input.setAttribute('type', 'date'); input.setAttribute('value', value); this.browserSupportsInputDate = (input.value !== value); } } // USER STATS / ACCOUNT / LOGOUT { this.logout = function() { var url = this.baseUrl + 'api/logout.php?' + this.commonUrlParams; node.child('.swAjaxRefresh').ajax(url, function(t, rq) { node.child('.SkilineWidget').html('Logged out.'); } ); }; this.logoutInit = function() { node.child('.swButtonLogout').click(function() { _this.logout(); }); }; } // REFRESH TICKETS { this.ticketsRefresh = function() { // TODO: progress spinner? node.child('.swTicketEnterSuccess').hide(); var url = this.baseUrl + 'api/refreshTickets.php?' + this.commonUrlParams; node.child('.swAjaxRefresh').ajax(url, function(t, rq) { console.log('LOADED refreshTickets', t); // TODO: message and / or refresh widget // inform user or auto-reload the widget on a successful (more days) reload… } ); } // TODO: does this even do anything before load is finished? i think not. this.ticketsRefresh(); } // TICKET ENTER { this.ticketEnterInit = function(el) { this.ticketEnterResortChanged(); node.child('.swTabs').child('a').click(function() { var type = this.classList[0]; type = type.substr(2); // remove the "sw" prefix _this.ticketEnterTypeChanged(type); }); // ATT: when we use the shadow dom, autoHideOnClick=false is necessary, otherwise it will immediately hide after showing if (!this.browserSupportsInputDate) { node.child('.date').each(function(i,o) { rome(o, { weekStart: 1, time: false, max: new Date(), appendTo: element, autoHideOnClick: false }); }); } } this.ticketEnterResortChanged = function(el) { var resortId = node.child('.swResort').val(); // see which types the selected resort supports (types property) and activate the forms node.child('.swTabs').child('a').hide(); var types = node.child('.swResort').child('.swResort' + resortId).attr('types'); if (types == null) return; types = types.split(','); var currentType = this.ticketEnterType(); var currentTypeSupported = false; var firstSupportedType = null; for (var t in types) { // TODO: we currently do not honor the order of the types. // to do this i think we would have to generate the tabs a elements var type = types[t]; // TODO: .show sets the display to block. likely the tab layout will not like this.. node.child('.swTabs').child('.sw' + type).show(); if (type == currentType) currentTypeSupported = true; if (firstSupportedType == null) firstSupportedType = type; } if (!currentTypeSupported) this.ticketEnterTypeChanged(firstSupportedType); this.ticketEnterTypeChanged(); // unhide the contract if it is there, hide all other contracts node.child('.swContractInfo').hide(); node.child('.swContractInfoResort' + resortId).show(); var contractId = node.child('.swContractInfoResort' + resortId).attr('contractId'); node.child('.swInputContractId').val(contractId); } this.ticketEnterType = function(type) { if (typeof type === 'undefined') return node.child('.swTabs').val(); node.child('.swType').val(type); return node.child('.swTabs').val(type); } this.ticketEnterTypeChanged = function(type) { if (typeof type !== 'undefined') { this.ticketEnterType(type); node.child('.swTabs').child('a').removeClass('swActive'); node.child('.swTabs').child('.sw' + type).addClass('swActive'); } var type = this.ticketEnterType(); node.child('.swForms').child('.swForm').hide(); node.child('.swForms').child('.sw' + type).show(); } this.ticketEnterSubmitted = function(form) { // TODO: hide submit button // TODO: indicator node.child('.swTicketEnterSuccess').hide(); node.child(".swError").removeClass('swError'); node.child(".swFormMessage").html(""); node.child(".swEnterTicket").child(".swButton").css("visibility", "hidden"); var url = this.baseUrl + 'userEnterTicketAction.php?' + this.commonUrlParams; var els = form.elements; for (var e = 0; e < els.length; e++) { var el = els[e]; if (el.name == "" || el.name == null) continue; if (el.type == 'checkbox' && el.checked == false) continue; // TODO: radios will not work yet. url += "&" + el.name + "=" + encodeURIComponent(el.value); } console.log(url); node.child('.swUserEnterTicket').ajax(url, function(t, rq) { console.log('LOADED swUserEnterTicket'); node.child(".swFormMessage").html("Ticket entry successful. Reloading.."); _this.load(function() { node.child('.swTicketEnterSuccess').show(); }); }, function(t, rq) { var t = JSON.parse(t); node.child(".sw" + t.name).addClass('swError'); node.child(".swFormMessage").html(t.message); node.child(".swEnterTicket").child(".swButton").css("visibility", "visible"); }, false); } } // ITEMS { this.tileViewFull = function(el) { var tile = Node(el).parent('.swTile'); tile.addClass('swFull'); node.child('.SkilineWidget').addClass('swFull'); var fullUrl = tile.attr('fullurl'); var ext = fullUrl.replace(/.*\.([a-z0-9]+)/, '$1').toLowerCase(); if (ext == 'mp4') { this.playerContainer.show(); this.player.src(fullUrl); this.player.call('play'); // TODO: set poster to preview image url? //this.player.poster = ''; tile.child('.swImage').css("visibility", "hidden"); } else { tile.child('.swImg').src(''); tile.child('.swImg').src(fullUrl); } this.trackEventGa('viewItem', { item_id: tile.attr('item_id'), item_type: tile.attr('item_type'), }); var url = this.baseUrl + 'api/logItemAccess.php?' + this.commonUrlParams; url += '&id=' + tile.attr('item_id'); url += '&type=' + tile.attr('item_type'); node.child('.swAjax').ajax(url); } this.tileViewSmall = function(el) { this.playerContainer.hide(); // this.player.src(''); this.player.call('pause'); var tile = Node(el).parent('.swTile'); tile.removeClass('swFull'); node.child('.SkilineWidget').removeClass('swFull'); tile.child('.swImage').css("visibility", "visible"); } this.tilePublish = function(el) { el = Node(el); var tile = el.parent('.swTile'); var url = this.baseUrl + 'api/itemSetPrivacyLevel.php?' + this.commonUrlParams; url += '&id=' + tile.attr('item_id'); url += '&type=' + tile.attr('item_type'); url += '&privacyLevel=Everybody'; var href= el.attr('href'); node.child('.swAjax').ajax(url, function() { // TODO: i would like to open a new tab, but the browser does not let me.. // to solve this we would have to work with a redirector instead of an ajax call. // then we would not need this handler anymore, but would use simple links. window.location.href = href; /* var win = window.open(href, 'share'); if (win) win.focus(); else alert('Please allow popups for this website');*/ }); return false; } this.showLinkView = function(el) { // show linkview & select text el = Node(el); el.child('.swLinkView').show(); el.child('.swLinkInput').call('select'); try { document.execCommand('copy'); } catch (err) {} // TODO: after copy hide window - click somewhere to hide? window.setTimeout(function() { el.child('.swLinkView').hide(); }, 5000); } } // LOADING { this.loadingAnimation = function() { // these need to be doublequotes since the loadingHtml will just be pasted here and it contains single quotes. node.html("
mySkiline
Meine Ski-Erlebnisse werden geladen..
"); } this.load = function(cb) { this.loadingAnimation(); // TODO: reqrite so container uses Node var container = element.getElementsByClassName('SkilineWidget'); container = container[0]; var url = this.baseUrl + 'userContent.php?' + this.commonUrlParams + '&shadow=' + options.shadow; node.child('.SkilineWidget').ajax(url, function() { container.classList.remove('swLoading'); if (typeof cb === 'function') cb(); _this.onLoad(); }); } this.load(); } // PRINTING { this.print = function(el) { el = Node(el); var url = el.attr('href'); if (options.onPrint) { options.onPrint(url); } return false; } } { this.onLoad = function() { this.player = node.child('.swPlayer'); this.playerContainer = node.child('.swPlayerContainer'); this.playerContainer.hide(); // TODO: use load event instead this.ticketEnterInit(); if (options.onLoad) { options.onLoad(); } // TODO: use load event instead this.logoutInit(); } } } SkilineWidget.ready = function(fn) { if (document.readyState != 'loading') fn(); else if (document.addEventListener) document.addEventListener('DOMContentLoaded', fn); else document.attachEvent('onreadystatechange', function() { if (document.readyState != 'loading') fn(); }); } // rome@v2.1.22, MIT licensed. https://github.com/bevacqua/rome // brimar: mod: removed dependencies to require and define to make widget work on kleinwalsertal !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if(false)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.rome=t()}}(function(){var t;return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u=false;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i=false,a=0;ao;++o){n=l(e[o]);try{r.add(n)}catch(a){throw new Error("setRanges(): Element could not be added to control selection")}}r.select(),f(t)}function i(t,e){var n=t.getAllRanges();t.removeAllRanges();for(var r=0,o=n.length;o>r;++r)m(e,n[r])||t.addRange(n[r]);t.rangeCount||s(t)}function a(t,e){var n="start",r="end";t.anchorNode=e[n+"Container"],t.anchorOffset=e[n+"Offset"],t.focusNode=e[r+"Container"],t.focusOffset=e[r+"Offset"]}function s(t){t.anchorNode=t.focusNode=null,t.anchorOffset=t.focusOffset=0,t.rangeCount=0,t.isCollapsed=!0,t._ranges.length=0}function u(t){if(!t.length||1!==t[0].nodeType)return!1;for(var e=1,n=t.length;n>e;++e)if(!y(t[0],t[e]))return!1;return!0}function l(t){var e=t.getNodes();if(!u(e))throw new Error("getSingleElementFromRange(): range did not consist of a single element");return e[0]}function c(t){return t&&void 0!==t.text}function d(t,e){t._ranges=[e],a(t,e,!1),t.rangeCount=1,t.isCollapsed=e.collapsed}function f(t){if(t._ranges.length=0,"None"===t._selection.type)s(t);else{var e=t._selection.createRange();if(c(e))d(t,e);else{t.rangeCount=e.length;for(var n,r=0;ri;++i)o.add(n.item(i));try{o.add(r)}catch(s){throw new Error("addRange(): Element could not be added to control selection")}o.select(),f(t)}function m(t,e){return t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset}function y(t,e){for(var n=e;n.parentNode;){if(n.parentNode===t)return!0;n=n.parentNode}return!1}function p(){return new r(n.document.selection)}var v=t("./rangeToTextRange"),g=n.document,_=g.body,w=r.prototype;w.removeAllRanges=function(){var t;try{this._selection.empty(),"None"!==this._selection.type&&(t=_.createTextRange(),t.select(),this._selection.empty())}catch(e){}s(this)},w.addRange=function(t){"Control"===this._selection.type?h(this,t):(v(t).select(),this._ranges[0]=t,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,a(this,t,!1))},w.setRanges=function(t){this.removeAllRanges();var e=t.length;e>1?o(this,t):e&&this.addRange(t[0])},w.getRangeAt=function(t){if(0>t||t>=this.rangeCount)throw new Error("getRangeAt(): index out of bounds");return this._ranges[t].cloneRange()},w.removeRange=function(t){if("Control"!==this._selection.type)return i(this,t),void 0;for(var e,n=this._selection.createRange(),r=l(t),o=_.createControlRange(),a=!1,s=0,u=n.length;u>s;++s)e=n.item(s),e!==r||a?o.add(n.item(s)):a=!0;o.select(),f(this)},w.eachRange=function(t,e){var n=0,r=this._ranges.length;for(n=0;r>n;++n)if(t(this.getRangeAt(n)))return e},w.getAllRanges=function(){var t=[];return this.eachRange(function(e){t.push(e)}),t},w.setSingleRange=function(t){this.removeAllRanges(),this.addRange(t)},e.exports=p}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./rangeToTextRange":7}],6:[function(t,e){"use strict";function n(t,e){var n=typeof t[e];return"function"===n||!("object"!==n||!t[e])||"unknown"===n}function r(t,e){return"undefined"!=typeof t[e]}function o(t){return function(e,n){for(var r=n.length;r--;)if(!t(e,n[r]))return!1;return!0}}e.exports={method:n,methods:o(n),property:r,properties:o(r)}},{}],7:[function(t,e){(function(t){"use strict";function n(t){if(t.collapsed)return o({node:t.startContainer,offset:t.startOffset},!0);var e=o({node:t.startContainer,offset:t.startOffset},!0),n=o({node:t.endContainer,offset:t.endOffset},!1),r=a.createTextRange();return r.setEndPoint("StartToStart",e),r.setEndPoint("EndToEnd",n),r}function r(t){var e=t.nodeType;return 3===e||4===e||8===e}function o(t,e){var n,o,s,u,l=t.offset,c=a.createTextRange(),d=r(t.node);return d?(n=t.node,o=n.parentNode):(u=t.node.childNodes,n=l0)return{x:r[0].left,y:r[0].top,absolute:!0}}}return{x:0,y:0}}function y(e,n){var r=d.createElement("span"),o=e.mirror,i=e.computed;return g(o,p(t).substring(0,n)),"INPUT"===t.tagName&&(o.textContent=o.textContent.replace(/\s/g," ")),g(r,p(t).substring(n)||"."),o.appendChild(r),{x:r.offsetLeft+parseInt(i.borderLeftWidth),y:r.offsetTop+parseInt(i.borderTopWidth)}}function p(t){return b?t.value:t.innerHTML}function v(){function e(t){o[t]=n[t]}var n=c.getComputedStyle?getComputedStyle(t):t.currentStyle,r=d.createElement("div"),o=r.style;return d.body.appendChild(r),"INPUT"!==t.tagName&&(o.wordWrap="break-word"),o.whiteSpace="pre-wrap",o.position="absolute",o.visibility="hidden",l.forEach(e),f?(o.width=parseInt(n.width)-2+"px",t.scrollHeight>parseInt(n.height)&&(o.overflowY="scroll")):o.overflow="hidden",{mirror:r,computed:n}}function g(t,e){b?t.textContent=e:t.innerHTML=e}function _(e){var n=e?"remove":"add";i[n](t,"keydown",D),i[n](t,"keyup",D),i[n](t,"input",D),i[n](t,"paste",D),i[n](t,"change",D)}function w(){_(!0)}var b="INPUT"===t.tagName||"TEXTAREA"===t.tagName,D=s(a,30),M=e||{};return _(),{read:r,refresh:D,destroy:w}}var o=t("sell"),i=t("crossvent"),a=t("seleccion"),s=t("./throttle"),u=a.get,l=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"],c=n,d=document,f=null!==c.mozInnerScreenX&&void 0!==c.mozInnerScreenX;e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./throttle":12,crossvent:18,seleccion:8,sell:10}],12:[function(t,e){"use strict";function n(t,e){var n,r=-1/0;return function(){function o(){clearTimeout(n),n=null;var i=r+e,a=Date.now();a>i?(r=a,t()):n=setTimeout(o,i-a)}n||o()}}e.exports=n},{}],13:[function(t,e){"use strict";var n=t("ticky");e.exports=function(t,e,r){t&&n(function(){t.apply(r||null,e||[])})}},{ticky:16}],14:[function(t,e){"use strict";var n=t("atoa"),r=t("./debounce");e.exports=function(t,e){var o=e||{},i={};return void 0===t&&(t={}),t.on=function(e,n){return i[e]?i[e].push(n):i[e]=[n],t},t.once=function(e,n){return n._once=!0,t.on(e,n),t},t.off=function(e,n){var r=arguments.length;if(1===r)delete i[e];else if(0===r)i={};else{var o=i[e];if(!o)return t;o.splice(o.indexOf(n),1)}return t},t.emit=function(){var e=n(arguments);return t.emitterSnapshot(e.shift()).apply(this,e)},t.emitterSnapshot=function(e){var a=(i[e]||[]).slice(0);return function(){var i=n(arguments),s=this||t;if("error"===e&&o.throws!==!1&&!a.length)throw 1===i.length?i[0]:i;return a.forEach(function(n){o.async?r(n,i,s):n.apply(s,i),n._once&&t.off(e,n)}),t}},t}},{"./debounce":13,atoa:15}],15:[function(t,e){e.exports=function(t,e){return Array.prototype.slice.call(t,e)}},{}],16:[function(t,e){var n,r="function"==typeof setImmediate;n=r?function(t){setImmediate(t)}:function(t){setTimeout(t,0)},e.exports=n},{}],17:[function(t,e){(function(t){function n(){try{var t=new r("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(e){}return!1}var r=t.CustomEvent;e.exports=n()?r:"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],18:[function(t,e){(function(n){"use strict";function r(t,e,n,r){return t.addEventListener(e,n,r)}function o(t,e,n){return t.attachEvent("on"+e,l(t,e,n))}function i(t,e,n,r){return t.removeEventListener(e,n,r)}function a(t,e,n){return t.detachEvent("on"+e,c(t,e,n))}function s(t,e,n){function r(){var t;return m.createEvent?(t=m.createEvent("Event"),t.initEvent(e,!0,!0)):m.createEventObject&&(t=m.createEventObject()),t}function o(){return new f(e,{detail:n})}var i=-1===h.indexOf(e)?o():r();t.dispatchEvent?t.dispatchEvent(i):t.fireEvent("on"+e,i)}function u(t,e,r){return function(e){var o=e||n.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},o.which=o.which||o.keyCode,r.call(t,o)}}function l(t,e,n){var r=c(t,e,n)||u(t,e,n);return v.push({wrapper:r,element:t,type:e,fn:n}),r}function c(t,e,n){var r=d(t,e,n);if(r){var o=v[r].wrapper;return v.splice(r,1),o}}function d(t,e,n){var r,o;for(r=0;r0)for(n in Nr)r=Nr[n],o=e[r],"undefined"!=typeof o&&(t[r]=o);return t}function y(e){m(this,e),this._d=new Date(+e._d),Ir===!1&&(Ir=!0,t.updateOffset(this),Ir=!1)}function p(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function v(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function g(t,e,n){var r,o=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),a=0;for(r=0;o>r;r++)(n&&t[r]!==e[r]||!n&&v(t[r])!==v(e[r]))&&a++;return a+i}function _(){}function w(t){return t?t.toLowerCase().replace("_","-"):t}function b(t){for(var e,n,r,o,i=0;i0;){if(r=D(o.slice(0,e).join("-")))return r;if(n&&n.length>=e&&g(o,n,!0)>=e-1)break;e--}i++}return null}function D(t){var r=null;if(!Pr[t]&&"undefined"!=typeof n&&n&&n.exports)try{r=Ar._abbr,e("./locale/"+t),M(r)}catch(o){}return Pr[t]}function M(t,e){var n;return t&&(n="undefined"==typeof e?T(t):x(t,e),n&&(Ar=n)),Ar._abbr}function x(t,e){return null!==e?(e.abbr=t,Pr[t]||(Pr[t]=new _),Pr[t].set(e),M(t),Pr[t]):(delete Pr[t],null)}function T(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ar;if(!o(t)){if(e=D(t))return e;t=[t]}return b(t)}function Y(t,e){var n=t.toLowerCase();Rr[n]=Rr[n+"s"]=Rr[e]=t}function k(t){return"string"==typeof t?Rr[t]||Rr[t.toLowerCase()]:void 0}function S(t){var e,n,r={};for(n in t)s(t,n)&&(e=k(n),e&&(r[e]=t[n]));return r}function O(e,n){return function(r){return null!=r?(E(this,e,r),t.updateOffset(this,n),this):C(this,e)}}function C(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function E(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function F(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=k(t),"function"==typeof this[t])return this[t](e);return this}function A(t,e,n){for(var r=""+Math.abs(t),o=t>=0;r.lengthe;e++)r[e]=Lr[r[e]]?Lr[r[e]]:I(r[e]);return function(o){var i="";for(e=0;n>e;e++)i+=r[e]instanceof Function?r[e].call(o,t):r[e];return i}}function R(t,e){return t.isValid()?(e=H(e,t.localeData()),Wr[e]||(Wr[e]=P(e)),Wr[e](t)):t.localeData().invalidDate()}function H(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Ur.lastIndex=0;r>=0&&Ur.test(t);)t=t.replace(Ur,n),Ur.lastIndex=0,r-=1;return t}function U(t,e,n){no[t]="function"==typeof e?e:function(t){return t&&n?n:e}}function W(t,e){return s(no,t)?no[t](e._strict,e._locale):new RegExp(L(t))}function L(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,o){return e||n||r||o}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function G(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=v(t)}),n=0;nr;r++){if(o=l([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function $(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),z(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function X(e){return null!=e?($(this,e),t.updateOffset(this,!0),this):C(this,"Month")}function J(){return z(this.year(),this.month())}function Q(t){var e,n=t._a;return n&&-2===d(t).overflow&&(e=n[io]<0||n[io]>11?io:n[ao]<1||n[ao]>z(n[oo],n[io])?ao:n[so]<0||n[so]>24||24===n[so]&&(0!==n[uo]||0!==n[lo]||0!==n[co])?so:n[uo]<0||n[uo]>59?uo:n[lo]<0||n[lo]>59?lo:n[co]<0||n[co]>999?co:-1,d(t)._overflowDayOfYear&&(oo>e||e>ao)&&(e=ao),d(t).overflow=e),t}function K(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function te(t,e){var n=!0,r=t+"\n"+(new Error).stack;return u(function(){return n&&(K(r),n=!1),e.apply(this,arguments)},e)}function ee(t,e){mo[t]||(K(e),mo[t]=!0)}function ne(t){var e,n,r=t._i,o=yo.exec(r);if(o){for(d(t).iso=!0,e=0,n=po.length;n>e;e++)if(po[e][1].exec(r)){t._f=po[e][0]+(o[6]||" ");break}for(e=0,n=vo.length;n>e;e++)if(vo[e][1].exec(r)){t._f+=vo[e][0];break}r.match(Kr)&&(t._f+="Z"),be(t)}else t._isValid=!1}function re(e){var n=go.exec(e._i);return null!==n?(e._d=new Date(+n[1]),void 0):(ne(e),e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e)),void 0)}function oe(t,e,n,r,o,i,a){var s=new Date(t,e,n,r,o,i,a);return 1970>t&&s.setFullYear(t),s}function ie(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ae(t){return se(t)?366:365}function se(t){return t%4===0&&t%100!==0||t%400===0}function ue(){return se(this.year())}function le(t,e,n){var r,o=n-e,i=n-t.day();return i>o&&(i-=7),o-7>i&&(i+=7),r=Se(t).add(i,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ce(t){return le(t,this._week.dow,this._week.doy).week}function de(){return this._week.dow}function fe(){return this._week.doy}function he(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function me(t){var e=le(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function ye(t,e,n,r,o){var i,a,s=ie(t,0,1).getUTCDay();return s=0===s?7:s,n=null!=n?n:o,i=o-s+(s>r?7:0)-(o>s?7:0),a=7*(e-1)+(n-o)+i+1,{year:a>0?t:t-1,dayOfYear:a>0?a:ae(t-1)+a}}function pe(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function ve(t,e,n){return null!=t?t:null!=e?e:n}function ge(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function _e(t){var e,n,r,o,i=[];if(!t._d){for(r=ge(t),t._w&&null==t._a[ao]&&null==t._a[io]&&we(t),t._dayOfYear&&(o=ve(t._a[oo],r[oo]),t._dayOfYear>ae(o)&&(d(t)._overflowDayOfYear=!0),n=ie(o,0,t._dayOfYear),t._a[io]=n.getUTCMonth(),t._a[ao]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=i[e]=r[e];for(;7>e;e++)t._a[e]=i[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[so]&&0===t._a[uo]&&0===t._a[lo]&&0===t._a[co]&&(t._nextDay=!0,t._a[so]=0),t._d=(t._useUTC?ie:oe).apply(null,i),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[so]=24)}}function we(t){var e,n,r,o,i,a,s;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(i=1,a=4,n=ve(e.GG,t._a[oo],le(Se(),1,4).year),r=ve(e.W,1),o=ve(e.E,1)):(i=t._locale._week.dow,a=t._locale._week.doy,n=ve(e.gg,t._a[oo],le(Se(),i,a).year),r=ve(e.w,1),null!=e.d?(o=e.d,i>o&&++r):o=null!=e.e?e.e+i:i),s=ye(n,r,o,a,i),t._a[oo]=s.year,t._dayOfYear=s.dayOfYear}function be(e){if(e._f===t.ISO_8601)return ne(e),void 0;e._a=[],d(e).empty=!0;var n,r,o,i,a,s=""+e._i,u=s.length,l=0;for(o=H(e._f,e._locale).match(Hr)||[],n=0;n0&&d(e).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),l+=r.length),Lr[i]?(r?d(e).empty=!1:d(e).unusedTokens.push(i),V(i,r,e)):e._strict&&!r&&d(e).unusedTokens.push(i);d(e).charsLeftOver=u-l,s.length>0&&d(e).unusedInput.push(s),d(e).bigHour===!0&&e._a[so]<=12&&e._a[so]>0&&(d(e).bigHour=void 0),e._a[so]=De(e._locale,e._a[so],e._meridiem),_e(e),Q(e)}function De(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function Me(t){var e,n,r,o,i;if(0===t._f.length)return d(t).invalidFormat=!0,t._d=new Date(0/0),void 0;for(o=0;oi)&&(r=i,n=e));u(t,n||e)}function xe(t){if(!t._d){var e=S(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],_e(t)}}function Te(t){var e,n=t._i,r=t._f;return t._locale=t._locale||T(t._l),null===n||void 0===r&&""===n?h({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),p(n)?new y(Q(n)):(o(r)?Me(t):r?be(t):i(n)?t._d=n:Ye(t),e=new y(Q(t)),e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e))}function Ye(e){var n=e._i;void 0===n?e._d=new Date:i(n)?e._d=new Date(+n):"string"==typeof n?re(e):o(n)?(e._a=a(n.slice(0),function(t){return parseInt(t,10)}),_e(e)):"object"==typeof n?xe(e):"number"==typeof n?e._d=new Date(n):t.createFromInputFallback(e)}function ke(t,e,n,r,o){var i={};return"boolean"==typeof n&&(r=n,n=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=o,i._l=n,i._i=t,i._f=e,i._strict=r,Te(i)}function Se(t,e,n,r){return ke(t,e,n,r,!1)}function Oe(t,e){var n,r;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Se();for(n=e[0],r=1;rt&&(t=-t,n="-"),n+A(~~(t/60),2)+e+A(~~t%60,2)})}function Ie(t){var e=(t||"").match(Kr)||[],n=e[e.length-1]||[],r=(n+"").match(Mo)||["-",0,0],o=+(60*r[1])+v(r[2]);return"+"===r[0]?o:-o}function Pe(e,n){var r,o;return n._isUTC?(r=n.clone(),o=(p(e)||i(e)?+e:+Se(e))-+r,r._d.setTime(+r._d+o),t.updateOffset(r,!1),r):Se(e).local()}function Re(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function He(e,n){var r,o=this._offset||0;return null!=e?("string"==typeof e&&(e=Ie(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&n&&(r=Re(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!n||this._changeInProgress?tn(this,$e(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?o:Re(this)}function Ue(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function We(t){return this.utcOffset(0,t)}function Le(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Re(this),"m")),this}function Ge(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ie(this._i)),this}function je(t){return t=t?Se(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Ve(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ze(){if(this._a){var t=this._isUTC?l(this._a):Se(this._a);return this.isValid()&&g(this._a,t.toArray())>0}return!1}function Be(){return!this._isUTC}function Ze(){return this._isUTC}function qe(){return this._isUTC&&0===this._offset}function $e(t,e){var n,r,o,i=t,a=null;return Ae(t)?i={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(i={},e?i[e]=t:i.milliseconds=t):(a=xo.exec(t))?(n="-"===a[1]?-1:1,i={y:0,d:v(a[ao])*n,h:v(a[so])*n,m:v(a[uo])*n,s:v(a[lo])*n,ms:v(a[co])*n}):(a=To.exec(t))?(n="-"===a[1]?-1:1,i={y:Xe(a[2],n),M:Xe(a[3],n),d:Xe(a[4],n),h:Xe(a[5],n),m:Xe(a[6],n),s:Xe(a[7],n),w:Xe(a[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=Qe(Se(i.from),Se(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),r=new Fe(i),Ae(t)&&s(t,"_locale")&&(r._locale=t._locale),r}function Xe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Je(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Qe(t,e){var n;return e=Pe(e,t),t.isBefore(e)?n=Je(t,e):(n=Je(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Ke(t,e){return function(n,r){var o,i;return null===r||isNaN(+r)||(ee(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),i=n,n=r,r=i),n="string"==typeof n?+n:n,o=$e(n,r),tn(this,o,t),this}}function tn(e,n,r,o){var i=n._milliseconds,a=n._days,s=n._months;o=null==o?!0:o,i&&e._d.setTime(+e._d+i*r),a&&E(e,"Date",C(e,"Date")+a*r),s&&$(e,C(e,"Month")+s*r),o&&t.updateOffset(e,a||s)}function en(t){var e=t||Se(),n=Pe(e,this).startOf("day"),r=this.diff(n,"days",!0),o=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(o,this,Se(e)))}function nn(){return new y(this)}function rn(t,e){var n;return e=k("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=p(t)?t:Se(t),+this>+t):(n=p(t)?+t:+Se(t),n<+this.clone().startOf(e))}function on(t,e){var n;return e=k("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=p(t)?t:Se(t),+t>+this):(n=p(t)?+t:+Se(t),+this.clone().endOf(e)t?Math.ceil(t):Math.floor(t)}function ln(t,e,n){var r,o,i=Pe(t,this),a=6e4*(i.utcOffset()-this.utcOffset());return e=k(e),"year"===e||"month"===e||"quarter"===e?(o=cn(this,i),"quarter"===e?o/=3:"year"===e&&(o/=12)):(r=this-i,o="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-a)/864e5:"week"===e?(r-a)/6048e5:r),n?o:un(o)}function cn(t,e){var n,r,o=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(o,"months");return 0>e-i?(n=t.clone().add(o-1,"months"),r=(e-i)/(i-n)):(n=t.clone().add(o+1,"months"),r=(e-i)/(n-i)),-(o+r)}function dn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function fn(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=Se([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Ln(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Pn(t,this.localeData()),this.add(t-e,"d")):e}function Gn(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function jn(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Vn(t,e){N(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function zn(t,e){return e._meridiemParse}function Bn(t){return"p"===(t+"").toLowerCase().charAt(0)}function Zn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function qn(t){N(0,[t,3],0,"millisecond")}function $n(){return this._isUTC?"UTC":""}function Xn(){return this._isUTC?"Coordinated Universal Time":""}function Jn(t){return Se(1e3*t)}function Qn(){return Se.apply(null,arguments).parseZone()}function Kn(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.call(e,n):r}function tr(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e}function er(){return this._invalidDate}function nr(t){return this._ordinal.replace("%d",t)}function rr(t){return t}function or(t,e,n,r){var o=this._relativeTime[n];return"function"==typeof o?o(t,e,n,r):o.replace(/%d/i,t)}function ir(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function ar(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function sr(t,e,n,r){var o=T(),i=l().set(r,e);return o[n](i,t)}function ur(t,e,n,r,o){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return sr(t,e,n,o);var i,a=[];for(i=0;r>i;i++)a[i]=sr(t,i,n,o);return a}function lr(t,e){return ur(t,e,"months",12,"month")}function cr(t,e){return ur(t,e,"monthsShort",12,"month")}function dr(t,e){return ur(t,e,"weekdays",7,"day")}function fr(t,e){return ur(t,e,"weekdaysShort",7,"day")}function hr(t,e){return ur(t,e,"weekdaysMin",7,"day")}function mr(){var t=this._data;return this._milliseconds=Zo(this._milliseconds),this._days=Zo(this._days),this._months=Zo(this._months),t.milliseconds=Zo(t.milliseconds),t.seconds=Zo(t.seconds),t.minutes=Zo(t.minutes),t.hours=Zo(t.hours),t.months=Zo(t.months),t.years=Zo(t.years),this}function yr(t,e,n,r){var o=$e(e,n);return t._milliseconds+=r*o._milliseconds,t._days+=r*o._days,t._months+=r*o._months,t._bubble()}function pr(t,e){return yr(this,t,e,1)}function vr(t,e){return yr(this,t,e,-1)}function gr(){var t,e,n,r=this._milliseconds,o=this._days,i=this._months,a=this._data,s=0;return a.milliseconds=r%1e3,t=un(r/1e3),a.seconds=t%60,e=un(t/60),a.minutes=e%60,n=un(e/60),a.hours=n%24,o+=un(n/24),s=un(_r(o)),o-=un(wr(s)),i+=un(o/30),o%=30,s+=un(i/12),i%=12,a.days=o,a.months=i,a.years=s,this}function _r(t){return 400*t/146097}function wr(t){return 146097*t/400}function br(t){var e,n,r=this._milliseconds;if(t=k(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+12*_r(e),"month"===t?n:n/12;switch(e=this._days+Math.round(wr(this._months/12)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function Dr(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function Mr(t){return function(){return this.as(t)}}function xr(t){return t=k(t),this[t+"s"]()}function Tr(t){return function(){return this._data[t]}}function Yr(){return un(this.days()/7)}function kr(t,e,n,r,o){return o.relativeTime(e||1,!!n,t,r)}function Sr(t,e,n){var r=$e(t).abs(),o=li(r.as("s")),i=li(r.as("m")),a=li(r.as("h")),s=li(r.as("d")),u=li(r.as("M")),l=li(r.as("y")),c=o0,c[4]=n,kr.apply(null,c)}function Or(t,e){return void 0===ci[t]?!1:void 0===e?ci[t]:(ci[t]=e,!0)}function Cr(t){var e=this.localeData(),n=Sr(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Er(){var t=di(this.years()),e=di(this.months()),n=di(this.days()),r=di(this.hours()),o=di(this.minutes()),i=di(this.seconds()+this.milliseconds()/1e3),a=this.asSeconds();return a?(0>a?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||o||i?"T":"")+(r?r+"H":"")+(o?o+"M":"")+(i?i+"S":""):"P0D"}var Fr,Ar,Nr=t.momentProperties=[],Ir=!1,Pr={},Rr={},Hr=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ur=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Wr={},Lr={},Gr=/\d/,jr=/\d\d/,Vr=/\d{3}/,zr=/\d{4}/,Br=/[+-]?\d{6}/,Zr=/\d\d?/,qr=/\d{1,3}/,$r=/\d{1,4}/,Xr=/[+-]?\d{1,6}/,Jr=/\d+/,Qr=/[+-]?\d+/,Kr=/Z|[+-]\d\d:?\d\d/gi,to=/[+-]?\d+(\.\d{1,3})?/,eo=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,no={},ro={},oo=0,io=1,ao=2,so=3,uo=4,lo=5,co=6;N("M",["MM",2],"Mo",function(){return this.month()+1}),N("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),N("MMMM",0,0,function(t){return this.localeData().months(this,t)}),Y("month","M"),U("M",Zr),U("MM",Zr,jr),U("MMM",eo),U("MMMM",eo),G(["M","MM"],function(t,e){e[io]=v(t)-1}),G(["MMM","MMMM"],function(t,e,n,r){var o=n._locale.monthsParse(t,r,n._strict);null!=o?e[io]=o:d(n).invalidMonth=t});var fo="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ho="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mo={};t.suppressDeprecationWarnings=!1;var yo=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,po=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],vo=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],go=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=te("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),N(0,["YY",2],0,function(){return this.year()%100}),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),Y("year","y"),U("Y",Qr),U("YY",Zr,jr),U("YYYY",$r,zr),U("YYYYY",Xr,Br),U("YYYYYY",Xr,Br),G(["YYYY","YYYYY","YYYYYY"],oo),G("YY",function(e,n){n[oo]=t.parseTwoDigitYear(e)}),t.parseTwoDigitYear=function(t){return v(t)+(v(t)>68?1900:2e3)};var _o=O("FullYear",!1);N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),Y("week","w"),Y("isoWeek","W"),U("w",Zr),U("ww",Zr,jr),U("W",Zr),U("WW",Zr,jr),j(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=v(t)});var wo={dow:0,doy:6};N("DDD",["DDDD",3],"DDDo","dayOfYear"),Y("dayOfYear","DDD"),U("DDD",qr),U("DDDD",Vr),G(["DDD","DDDD"],function(t,e,n){n._dayOfYear=v(t)}),t.ISO_8601=function(){};var bo=te("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Se.apply(null,arguments);return this>t?this:t}),Do=te("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Se.apply(null,arguments);return t>this?this:t});Ne("Z",":"),Ne("ZZ",""),U("Z",Kr),U("ZZ",Kr),G(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ie(t)});var Mo=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var xo=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,To=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;$e.fn=Fe.prototype;var Yo=Ke(1,"add"),ko=Ke(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var So=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});N(0,["gg",2],0,function(){return this.weekYear()%100}),N(0,["GG",2],0,function(){return this.isoWeekYear()%100}),On("gggg","weekYear"),On("ggggg","weekYear"),On("GGGG","isoWeekYear"),On("GGGGG","isoWeekYear"),Y("weekYear","gg"),Y("isoWeekYear","GG"),U("G",Qr),U("g",Qr),U("GG",Zr,jr),U("gg",Zr,jr),U("GGGG",$r,zr),U("gggg",$r,zr),U("GGGGG",Xr,Br),U("ggggg",Xr,Br),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=v(t)}),j(["gg","GG"],function(e,n,r,o){n[o]=t.parseTwoDigitYear(e)}),N("Q",0,0,"quarter"),Y("quarter","Q"),U("Q",Gr),G("Q",function(t,e){e[io]=3*(v(t)-1)}),N("D",["DD",2],"Do","date"),Y("date","D"),U("D",Zr),U("DD",Zr,jr),U("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),G(["D","DD"],ao),G("Do",function(t,e){e[ao]=v(t.match(Zr)[0],10)});var Oo=O("Date",!0);N("d",0,"do","day"),N("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),N("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),N("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),Y("day","d"),Y("weekday","e"),Y("isoWeekday","E"),U("d",Zr),U("e",Zr),U("E",Zr),U("dd",eo),U("ddd",eo),U("dddd",eo),j(["dd","ddd","dddd"],function(t,e,n){var r=n._locale.weekdaysParse(t);null!=r?e.d=r:d(n).invalidWeekday=t}),j(["d","e","E"],function(t,e,n,r){e[r]=v(t)});var Co="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Eo="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fo="Su_Mo_Tu_We_Th_Fr_Sa".split("_");N("H",["HH",2],0,"hour"),N("h",["hh",2],0,function(){return this.hours()%12||12}),Vn("a",!0),Vn("A",!1),Y("hour","h"),U("a",zn),U("A",zn),U("H",Zr),U("h",Zr),U("HH",Zr,jr),U("hh",Zr,jr),G(["H","HH"],so),G(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),G(["h","hh"],function(t,e,n){e[so]=v(t),d(n).bigHour=!0});var Ao=/[ap]\.?m?\.?/i,No=O("Hours",!0);N("m",["mm",2],0,"minute"),Y("minute","m"),U("m",Zr),U("mm",Zr,jr),G(["m","mm"],uo);var Io=O("Minutes",!1);N("s",["ss",2],0,"second"),Y("second","s"),U("s",Zr),U("ss",Zr,jr),G(["s","ss"],lo);var Po=O("Seconds",!1);N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),qn("SSS"),qn("SSSS"),Y("millisecond","ms"),U("S",qr,Gr),U("SS",qr,jr),U("SSS",qr,Vr),U("SSSS",Jr),G(["S","SS","SSS","SSSS"],function(t,e){e[co]=v(1e3*("0."+t))});var Ro=O("Milliseconds",!1);N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var Ho=y.prototype;Ho.add=Yo,Ho.calendar=en,Ho.clone=nn,Ho.diff=ln,Ho.endOf=bn,Ho.format=hn,Ho.from=mn,Ho.fromNow=yn,Ho.to=pn,Ho.toNow=vn,Ho.get=F,Ho.invalidAt=Sn,Ho.isAfter=rn,Ho.isBefore=on,Ho.isBetween=an,Ho.isSame=sn,Ho.isValid=Yn,Ho.lang=So,Ho.locale=gn,Ho.localeData=_n,Ho.max=Do,Ho.min=bo,Ho.parsingFlags=kn,Ho.set=F,Ho.startOf=wn,Ho.subtract=ko,Ho.toArray=Tn,Ho.toDate=xn,Ho.toISOString=fn,Ho.toJSON=fn,Ho.toString=dn,Ho.unix=Mn,Ho.valueOf=Dn,Ho.year=_o,Ho.isLeapYear=ue,Ho.weekYear=En,Ho.isoWeekYear=Fn,Ho.quarter=Ho.quarters=In,Ho.month=X,Ho.daysInMonth=J,Ho.week=Ho.weeks=he,Ho.isoWeek=Ho.isoWeeks=me,Ho.weeksInYear=Nn,Ho.isoWeeksInYear=An,Ho.date=Oo,Ho.day=Ho.days=Ln,Ho.weekday=Gn,Ho.isoWeekday=jn,Ho.dayOfYear=pe,Ho.hour=Ho.hours=No,Ho.minute=Ho.minutes=Io,Ho.second=Ho.seconds=Po,Ho.millisecond=Ho.milliseconds=Ro,Ho.utcOffset=He,Ho.utc=We,Ho.local=Le,Ho.parseZone=Ge,Ho.hasAlignedHourOffset=je,Ho.isDST=Ve,Ho.isDSTShifted=ze,Ho.isLocal=Be,Ho.isUtcOffset=Ze,Ho.isUtc=qe,Ho.isUTC=qe,Ho.zoneAbbr=$n,Ho.zoneName=Xn,Ho.dates=te("dates accessor is deprecated. Use date instead.",Oo),Ho.months=te("months accessor is deprecated. Use month instead",X),Ho.years=te("years accessor is deprecated. Use year instead",_o),Ho.zone=te("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ue);var Uo=Ho,Wo={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Lo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Go="Invalid date",jo="%d",Vo=/\d{1,2}/,zo={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Bo=_.prototype;Bo._calendar=Wo,Bo.calendar=Kn,Bo._longDateFormat=Lo,Bo.longDateFormat=tr,Bo._invalidDate=Go,Bo.invalidDate=er,Bo._ordinal=jo,Bo.ordinal=nr,Bo._ordinalParse=Vo,Bo.preparse=rr,Bo.postformat=rr,Bo._relativeTime=zo,Bo.relativeTime=or,Bo.pastFuture=ir,Bo.set=ar,Bo.months=B,Bo._months=fo,Bo.monthsShort=Z,Bo._monthsShort=ho,Bo.monthsParse=q,Bo.week=ce,Bo._week=wo,Bo.firstDayOfYear=fe,Bo.firstDayOfWeek=de,Bo.weekdays=Rn,Bo._weekdays=Co,Bo.weekdaysMin=Un,Bo._weekdaysMin=Fo,Bo.weekdaysShort=Hn,Bo._weekdaysShort=Eo,Bo.weekdaysParse=Wn,Bo.isPM=Bn,Bo._meridiemParse=Ao,Bo.meridiem=Zn,M("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===v(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=te("moment.lang is deprecated. Use moment.locale instead.",M),t.langData=te("moment.langData is deprecated. Use moment.localeData instead.",T);var Zo=Math.abs,qo=Mr("ms"),$o=Mr("s"),Xo=Mr("m"),Jo=Mr("h"),Qo=Mr("d"),Ko=Mr("w"),ti=Mr("M"),ei=Mr("y"),ni=Tr("milliseconds"),ri=Tr("seconds"),oi=Tr("minutes"),ii=Tr("hours"),ai=Tr("days"),si=Tr("months"),ui=Tr("years"),li=Math.round,ci={s:45,m:45,h:22,d:26,M:11},di=Math.abs,fi=Fe.prototype;fi.abs=mr,fi.add=pr,fi.subtract=vr,fi.as=br,fi.asMilliseconds=qo,fi.asSeconds=$o,fi.asMinutes=Xo,fi.asHours=Jo,fi.asDays=Qo,fi.asWeeks=Ko,fi.asMonths=ti,fi.asYears=ei,fi.valueOf=Dr,fi._bubble=gr,fi.get=xr,fi.milliseconds=ni,fi.seconds=ri,fi.minutes=oi,fi.hours=ii,fi.days=ai,fi.weeks=Yr,fi.months=si,fi.years=ui,fi.humanize=Cr,fi.toISOString=Er,fi.toString=Er,fi.toJSON=Er,fi.locale=gn,fi.localeData=_n,fi.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Er),fi.lang=So,N("X",0,0,"unix"),N("x",0,0,"valueOf"),U("x",Qr),U("X",to),G("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),G("x",function(t,e,n){n._d=new Date(v(t))}),t.version="2.10.3",r(Se),t.fn=Uo,t.min=Ce,t.max=Ee,t.utc=l,t.unix=Jn,t.months=lr,t.isDate=i,t.locale=M,t.invalid=h,t.duration=$e,t.isMoment=p,t.weekdays=dr,t.parseZone=Qn,t.localeData=T,t.isDuration=Ae,t.monthsShort=cr,t.weekdaysMin=hr,t.defineLocale=x,t.weekdaysShort=fr,t.normalizeUnits=k,t.relativeTimeThreshold=Or;var hi=t;return hi})},{}],21:[function(t,e){"use strict";function n(t,e){var n=u[t.id];return n&&n[e.id]}function r(t,e){var n=u[t.id];n||(n=u[t.id]={});var r=i(e);n[e.id]=r,t.on("data",r),t.on("destroyed",o.bind(null,t,e))}function o(t,e){var n=u[t.id];if(n){var r=n[e.id];t.off("data",r),delete n[e.id]}}function i(t){return function(){t.refresh()}}function a(t,e){s(e.associated)||n(t,e)||r(t,e)}var s=t("./isInput"),u={};e.exports={add:a,remove:o}},{"./isInput":31}],22:[function(t,e){"use strict";function n(t){function e(){return Oe}function n(n){return ce=c(n||t,Oe),he||(he=a({className:ce.styles.container})),me=ce.weekdayFormat,ye=me.length,ve=r,pe=r,ge=r,_e=r,ce.appendTo.appendChild(he),Z(he),Te=!1,de=ce.initialValue?ce.initialValue:d.moment(),fe=de.clone(),Oe.back=I,Oe.container=he,Oe.destroyed=!1,Oe.destroy=y.bind(Oe,!1),Oe.emitValues=V,Oe.getDate=se,Oe.getDateString=ue,Oe.getMoment=le,Oe.hide=C,Oe.next=P,Oe.options=v,Oe.options.reset=g,Oe.refresh=z,Oe.restore=e,Oe.setValue=B,Oe.show=O,p(),m(),Oe}function m(){Oe.emit("ready",l(ce))}function y(t){he&&he.parentNode&&he.parentNode.removeChild(he),ce&&p(!0);var r=Oe.emitterSnapshot("destroyed");return Oe.back=h,Oe.destroyed=!0,Oe.destroy=e,Oe.emitValues=e,Oe.getDate=h,Oe.getDateString=h,Oe.getMoment=h,Oe.hide=e,Oe.next=h,Oe.options=e,Oe.options.reset=e,Oe.refresh=e,Oe.restore=n,Oe.setValue=e,Oe.show=e,Oe.off(),t!==!0&&r(),Oe}function p(t){var e=t?"remove":"add";ce.autoHideOnBlur&&o[e](document.documentElement,"focus",A,!0),ce.autoHideOnClick&&o[e](document,"click",N)}function v(t){return 0===arguments.length?l(ce):(y(),n(t),Oe)}function g(){return v({appendTo:ce.appendTo})}function _(){Te||(Te=!0,w(),b(),Oe.emit("render"))}function w(){function t(t){var e=a({className:ce.styles.month,parent:we});0===t&&(be=a({type:"button",className:ce.styles.back,attributes:{type:"button"},parent:e})),t===ce.monthsInCalendar-1&&(De=a({type:"button",className:ce.styles.next,attributes:{type:"button"},parent:e}));var n,r=a({className:ce.styles.monthLabel,parent:e}),o=a({type:"table",className:ce.styles.dayTable,parent:e}),i=a({type:"thead",className:ce.styles.dayHead,parent:o}),s=a({type:"tr",className:ce.styles.dayRow,parent:i}),u=a({type:"tbody",className:ce.styles.dayBody,parent:o});for(n=0;ye>n;n++)a({type:"th",className:ce.styles.dayHeadElem,parent:s,text:me[D(n)]});u.setAttribute(Ye,t),ke.push({label:r,body:u})}if(ce.date){var e;for(ke=[],we=a({className:ce.styles.date,parent:he}),e=0;e=ye||0>r)&&(r+=ye*-n),r}function M(){if(ce.time&&Te){var t,e,n,r,o=xe.children,i=o.length;for(r=0;i>r;r++)n=o[r],e=d.moment(s(n),ce.timeFormat),t=ie(de.clone(),e),n.style.display=X(t,!1,ce.timeValidator)?"block":"none"}}function x(t){var e="boolean"==typeof t?t:"none"===xe.style.display;e?T():Y()}function T(){xe&&(xe.style.display="block")}function Y(){xe&&(xe.style.display="none")}function k(){he.style.display="inline-block",Oe.emit("show")}function S(){"none"!==he.style.display&&(he.style.display="none",Oe.emit("hide"))}function O(){return _(),z(),x(!ce.date),k(),Oe}function C(){return Y(),setTimeout(S,0),Oe}function E(){Y();var t=f.contains(he,ce.styles.positioned);return t&&setTimeout(S,0),Oe}function F(t){var e=t.target;if(e===Oe.associated)return!0;for(;e;){if(e===he)return!0;e=e.parentNode}}function A(t){F(t)||E()}function N(t){F(t)||E()}function I(){R("subtract")}function P(){R("add")}function R(t){var e,n="add"===t?-1:1,r=ce.monthsInCalendar+n*oe(_e);fe[t](r,"months"),e=K(fe.clone()),de=e||de,e&&(fe=e.clone()),H(),Oe.emit("add"===t?"next":"back",de.month())}function H(t){U(),j(),t!==!0&&V(),M()}function U(){function t(t,e){var n=fe.clone().add(e,"months");s(t.label,n.format(ce.monthFormat)),Z(t.body)}if(ce.date&&Te){var e=fe.year(),n=fe.month(),r=fe.date();if(r!==ge||n!==ve||e!==pe){var o=L();if(ge=fe.date(),ve=fe.month(),pe=fe.year(),o)return W(),void 0;ke.forEach(t),q()}}}function W(){function t(t){var e,n=[];for(e=0;ee;e++)if(n.add(ce.timeInterval,"seconds"),n.date()>t.date()&&n.subtract(1,"days"),ce.timeValidator.call(Oe,n.toDate())!==!1)return n}function ee(t,e,n){for(var r=!1;r===!1&&(t[n](1,"days"),t.month()===e.month());)r=ce.dateValidator.call(Oe,t.toDate());return r!==!1}function ne(t){var e=t.target;if(!f.contains(e,ce.styles.dayDisabled)&&f.contains(e,ce.styles.dayBodyElem)){var n=parseInt(s(e),10),r=f.contains(e,ce.styles.dayPrevMonth),o=f.contains(e,ce.styles.dayNextMonth),i=oe(e)-oe(_e);de.add(i,"months"),(r||o)&&de.add(r?-1:1,"months"),re(e),de.date(n),ie(de,K(de)||de),fe=de.clone(),ce.autoClose===!0&&E(),H()}}function re(t){_e&&f.remove(_e,ce.styles.selectedDay),t&&f.add(t,ce.styles.selectedDay),_e=t}function oe(t){for(var e;t&&t.getAttribute;){if(e=t.getAttribute(Ye),"string"==typeof e)return parseInt(e,10);t=t.parentNode}return 0}function ie(t,e){return t.hour(e.hour()).minute(e.minute()).second(e.second()),t}function ae(t){var e=t.target;if(f.contains(e,ce.styles.timeOption)){var n=d.moment(s(e),ce.timeFormat);ie(de,n),fe=de.clone(),V(),j(),!ce.date&&ce.autoClose===!0||"time"===ce.autoClose?E():Y()}}function se(){return de.toDate()}function ue(t){return de.format(t||ce.inputFormat)}function le(){return de.clone()}var ce,de,fe,he,me,ye,pe,ve,ge,_e,we,be,De,Me,xe,Te=!1,Ye="data-rome-offset",ke=[],Se=86400,Oe=i({associated:t.associated});return n(),setTimeout(m,0),Oe}var r,o=t("crossvent"),i=t("contra/emitter"),a=t("./dom"),s=t("./text"),u=t("./parse"),l=t("./clone"),c=t("./defaults"),d=t("./momentum"),f=t("./classes"),h=t("./noop");e.exports=n},{"./classes":23,"./clone":24,"./defaults":26,"./dom":27,"./momentum":32,"./noop":33,"./parse":34,"./text":46,"contra/emitter":14,crossvent:18}],23:[function(t,e){"use strict";function n(t){return t.className.replace(s,"").split(u)}function r(t,e){t.className=e.join(" ")}function o(t,e){var n=i(t,e);n.push(e),r(t,n)}function i(t,e){var o=n(t),i=o.indexOf(e);return-1!==i&&(o.splice(i,1),r(t,o)),o}function a(t,e){return-1!==n(t).indexOf(e)}var s=/^\s+|\s+$/g,u=/\s+/;e.exports={add:o,remove:i,contains:a}},{}],24:[function(t,e){"use strict";function n(t){var e,o={};for(var i in t)e=t[i],o[i]=e?r.isMoment(e)?e.clone():e._isStylesConfiguration?n(e):e:e;return o}var r=t("./momentum");e.exports=n},{"./momentum":32}],25:[function(t,e){"use strict";function n(t,e){var n,s=r.find(t);return s?s:(n=a(t)?o(t,e):i(t,e),r.assign(t,n),n)}var r=t("./index"),o=t("./input"),i=t("./inline"),a=t("./isInput");e.exports=n},{"./index":28,"./inline":29,"./input":30,"./isInput":31}],26:[function(t,e){"use strict";function n(t,e){var n,a,s=t||{};if(s.autoHideOnClick===a&&(s.autoHideOnClick=!0),s.autoHideOnBlur===a&&(s.autoHideOnBlur=!0),s.autoClose===a&&(s.autoClose=!0),s.appendTo===a&&(s.appendTo=document.body),"parent"===s.appendTo){if(!o(e.associated))throw new Error("Inline calendars must be appended to a parent node explicitly.");s.appendTo=e.associated.parentNode}if(s.invalidate===a&&(s.invalidate=!0),s.required===a&&(s.required=!1),s.date===a&&(s.date=!0),s.time===a&&(s.time=!0),s.date===!1&&s.time===!1)throw new Error("At least one of `date` or `time` must be `true`.");if(s.inputFormat===a&&(s.inputFormat=s.date&&s.time?"YYYY-MM-DD HH:mm":s.date?"YYYY-MM-DD":"HH:mm"),s.initialValue=s.initialValue===a?null:r(s.initialValue,s.inputFormat),s.min=s.min===a?null:r(s.min,s.inputFormat),s.max=s.max===a?null:r(s.max,s.inputFormat),s.timeInterval===a&&(s.timeInterval=1800),s.min&&s.max)if(s.max.isBefore(s.min)&&(n=s.max,s.max=s.min,s.min=n),s.date===!0){if(s.max.clone().subtract(1,"days").isBefore(s.min))throw new Error("`max` must be at least one day after `min`")}else if(1e3*s.timeInterval-s.min%(1e3*s.timeInterval)>s.max-s.min)throw new Error("`min` to `max` range must allow for at least one time option that matches `timeInterval`");if(s.dateValidator===a&&(s.dateValidator=Function.prototype),s.timeValidator===a&&(s.timeValidator=Function.prototype),s.timeFormat===a&&(s.timeFormat="HH:mm"),s.weekStart===a&&(s.weekStart=i.moment().weekday(0).day()),s.weekdayFormat===a&&(s.weekdayFormat="min"),"long"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdays();else if("short"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdaysShort();else if("min"===s.weekdayFormat)s.weekdayFormat=i.moment.weekdaysMin();else if(!Array.isArray(s.weekdayFormat)||s.weekdayFormat.length<7)throw new Error("`weekdays` must be `min`, `short`, or `long`");s.monthsInCalendar===a&&(s.monthsInCalendar=1),s.monthFormat===a&&(s.monthFormat="MMMM YYYY"),s.dayFormat===a&&(s.dayFormat="DD"),s.styles===a&&(s.styles={}),s.styles._isStylesConfiguration=!0;var u=s.styles;return u.back===a&&(u.back="rd-back"),u.container===a&&(u.container="rd-container"),u.positioned===a&&(u.positioned="rd-container-attachment"),u.date===a&&(u.date="rd-date"),u.dayBody===a&&(u.dayBody="rd-days-body"),u.dayBodyElem===a&&(u.dayBodyElem="rd-day-body"),u.dayPrevMonth===a&&(u.dayPrevMonth="rd-day-prev-month"),u.dayNextMonth===a&&(u.dayNextMonth="rd-day-next-month"),u.dayDisabled===a&&(u.dayDisabled="rd-day-disabled"),u.dayConcealed===a&&(u.dayConcealed="rd-day-concealed"),u.dayHead===a&&(u.dayHead="rd-days-head"),u.dayHeadElem===a&&(u.dayHeadElem="rd-day-head"),u.dayRow===a&&(u.dayRow="rd-days-row"),u.dayTable===a&&(u.dayTable="rd-days"),u.month===a&&(u.month="rd-month"),u.monthLabel===a&&(u.monthLabel="rd-month-label"),u.next===a&&(u.next="rd-next"),u.selectedDay===a&&(u.selectedDay="rd-day-selected"),u.selectedTime===a&&(u.selectedTime="rd-time-selected"),u.time===a&&(u.time="rd-time"),u.timeList===a&&(u.timeList="rd-time-list"),u.timeOption===a&&(u.timeOption="rd-time-option"),s}var r=t("./parse"),o=t("./isInput"),i=t("./momentum");e.exports=n},{"./isInput":31,"./momentum":32,"./parse":34}],27:[function(t,e){"use strict";function n(t){var e=t||{};e.type||(e.type="div");var n=document.createElement(e.type);return e.className&&(n.className=e.className),e.text&&(n.innerText=n.textContent=e.text),e.attributes&&Object.keys(e.attributes).forEach(function(t){n.setAttribute(t,e.attributes[t])}),e.parent&&e.parent.appendChild(n),n}e.exports=n},{}],28:[function(t,e){"use strict";function n(t){if("number"!=typeof t&&t&&t.getAttribute)return n(t.getAttribute(i));var e=a[t];return e!==o?e:null}function r(t,e){t.setAttribute(i,e.id=a.push(e)-1)}var o,i="data-rome-id",a=[];e.exports={find:n,assign:r}},{}],29:[function(t,e){"use strict";function n(t,e){var n=e||{};n.appendTo=t,n.associated=t;var o=r(n);return o.show(),o}var r=t("./calendar");e.exports=n},{"./calendar":22}],30:[function(t,e){"use strict";function n(t,e){function n(e){w=a(e||w,x),l.add(x.container,w.styles.positioned),r.add(x.container,"mousedown",h),r.add(x.container,"click",f),x.getDate=_(x.getDate),x.getDateString=_(x.getDateString),x.getMoment=_(x.getMoment),w.initialValue&&(t.value=w.initialValue.format(w.inputFormat)),M=o(x.container,t),x.on("data",v),x.on("show",M.refresh),d(),T()}function c(){d(!0),M.destroy(),M=null}function d(e){var o=e?"remove":"add";r[o](t,"click",y),r[o](t,"touchend",y),r[o](t,"focusin",y),r[o](t,"change",T),r[o](t,"keypress",T),r[o](t,"keydown",T),r[o](t,"input",T),w.invalidate&&r[o](t,"blur",m),e?(x.once("ready",n),x.off("destroyed",c)):(x.off("ready",n),x.once("destroyed",c))}function f(){D=!0,t.focus(),D=!1}function h(){function t(){b=!1}b=!0,setTimeout(t,0)}function m(){b||g()||x.emitValues()}function y(){D||x.show()}function p(){var e=t.value.trim();if(!g()){var n=u.moment(e,w.inputFormat,w.strictParse);x.setValue(n)}}function v(e){t.value=e}function g(){return w.required===!1&&""===t.value.trim()}function _(t){return function(){return g()?null:t.apply(this,arguments)}}var w=e||{};w.associated=t;var b,D,M,x=s(w),T=i(p,30);return n(w),x}var r=t("crossvent"),o=t("bullseye"),i=t("./throttle"),a=(t("./clone"),t("./defaults")),s=t("./calendar"),u=t("./momentum"),l=t("./classes"); e.exports=n},{"./calendar":22,"./classes":23,"./clone":24,"./defaults":26,"./momentum":32,"./throttle":47,bullseye:1,crossvent:18}],31:[function(t,e){"use strict";function n(t){return t&&t.nodeName&&"input"===t.nodeName.toLowerCase()}e.exports=n},{}],32:[function(t,e){"use strict";function n(t){return t&&Object.prototype.hasOwnProperty.call(t,"_isAMomentObject")}var r={moment:null,isMoment:n};e.exports=r},{}],33:[function(t,e){"use strict";function n(){}e.exports=n},{}],34:[function(t,e){"use strict";function n(t,e){return"string"==typeof t?o.moment(t,e):"[object Date]"===Object.prototype.toString.call(t)?o.moment(t):o.isMoment(t)?t.clone():void 0}function r(t,e){var r=n(t,"string"==typeof e?e:null);return r&&r.isValid()?r:null}var o=t("./momentum");e.exports=r},{"./momentum":32}],35:[function(){"use strict";Array.prototype.filter||(Array.prototype.filter=function(t,e){var n=[];return this.forEach(function(r,o,i){t.call(e,r,o,i)&&n.push(r)},e),n})},{}],36:[function(){"use strict";Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var n=this,r=n.length,o=0;r>o;o++)o in n&&t.call(e,n[o],o,n)})},{}],37:[function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){if(void 0===this||null===this)throw new TypeError;var n=this.length;for(e=+e||0,1/0===Math.abs(e)?e=0:0>e&&(e+=n,0>e&&(e=0));n>e;e++)if(this[e]===t)return e;return-1})},{}],38:[function(){"use strict";Array.isArray||(Array.isArray=function(t){return""+t!==t&&"[object Array]"===Object.prototype.toString.call(t)})},{}],39:[function(){"use strict";Array.prototype.map||(Array.prototype.map=function(t,e){var n,r,o;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),a=i.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=new Array(a),o=0;a>o;)o in i&&(r[o]=t.call(n,i[o],o,i)),o++;return r})},{}],40:[function(){"use strict";Array.prototype.some||(Array.prototype.some=function(t,e){var n,r;if(null==this)throw new TypeError("this is null or not defined");var o=Object(this),i=o.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=0;i>r;){if(r in o){var a=t.call(n,o[r],r,o);if(a)return!0}r++}return!1})},{}],41:[function(){"use strict";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),n=this,r=function(){},o=function(){var o=this instanceof r&&t?this:t,i=e.concat(Array.prototype.slice.call(arguments));return n.apply(o,i)};return r.prototype=this.prototype,o.prototype=new r,o})},{}],42:[function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;Object.keys||(Object.keys=function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var i,a,s=[];for(i in o)t.call(o,i)&&s.push(i);if(e)for(a=0;r>a;a++)t.call(o,n[a])&&s.push(n[a]);return s})},{}],43:[function(){"use strict";String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})},{}],44:[function(t,e){"use strict";t("./polyfills/function.bind"),t("./polyfills/array.foreach"),t("./polyfills/array.map"),t("./polyfills/array.filter"),t("./polyfills/array.isarray"),t("./polyfills/array.indexof"),t("./polyfills/array.some"),t("./polyfills/string.trim"),t("./polyfills/object.keys");var n=t("./core"),r=t("./index"),o=t("./use");n.use=o.bind(n),n.find=r.find,n.val=t("./validators"),e.exports=n},{"./core":25,"./index":28,"./polyfills/array.filter":35,"./polyfills/array.foreach":36,"./polyfills/array.indexof":37,"./polyfills/array.isarray":38,"./polyfills/array.map":39,"./polyfills/array.some":40,"./polyfills/function.bind":41,"./polyfills/object.keys":42,"./polyfills/string.trim":43,"./use":48,"./validators":49}],45:[function(t,e){"use strict";var n=t("moment"),r=t("./rome");r.use(n),e.exports=r},{"./rome":44,moment:20}],46:[function(t,e){"use strict";function n(t,e){return 2===arguments.length&&(t.innerText=t.textContent=e),t.innerText||t.textContent}e.exports=n},{}],47:[function(t,e){"use strict";e.exports=function(t,e){var n,r=-1/0;return function(){function o(){clearTimeout(n),n=null;var i=r+e,a=+new Date;a>i?(r=a,t.apply(this,arguments)):n=setTimeout(o,i-a)}n||o()}}},{}],48:[function(t,e){"use strict";function n(t){this.moment=r.moment=t}var r=t("./momentum");e.exports=n},{"./momentum":32}],49:[function(t,e){"use strict";function n(t){return function(e){var n=i(e);return function(r){var s=o.find(e),u=i(r),l=n||s&&s.getMoment();return l?(s&&a.add(this,s),t(u,l)):!0}}}function r(t,e){return function(n,r){function s(t){var e,n,r=o.find(t);return r?e=n=r.getMoment():Array.isArray(t)?(e=t[0],n=t[1]):e=n=t,r&&a.add(r,this),{start:i(e).startOf("day").toDate(),end:i(n).endOf("day").toDate()}}var u,l=arguments.length;return Array.isArray(n)?u=n:1===l?u=[n]:2===l&&(u=[[n,r]]),function(n){return u.map(s.bind(this))[t](e.bind(this,n))}}}var o=t("./index"),i=t("./parse"),a=t("./association"),s=n(function(t,e){return t>=e}),u=n(function(t,e){return t>e}),l=n(function(t,e){return e>=t}),c=n(function(t,e){return e>t}),d=r("every",function(t,e){return e.start>t||e.end=t});e.exports={afterEq:s,after:u,beforeEq:l,before:c,except:d,only:f}},{"./association":21,"./index":28,"./parse":34}]},{},[45])(45)}); SkilineWidget.ready(initWidget);