vendor: 4,789 bytes, lines 1-2
1/*! For license information please see vendor.js.LICENSE.txt */ 2(self.webpackChunkumbase=self.webpackChunkumbase||[]).push([[9016],{13385:function(t){t.exports=function(){"use strict";var t={d:function(e,i){for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e={};t.d(e,{default:function(){return V}});var i={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["ÐоÑкÑеÑенÑе","ÐонеделÑник","ÐÑоÑник","СÑеда","ЧеÑвеÑг","ÐÑÑниÑа","СÑббоÑа"],daysShort:["ÐоÑ","Ðон","ÐÑо","СÑе","ЧеÑ","ÐÑÑ","СÑб"],daysMin:["ÐÑ","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],months:["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"],monthsShort:["Янв","Фев","ÐаÑ","ÐпÑ","Ðай","ÐÑн","ÐÑл","Ðвг","Сен","ÐкÑ","ÐоÑ","Ðек"],today:"СегоднÑ",clear:"ÐÑиÑÑиÑÑ",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:i.days,minView:i.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return"string"==typeof t?e.querySelector(t):t}function s(){let{tagName:t="div",className:e="",innerHtml:i="",id:r="",attrs:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=document.createElement(t);return e&&s.classList.add(...e.split(" ")),r&&(s.id=r),i&&(s.innerHTML=i),n&&o(s,n),s}function o(t,e){for(let[i,r]of Object.entries(e))void 0!==r&&t.setAttribute(i,r);return t}function a(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function h(t){let e=t.getHours(),{hours:i,dayPeriod:r}=l(e);return{year:t.getFullYear(),month:t.getMonth(),fullMonth:t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,date:t.getDate(),fullDate:t.getDate()<10?"0"+t.getDate():t.getDate(),day:t.getDay(),hours:e,fullHours:u(e),hours12:i,dayPeriod:r,fullHours12:u(i),minutes:t.getMinutes(),fullMinutes:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes()}}function l(t){return{dayPeriod:t>11?"pm":"am",hours:t%12==0?12:t%12}}function u(t){return t<10?"0"+t:t}function c(t){let e=10*Math.floor(t.getFullYear()/10);return[e,e+9]}function d(){let t=[];for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return i.forEach(e=>{if("object"==typeof e)for(let i in e)e[i]&&t.push(i);else e&&t.push(e)}),t.join(" ")}function p(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.days;if(!t||!e)return!1;let n=h(t),s=h(e);return{[i.days]:n.date===s.date&&n.month===s.month&&n.year===s.year,[i.months]:n.month===s.month&&n.year===s.year,[i.years]:n.year===s.year}[r]}function f(t,e,i){let r=v(t,!1).getTime(),n=v(e,!1).getTime();return i?r>=n:r>n}function g(t,e){return!f(t,e,!0)}function v(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=new Date(t.getTime());return"boolean"!=typeof e||e||function(t){t.setHours(0,0,0,0)}(i),i}function m(t,e,i){t.length?t.forEach(t=>{t.addEventListener(e,i)}):t.addEventListener(e,i)}function y(t,e){return!(!t||t===document||t instanceof DocumentFragment)&&(t.matches(e)?t:y(t.parentNode,e))}function _(t,e,i){return t>i?i:t<e?e:t}function S(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return i.filter(t=>
vendor: 8,162 bytes, line 2
2t).forEach(e=>{for(let[i,r]of Object.entries(e))if(void 0!==r&&"[object Object]"===r.toString()){let e=void 0!==t[i]?t[i].toString():void 0,n=r.toString(),s=Array.isArray(r)?[]:{};t[i]=t[i]?e!==n?s:t[i]:s,S(t[i],r)}else t[i]=r}),t}function w(t){let e=t;return t instanceof Date||("string"==typeof t&&/^\d{4}-\d{2}-\d{2}$/.test(t)&&(t+="T00:00:00"),e=new Date(t)),isNaN(e.getTime())&&(console.log(`Unable to convert value "${t}" to Date object`),e=!1),e}function b(t){let e="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+e+")("+t+")($|<|"+e+")","g")}function E(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class F{constructor(){let{type:t,date:e,dp:i,opts:r,body:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};E(this,"focus",()=>{this.$cell.classList.add("-focus-"),this.focused=!0}),E(this,"removeFocus",()=>{this.$cell.classList.remove("-focus-"),this.focused=!1}),E(this,"select",()=>{this.$cell.classList.add("-selected-"),this.selected=!0}),E(this,"removeSelect",()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1}),E(this,"onChangeSelectedDate",()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())}),E(this,"onChangeFocusDate",t=>{if(!t)return void(this.focused&&this.removeFocus());let e=p(t,this.date,this.type);e?this.focus():!e&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()}),E(this,"render",()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell)),this.type=t,this.singleType=this.type.slice(0,-1),this.date=e,this.dp=i,this.opts=r,this.body=n,this.customData=!1,this.init()}init(){var t,e;let{onRenderCell:i}=this.opts;i&&(this.customData=i({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),null!==(t=this.customData)&&void 0!==t&&t.disabled?this.dp.disableDate(this.date):!1===(null===(e=this.customData)||void 0===e?void 0:e.disabled)&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var t;let{year:e,month:i,fullMonth:r,date:n,fullDate:o}=h(this.date),a=(null===(t=this.customData)||void 0===t?void 0:t.attrs)||{};this.$cell=s({attrs:{"data-year":e,"data-month":i,"data-date":n,"data-iso-date":`${e}-${r}-${o}`,...a}}),this.$cell.adpCell=this}_getClassName(){var t;let e=new Date,{selectOtherMonths:r,selectOtherYears:n}=this.opts,{minDate:s,maxDate:o,isDateDisabled:a}=this.dp,{day:l}=h(this.date),u=this._isOutOfMinMaxRange(),c=a(this.date),f=d("air-datepicker-cell",`-${this.singleType}-`,{"-current-":p(e,this.date,this.type),"-min-date-":s&&p(s,this.date,this.type),"-max-date-":o&&p(o,this.date,this.type)}),g="";switch(this.type){case i.days:g=d({"-weekend-":this.dp.isWeekend(l),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!r||u||c});break;case i.months:g=d({"-disabled-":u});break;case i.years:g=d({"-other-decade-":this.isOtherDecade,"-disabled-":u||this.isOtherDecade&&!n})}return d(f,g,null===(t=this.customData)||void 0===t?void 0:t.classes).split(" ")}_getHtml(){var t;let{year:e,month:r,date:n}=h(this.date),{showOtherMonths:s,showOtherYears:o}=this.opts;if(null!==(t=this.customData)&&void 0!==t&&t.html)return this.customData.html;switch(this.type){case i.days:return!s&&this.isOtherMonth?"":n;case i.months:return this.dp.locale[this.opts.monthsField][r];case i.years:return!o&&this.isOtherDecade?"":e}}_isOutOfMinMaxRange(){let{minDate:t,maxDate:e}=this.dp,{type:r,date:n}=this,{month:s,year:o,date:a}=h(n),l=r===i.days,u=r===i.years,c=!!t&&new Date(o,u?t.getMonth():s,l?a:t.getDate()),d=!!e&&new Date(o,u?e.getMonth():s,l?a:e.getDate());return t&&e?g(c,t)||f(d,e):t?g(c,t):e?f(d,e):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){const{selectedDates:t,focusDate:e,rangeDateTo:i,rangeDateFrom:r}=this.dp,n=t.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!n)return;let s=r,o=i;if(1===n&&e){const i=f(e,t[0]);s=i?t[0]:e,o=i?e:t[0]}let a=d({"-in-range-":s&&o&&(h=this.date,l=s,u=o,f(h,l)&&g(h,u)),"-range-from-":s&&p(this.date,s,this.type),"-range-to-":o&&p(this.date,o,this.type)});var h,l,u;a&&this.$cell.classList.add(...a.split(" "))}_handleSelectedStatus(){let t=this.dp._checkIfDateIsSelected(this.date,this.type);t?this.select():!t&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){p(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function x(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let C={[i.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${i.days}-"></div>`,[i.months]:`<div class="air-datepicker-body--cells -${i.months}-"></div>`,[i.years]:`<div class="air-datepicker-body--cells -${i.years}-"></div>`};const k=".air-datepicker-cell";class D{constructor(t){let{dp:e,type:r,opts:n}=t;x(this,"handleClick",t=>{let e=t.target.closest(k).adpCell;if(e.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let i=this.dp._checkIfDateIsSelected(e.date,e.type);i?this.dp._handleAlreadySelectedDates(i,e.date):this.dp.selectDate(e.date)}),x(this,"handleDayNameClick",t=>{let e=t.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(e),datepicker:this.dp})}),x(this,"onChangeCurrentView",t=>{t!==this.type?this.hide():(this.show(),this.render())}),x(this,"onMouseOverCell",t=>{let e=y(t.target,k);this.dp.setFocusDate(!!e&&e.adpCell.date)}),x(this,"onMouseOutCell",()=>{this.dp.setFocusDate(!1)}),x(this,"onClickBody",t=>{let{onClickDayName:e}=this.opts,i=t.target;i.closest(k)&&this.handleClick(t),e&&i.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(t)}),x(this,"onMouseDown",t=>{this.pressed=!0;let e=y(t.target,k),i=e&&e.adpCell;p(i.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),p(i.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)}),x(this,"onMouseMove",t=>{if(!this.pressed||!this.dp.isMinViewReached)return;t.preventDefault();let e=y(t.target,k),i=e&&e.adpCell,{selectedDates:r,rangeDateTo:n,rangeDateFrom:s}=this.dp;if(!i||i.isDisabled)return;let{date:o}=i;if(2===r.length){if(this.rangeFromFocused&&!f(o,n)){let{hours:t,minutes:e}=h(s);o.setHours(t),o.setMinutes(e),this.dp.rangeDateFrom=o,this.dp.replaceDate(s,o)}if(this.rangeToFocused&&!g(o,s)){let{hours:t,minutes:e}=h(n);o.setHours(t),o.setMinutes(e),this.dp.rangeDateTo=o,this.dp.replaceDate(n,o)}}}),x(this,"onMouseUp",()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1}),x(this,"onChangeViewDate",(t,e)=>{if(!this.isVisible)return;let r=c(t),n=c(e);switch(this.dp.currentView){case i.days:if(p(t,e,i.months))return;break;case i.months:if(p(t,e,i.years))return;break;case i.years:if(r[0]===n[0]&&r[1]===n[1])return}this.render()}),x(this,"render",()=>
vendor: 35,736 bytes, line 2
2{this.destroyCells(),this._generateCells(),this.cells.forEach(t=>{this.$cells.appendChild(t.render())})}),this.dp=e,this.type=r,this.opts=n,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===i.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:t,dynamicRange:e}=this.opts;m(this.$el,"mouseover",this.onMouseOverCell),m(this.$el,"mouseout",this.onMouseOutCell),m(this.$el,"click",this.onClickBody),t&&e&&(m(this.$el,"mousedown",this.onMouseDown),m(this.$el,"mousemove",this.onMouseMove),m(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=s({className:`air-datepicker-body -${this.type}-`,innerHtml:C[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dp.locale.firstDay,e="",r=this.dp.isWeekend,{onClickDayName:n}=this.opts,s=t,o=0;for(;o<7;){let t=s%7;e+=`<div class="${d("air-datepicker-body--day-name",{[i.cssClassWeekend]:r(t),"-clickable-":!!n})}" data-day-index='${t}'>${this.dp.locale.daysMin[t]}</div>`,o++,s++}return e}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(t){let{type:e,dp:i,opts:r}=this;return new F({type:e,dp:i,opts:r,date:t,body:this})}_generateCells(){D.getDatesFunction(this.type)(this.dp,t=>{this.cells.push(this._generateCell(t))})}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach(t=>t.destroy()),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(t,e){let{viewDate:i,opts:{fixedHeight:r},locale:{firstDay:n}}=t,s=a(i),{year:o,month:l}=h(i),u=new Date(o,l,1),c=new Date(o,l,s),d=u.getDay()-n,p=6-c.getDay()+n;d=d<0?d+7:d,p=p>6?p-7:p;let f=function(t,e){let{year:i,month:r,date:n}=h(t);return new Date(i,r,n-e)}(u,d),g=s+d+p,v=f.getDate(),{year:m,month:y}=h(f),_=0;r&&(g=42);const S=[];for(;_<g;){let t=new Date(m,y,v+_);e&&e(t),S.push(t),_++}return S}static getMonthsDates(t,e){let{year:i}=t.parsedViewDate,r=0,n=[];for(;r<12;){const t=new Date(i,r);n.push(t),e&&e(t),r++}return n}static getYearsDates(t,e){let i=c(t.viewDate),r=i[0]-1,n=i[1]+1,s=r,o=[];for(;s<=n;){const t=new Date(s,0);o.push(t),e&&e(t),s++}return o}static getDatesFunction(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.days;return{[i.days]:D.getDaysDates,[i.months]:D.getMonthsDates,[i.years]:D.getYearsDates}[t]}}function A(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class T{constructor(t){let{dp:e,opts:i}=t;A(this,"onClickNav",t=>{let e=y(t.target,".air-datepicker-nav--action");if(!e)return;let i=e.dataset.action;this.dp[i]()}),A(this,"onChangeViewDate",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),A(this,"onChangeCurrentView",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),A(this,"onClickNavTitle",()=>{this.dp.isFinalView||this.dp.up()}),A(this,"update",()=>{let{prevHtml:t,nextHtml:e}=this.opts;this.$prev.innerHTML=t,this.$next.innerHTML=e,this._resetNavStatus(),this.render(),this.handleNavStatus()}),A(this,"renderDelay",()=>{setTimeout(this.render)}),A(this,"render",()=>{this.$title.innerHTML=this._getTitle(),function(t,e){for(let i in e)e[i]?t.classList.add(i):t.classList.remove(i)}(this.$title,{"-disabled-":this.dp.isFinalView})}),this.dp=e,this.opts=i,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(i.eventChangeTime,this.render))}destroy(){this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(i.eventChangeTime,this.render))}_createElement(){this.$el=s({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:t,opts:e}=this,i=e.navTitles[t.currentView];return"function"==typeof i?i(t):t.formatDate(t.viewDate,i)}handleNavStatus(){let{disableNavWhenOutOfRange:t}=this.opts,{minDate:e,maxDate:r}=this.dp;if(!e&&!r||!t)return;let{year:n,month:s}=this.dp.parsedViewDate,o=!!e&&h(e),a=!!r&&h(r);switch(this.dp.currentView){case i.days:e&&o.month>=s&&o.year>=n&&this._disableNav("prev"),r&&a.month<=s&&a.year<=n&&this._disableNav("next");break;case i.months:e&&o.year>=n&&this._disableNav("prev"),r&&a.year<=n&&this._disableNav("next");break;case i.years:{let t=c(this.dp.viewDate);e&&o.year>=t[0]&&this._disableNav("prev"),r&&a.year<=t[1]&&this._disableNav("next");break}}}_disableNav(t){n('[data-action="'+t+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){!function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];t.length?t.forEach(t=>{t.classList.remove(...i)}):t.classList.remove(...i)}(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:t,nextHtml:e}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${t}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${e}</div>`}get isNavIsFunction(){let{navTitles:t}=this.opts;return Object.keys(t).find(e=>"function"==typeof t[e])}}var P={today:{content:t=>t.locale.today,onClick:t=>t.setViewDate(new Date)},clear:{content:t=>t.locale.clear,onClick:t=>t.clear()}};class I{constructor(t){let{dp:e,opts:i}=t;this.dp=e,this.opts=i,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=s({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:t}=this.opts;Array.isArray(t)||(t=[t]),t.forEach(t=>{let e=t;"string"==typeof t&&P[t]&&(e=P[t]);let i=this.createButton(e);e.onClick&&this.attachEventToButton(i,e.onClick),this.$el.appendChild(i)})}attachEventToButton(t,e){t.addEventListener("click",()=>{e(this.dp)})}createButton(t){let{content:e,className:i,tagName:r="button",attrs:n={}}=t;return s({tagName:r,innerHtml:`<span tabindex='-1'>${"function"==typeof e?e(this.dp):e}</span>`,className:d("air-datepicker-button",i),attrs:n})}render(){this.generateButtons()}}function M(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class R{constructor(){let{opts:t,dp:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};M(this,"toggleTimepickerIsActive",t=>{this.dp.timepickerIsActive=t}),M(this,"onChangeSelectedDate",t=>{let{date:e,updateTime:i=!1}=t;e&&(this.setMinMaxTime(e),this.setCurrentTime(!!i&&e),this.addTimeToDate(e))}),M(this,"onChangeLastSelectedDate",t=>{t&&(this.setTime(t),this.render())}),M(this,"onChangeInputRange",t=>{let e=t.target;this[e.getAttribute("name")]=e.value,this.updateText(),this.dp.trigger(i.eventChangeTime,{hours:this.hours,minutes:this.minutes})}),M(this,"onMouseEnterLeave",t=>{let e=t.target.getAttribute("name"),i=this.$minutesText;"hours"===e&&(i=this.$hoursText),i.classList.toggle("-focus-")}),M(this,"onFocus",()=>{this.toggleTimepickerIsActive(!0)}),M(this,"onBlur",()=>{this.toggleTimepickerIsActive(!1)}),this.opts=t,this.dp=e;let{timeFormat:r}=this.dp.locale;r&&(r.match(b("h"))||r.match(b("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let t="input";navigator.userAgent.match(/trident/gi)&&(t="change"),m(this.$ranges,t,this.onChangeInputRange),m(this.$ranges,"mouseenter",this.onMouseEnterLeave),m(this.$ranges,"mouseleave",this.onMouseEnterLeave),m(this.$ranges,"focus",this.onFocus),m(this.$ranges,"mousedown",this.onFocus),m(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=s({className:d("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:t,hours:e,displayHours:i,minutes:r,minHours:n,minMinutes:s,maxHours:o,maxMinutes:a,dayPeriod:h,opts:{hoursStep:l,minutesStep:c}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${u(i)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${u(r)}</span> `+(t?`<span class='air-datepicker-time--current-ampm'>${h}</span>`:"")+'</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row">'+` <input type="range" name="hours" value="${e}" min="${n}" max="${o}" step="${l}"/> </div> <div class="air-datepicker-time--row">`+` <input type="range" name="minutes" value="${r}" min="${s}" max="${a}" step="${c}"/> </div></div>`}defineDOM(){let t=t=>n(t,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=t('[name="hours"]'),this.$minutes=t('[name="minutes"]'),this.$hoursText=t(".air-datepicker-time--current-hours"),this.$minutesText=t(".air-datepicker-time--current-minutes"),this.$ampm=t(".air-datepicker-time--current-ampm")}setTime(t){this.setMinMaxTime(t),this.setCurrentTime(t)}addTimeToDate(t){t&&(t.setHours(this.hours),t.setMinutes(this.minutes))}setMinMaxTime(t){if(this.setMinMaxTimeFromOptions(),t){let{minDate:e,maxDate:i}=this.dp;e&&p(t,e)&&this.setMinTimeFromMinDate(e),i&&p(t,i)&&this.setMaxTimeFromMaxDate(i)}}setCurrentTime(t){let{hours:e,minutes:i}=t?h(t):this;this.hours=_(e,this.minHours,this.maxHours),this.minutes=_(i,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:t,minMinutes:e,maxHours:i,maxMinutes:r}=this.opts;this.minHours=_(t,0,23),this.minMinutes=_(e,0,59),this.maxHours=_(i,0,23),this.maxMinutes=_(r,0,59)}setMinTimeFromMinDate(t){let{lastSelectedDate:e}=this.dp;this.minHours=t.getHours(),e&&e.getHours()>t.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=t.getMinutes()}setMaxTimeFromMaxDate(t){let{lastSelectedDate:e}=this.dp;this.maxHours=t.getHours(),e&&e.getHours()<t.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=t.getMinutes()}updateSliders(){o(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,o(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=u(this.displayHours),this.$minutesText.innerHTML=u(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(t){this._hours=t;let{hours:e,dayPeriod:i}=l(t);this.displayHours=this.ampm?e:t,this.dayPeriod=i}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function L(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class N{constructor(t){let{dp:e,opts:i}=t;L(this,"pressedKeys",new Set),L(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],t=>t.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],t=>t.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],t=>t.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],t=>t.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],t=>t.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],t=>t.year-=10],[["Control","Shift","ArrowUp"],(t,e)=>e.up()]])),L(this,"handleHotKey",t=>{let e=this.hotKeys.get(t),i=h(this.getInitialFocusDate());e(i,this.dp);let{year:r,month:n,date:s}=i,o=a(new Date(r,n));o<s&&(s=o);let l=this.dp.getClampedDate(new Date(r,n,s));this.dp.setFocusDate(l,{viewDateTransition:!0})}),L(this,"isHotKeyPressed",()=>{let t=!1,e=this.pressedKeys.size,i=t=>this.pressedKeys.has(t);for(let[r]of this.hotKeys){if(t)break;if(Array.isArray(r[0]))r.forEach(n=>{t||e!==n.length||(t=n.every(i)&&r)});else{if(e!==r.length)continue;t=r.every(i)&&r}}return t}),L(this,"isArrow",t=>t>=37&&t<=40),L(this,"onKeyDown",t=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:e,which:i}=t,{dp:r,dp:{focusDate:n},opts:s}=this;this.registerKey(e);let o=this.isHotKeyPressed();if(o)return t.preventDefault(),void this.handleHotKey(o);if(this.isArrow(i))return t.preventDefault(),void this.focusNextCell(e);if("Enter"===e){if(r.currentView!==s.minView)return void r.down();if(n){let t=r._checkIfDateIsSelected(n);return void(t?r._handleAlreadySelectedDates(t,n):r.selectDate(n))}}"Escape"===e&&this.dp.hide()}),L(this,"onKeyUp",t=>{this.removeKey(t.key)}),this.dp=e,this.opts=i,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:t}=this.dp;t.addEventListener("keydown",this.onKeyDown),t.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:t}=this.dp;t.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:t,currentView:e,selectedDates:r,parsedViewDate:{year:n,month:s}}=this.dp,o=t||r[r.length-1];if(!o)switch(e){case i.days:o=new Date(n,s,(new Date).getDate());break;case i.months:o=new Date(n,s,1);break;case i.years:o=new Date(n,0,1)}return o}focusNextCell(t){let e=this.getInitialFocusDate(),{currentView:r}=this.dp,{days:n,months:s,years:o}=i,a=h(e),l=a.year,u=a.month,c=a.date;switch(t){case"ArrowLeft":r===n&&(c-=1),r===s&&(u-=1),r===o&&(l-=1);break;case"ArrowUp":r===n&&(c-=7),r===s&&(u-=3),r===o&&(l-=4);break;case"ArrowRight":r===n&&(c+=1),r===s&&(u+=1),r===o&&(l+=1);break;case"ArrowDown":r===n&&(c+=7),r===s&&(u+=3),r===o&&(l+=4)}let d=this.dp.getClampedDate(new Date(l,u,c));this.dp.setFocusDate(d,{viewDateTransition:!0})}registerKey(t){this.pressedKeys.add(t)}removeKey(t){this.pressedKeys.delete(t)}}let O={on(t,e){this.__events||(this.__events={}),this.__events[t]?this.__events[t].push(e):this.__events[t]=[e]},off(t,e){this.__events&&this.__events[t]&&(this.__events[t]=this.__events[t].filter(t=>t!==e))},removeAllEvents(){this.__events={}},trigger(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];this.__events&&this.__events[t]&&this.__events[t].forEach(t=>{t(...i)})}};function H(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let B="",j="",U=!1;class V{static buildGlobalContainer(t){U=!0,B=s({className:t,id:t}),n("body").appendChild(B)}constructor(t,e){var o=this;if(H(this,"viewIndexes",[i.days,i.months,i.years]),H(this,"next",()=>{let{year:t,month:e}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(t,e+1,1));break;case i.months:this.setViewDate(new Date(t+1,e,1));break;case i.years:this.setViewDate(new Date(t+10,0,1))}}),H(this,"prev",()=>{let{year:t,month:e}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(t,e-1,1));break;case i.months:this.setViewDate(new Date(t-1,e,1));break;case i.years:this.setViewDate(new Date(t-10,0,1))}}),H(this,"_finishHide",()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)}),H(this,"setPosition",function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("function"==typeof(t=t||o.opts.position))return void(o.customHide=t({$datepicker:o.$datepicker,$target:o.$el,$pointer:o.$pointer,isViewChange:e,done:o._finishHide}));let i,r,{isMobile:n}=o.opts,s=o.$el.getBoundingClientRect(),a=o.$el.getBoundingClientRect(),h=o.$datepicker.offsetParent,l=o.$el.offsetParent,u=o.$datepicker.getBoundingClientRect(),c=t.split(" "),d=window.scrollY,p=window.scrollX,f=o.opts.offset,g=c[0],v=c[1];if(n)o.$datepicker.style.cssText="left: 50%; top: 50%";else{if(h===l&&h!==document.body&&(a={top:o.$el.offsetTop,left:o.$el.offsetLeft,width:s.width,height:o.$el.offsetHeight},d=0,p=0),h!==l&&h!==document.body){let t=h.getBoundingClientRect();a={top:s.top-t.top,left:s.left-t.left,width:s.width,height:s.height},d=0,p=0}switch(g){case"top":i=a.top-u.height-f;break;case"right":r=a.left+a.width+f;break;case"bottom":i=a.top+a.height+f;break;case"left":r=a.left-u.width-f}switch(v){case"top":i=a.top;break;case"right":r=a.left+a.width-u.width;break;case"bottom":i=a.top+a.height-u.height;break;case"left":r=a.left;break;case"center":/left|right/.test(g)?i=a.top+a.height/2-u.height/2:r=a.left+a.width/2-u.width/2}o.$datepicker.style.cssText=`left: ${r+p}px; top: ${i+d}px`}}),H(this,"_setInputValue",()=>{let{opts:t,$altField:e,locale:{dateFormat:i}}=this,{altFieldDateFormat:r,altField:n}=t;n&&e&&(e.value=this._getInputValue(r)),this.$el.value=this._getInputValue(i),this.$el.dispatchEvent(new Event("change"))}),H(this,"_getInputValue",t=>{let{selectedDates:e,opts:i}=this,{multipleDates:r,multipleDatesSeparator:n}=i;if(!e.length)return"";let s="function"==typeof t,o=s?t(r?e:e[0]):e.map(e=>this.formatDate(e,t));return o=s?o:o.join(n),o}),H(this,"_checkIfDateIsSelected",function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.days,r=!1;return o.selectedDates.some(i=>{let n=p(t,i,e);return r=n&&i,n}),r}),H(this,"_scheduleCallAfterTransition",t=>{this._cancelScheduledCall(),t&&t(!1),this._onTransitionEnd=()=>{t&&t(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})}),H(this,"_cancelScheduledCall",()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)}),H(this,"setViewDate",t=>{if(!((t=w(t))instanceof Date))return;if(p(t,this.viewDate))return;let e=this.viewDate;this.viewDate=t;let{onChangeViewDate:r}=this.opts;if(r){let{month:t,year:e}=this.parsedViewDate;r({month:t,year:e,decade:this.curDecade})}this.trigger(i.eventChangeViewDate,t,e)}),H(this,"setFocusDate",function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(!t||(t=w(t))instanceof Date)&&(o.focusDate=t,o.trigger(i.eventChangeFocusDate,t,e))}),H(this,"setCurrentView",function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o.viewIndexes.includes(t)){if(o.currentView=t,o.elIsInput&&o.visible&&o.setPosition(void 0,!0),o.trigger(i.eventChangeCurrentView,t),!o.views[t]){let e=o.views[t]=new D({dp:o,opts:o.opts,type:t});o.shouldUpdateDOM&&o.$content.appendChild(e.$el)}o.opts.onChangeView&&!e.silent&&o.opts.onChangeView(t)}}),H(this,"_updateLastSelectedDate",t=>{this.lastSelectedDate=t,this.trigger(i.eventChangeLastSelectedDate,t)}),H(this,"destroy",()=>{if(this.isDestroyed)return;let{showEvent:t,isMobile:e}=this.opts,i=this.$datepicker.parentNode;i&&i.removeChild(this.$datepicker),this.$el.removeEventListener(t,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),e&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0}),H(this,"update",function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=S({},o.opts),{silent:n}=e;S(o.opts,t);let{timepicker:s,buttons:a,range:h,selectedDates:l,isMobile:u}=o.opts,c=o.visible||o.treatAsInline;o._createMinMaxDates(),o._limitViewDateByMaxMinDates(),o._handleLocale(),l&&(o.selectedDates=[],o.selectDate(l,{silent:n})),t.view&&o.setCurrentView(t.view,{silent:n}),o._setInputValue(),r.range&&!h?(o.rangeDateTo=!1,o.rangeDateFrom=!1):!r.range&&h&&o.selectedDates.length&&(o.rangeDateFrom=o.selectedDates[0],o.rangeDateTo=o.selectedDates[1]),r.timepicker&&!s?(c&&o.timepicker.destroy(),o.timepicker=!1,o.$timepicker.parentNode.removeChild(o.$timepicker)):!r.timepicker&&s&&o._addTimepicker(),!r.buttons&&a?o._addButtons():r.buttons&&!a?(o.buttons.destroy(),o.$buttons.parentNode.removeChild(o.$buttons)):c&&r.buttons&&a&&o.buttons.clearHtml().render(),!r.isMobile&&u?(o.treatAsInline||j||o._createMobileOverlay(),o._addMobileAttributes(),o.visible&&o._showMobileOverlay()):r.isMobile&&!u&&(o._removeMobileAttributes(),o.visible&&(j.classList.remove("-active-"),"function"!=typeof o.opts.position&&o.setPosition())),c&&(o.nav.update(),o.views[o.currentView].render(),o.currentView===i.days&&o.views[o.currentView].renderDayNames())}),H(this,"disableDate",(t,e)=>{(Array.isArray(t)?t:[t]).forEach(t=>{let i=w(t);if(!i)return;let r=e?"delete":"add";this.disabledDates[r](this.formatDate(i,"yyyy-MM-dd"));let n=this.getCell(i,this.currentViewSingular);n&&n.adpCell.render()},[])}),H(this,"enableDate",t=>{this.disableDate(t,!0)}),H(this,"isDateDisabled",t=>{let e=w(t);return this.disabledDates.has(this.formatDate(e,"yyyy-MM-dd"))}),H(this,"isOtherMonth",t=>{let{month:e}=h(t);return e!==this.parsedViewDate.month}),H(this,"isOtherYear",t=>{let{year:e}=h(t);return e!==this.parsedViewDate.year}),H(this,"isOtherDecade",t=>{let{year:e}=h(t),[i,r]=c(this.viewDate);return e<i||e>r}),H(this,"_onChangeSelectedDate",t=>{let{silent:e}=t;setTimeout(()=>{this._setInputValue(),this.opts.onSelect&&!e&&this._triggerOnSelect()})}),H(this,"_onChangeFocusedDate",function(t){let{viewDateTransition:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return;let i=!1;e&&(i=o.isOtherMonth(t)||o.isOtherYear(t)||o.isOtherDecade(t)),i&&o.setViewDate(t),o.opts.onFocus&&o.opts.onFocus({datepicker:o,date:t})}),H(this,"_onChangeTime",t=>{let{hours:e,minutes:i}=t,r=new Date,{lastSelectedDate:n,opts:{onSelect:s}}=this,o=n;n||(o=r);let a=this.getCell(o,this.currentViewSingular),h=a&&a.adpCell;h&&h.isDisabled||(o.setHours(e),o.setMinutes(i),n?(this._setInputValue(),s&&this._triggerOnSelect()):this.selectDate(o))}),H(this,"_onFocus",t=>{this.visible||this.show()}),H(this,"_onBlur",t=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()}),H(this,"_onMouseDown",t=>{this.inFocus=!0}),H(this,"_onMouseUp",t=>{this.inFocus=!1,this.$el.focus()}),H(this,"_onResize",()=>{this.visible&&"function"!=typeof this.opts.position&&this.setPosition()}),H(this,"_onClickOverlay",()=>{this.visible&&this.hide()}),H(this,"getViewDates",function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.days;return D.getDatesFunction(t)(o)}),H(this,"isWeekend",t=>this.opts.weekends.includes(t)),H(this,"getClampedDate",t=>{let{minDate:e,maxDate:i}=this,r=t;return i&&f(t,i)?r=i:e&&g(t,e)&&(r=e),r}),this.$el=n(t),!this.$el)return;this.$datepicker=s({className:"air-datepicker"}),this.opts=S({},r,e),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:a,startDate:l}=this.opts;l||(this.opts.startDate=new Date),"INPUT"===this.$el.nodeName&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=a,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:t,treatAsInline:e,opts:{inline:i,isMobile:r,selectedDates:s,keyboardNav:o,onlyTimepicker:a}}=this,h=n("body");(!U||U&&B&&!h.contains(B))&&!i&&this.elIsInput&&!this.$customContainer&&V.buildGlobalContainer(V.defaultGlobalContainerId),!r||j||e||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(i||this._bindEvents(),o&&!a&&(this.keyboardNav=new N({dp:this,opts:t}))),s&&this.selectDate(s,{silent:!0}),this.opts.visible&&!e&&this.show(),r&&!e&&this.$el.setAttribute("readonly",!0),e&&this._createComponents()}_createMobileOverlay(){j=s({className:"air-datepicker-overlay"}),B.appendChild(j)}_createComponents(){let{opts:t,treatAsInline:e,opts:{inline:i,buttons:r,timepicker:n,position:s,classes:o,onlyTimepicker:a,isMobile:h}}=this;this._buildBaseHtml(),this.elIsInput&&(i||this._setPositionClasses(s)),!i&&this.elIsInput||this.$datepicker.classList.add("-inline-"),o&&this.$datepicker.classList.add(...o.split(" ")),a&&this.$datepicker.classList.add("-only-timepicker-"),h&&!e&&this._addMobileAttributes(),this.views[this.currentView]=new D({dp:this,type:this.currentView,opts:t}),this.nav=new T({dp:this,opts:t}),n&&this._addTimepicker(),r&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let t in this.views)this.views[t].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){j.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){j.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||""===this.initialReadonly||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:t,maxDate:e}=this.opts;this.minDate=!!t&&w(t),this.maxDate=!!e&&w(e)}_addTimepicker(){this.$timepicker=s({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new R({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=s({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new I({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(i.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(i.eventChangeFocusDate,this._onChangeFocusedDate),this.on(i.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:t}=this.opts;var e,i;this.elIsInput?t?(e=this.$datepicker,(i=this.$el).parentNode.insertBefore(e,i.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:t,dateFormat:e,firstDay:i,timepicker:r,onlyTimepicker:n,timeFormat:s,dateTimeSeparator:o}=this.opts;var a;this.locale=(a=t,JSON.parse(JSON.stringify(a))),e&&(this.locale.dateFormat=e),void 0!==s&&""!==s&&(this.locale.timeFormat=s);let{timeFormat:h}=this.locale;if(""!==i&&(this.locale.firstDay=i),r&&"function"!=typeof e){let t=h?o:"";this.locale.dateFormat=[this.locale.dateFormat,h||""].join(t)}n&&"function"!=typeof e&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(t){if("function"==typeof t)return void this.$datepicker.classList.add("-custom-position-");let e=(t=t.split(" "))[0],i=`air-datepicker -${e}-${t[1]}- -from-${e}-`;this.$datepicker.classList.add(...i.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:t,minDate:e,maxDate:i}=this;i&&f(t,i)&&this.setViewDate(i),e&&g(t,e)&&this.setViewDate(e)}formatDate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.viewDate,e=arguments.length>1?arguments[1]:void 0;if(t=w(t),!(t instanceof Date))return;let i=e,r=this.locale,n=h(t),s=n.dayPeriod,o=c(t),a=V.replacer,l={T:t.getTime(),m:n.minutes,mm:n.fullMinutes,h:n.hours12,hh:n.fullHours12,H:n.hours,HH:n.fullHours,aa:s,AA:s.toUpperCase(),E:r.daysShort[n.day],EEEE:r.days[n.day],d:n.date,dd:n.fullDate,M:n.month+1,MM:n.fullMonth,MMM:r.monthsShort[n.month],MMMM:r.months[n.month],yy:n.year.toString().slice(-2),yyyy:n.year,yyyy1:o[0],yyyy2:o[1]};for(let[t,e]of Object.entries(l))i=a(i,b(t),e);return i}down(t){this._handleUpDownActions(t,"down")}up(t){this._handleUpDownActions(t,"up")}selectDate(t){let e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{currentView:n,parsedViewDate:s,selectedDates:o}=this,{updateTime:a,silent:h}=r,{moveToOtherMonthsOnSelect:l,moveToOtherYearsOnSelect:u,multipleDates:c,range:d,autoClose:p,onBeforeSelect:g}=this.opts,v=o.length;if(Array.isArray(t))return t.forEach(t=>{this.selectDate(t,r)}),new Promise(t=>{setTimeout(t)});if((t=w(t))instanceof Date){if(g&&!h&&!g({date:t,datepicker:this}))return Promise.resolve();if(n===i.days&&t.getMonth()!==s.month&&l&&(e=new Date(t.getFullYear(),t.getMonth(),1)),n===i.years&&t.getFullYear()!==s.year&&u&&(e=new Date(t.getFullYear(),0,1)),e&&this.setViewDate(e),c&&!d){if(v===c)return;this._checkIfDateIsSelected(t)||o.push(t)}else if(d)switch(v){case 1:o.push(t),this.rangeDateTo||(this.rangeDateTo=t),f(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=t),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[t],this.rangeDateFrom=t,this.rangeDateTo="";break;default:this.selectedDates=[t],this.rangeDateFrom=t}else this.selectedDates=[t];return this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,silent:null==r?void 0:r.silent,date:t,updateTime:a}),this._updateLastSelectedDate(t),p&&!this.timepickerIsActive&&this.visible&&(c||d?d&&1===v&&this.hide():this.hide()),new Promise(t=>{setTimeout(t)})}}unselectDate(t){let e=this.selectedDates,r=this;if((t=w(t))instanceof Date)return e.some((n,s)=>{if(p(n,t))return e.splice(s,1),r.selectedDates.length?(r.rangeDateTo="",r.rangeDateFrom=e[0],r._updateLastSelectedDate(r.selectedDates[r.selectedDates.length-1])):(r.rangeDateFrom="",r.rangeDateTo="",r._updateLastSelectedDate(!1)),this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,date:t}),!0})}replaceDate(t,e){let r=this.selectedDates.find(e=>p(e,t,this.currentView)),n=this.selectedDates.indexOf(r);n<0||p(this.selectedDates[n],e,this.currentView)||(this.selectedDates[n]=e,this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,date:e,updateTime:!0}),this._updateLastSelectedDate(e))}clear(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,silent:t.silent}),new Promise(t=>{setTimeout(t)})}show(){let{onShow:t,isMobile:e}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,t&&this._scheduleCallAfterTransition(t),e&&this._showMobileOverlay()}hide(){let{onHide:t,isMobile:e}=this.opts,i=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition(e=>{!this.customHide&&(e&&i||!e&&!i)&&this._finishHide(),t&&t(e)}),e&&j.classList.remove("-active-")}_triggerOnSelect(){let t=[],e=[],{selectedDates:i,locale:r,opts:{onSelect:n,multipleDates:s,range:o}}=this,a=s||o,h="function"==typeof r.dateFormat;i.length&&(t=i.map(v),e=h?s?r.dateFormat(t):t.map(t=>r.dateFormat(t)):t.map(t=>this.formatDate(t,r.dateFormat))),n({date:a?t:t[0],formattedDate:a?e:e[0],datepicker:this})}_handleAlreadySelectedDates(t,e){let{selectedDates:i,rangeDateFrom:r,rangeDateTo:n}=this,{range:s,toggleSelected:o}=this.opts,a=i.length,h="function"==typeof o?o({datepicker:this,date:e}):o,l=Boolean(s&&1===a&&t),u=l?v(e):e;s&&!h&&(2!==a&&this.selectDate(u),2===a&&p(r,n))||(h?this.unselectDate(u):this._updateLastSelectedDate(l?u:t))}_handleUpDownActions(t,e){if(!((t=w(t||this.focusDate||this.viewDate))instanceof Date))return;let i="up"===e?this.viewIndex+1:this.viewIndex-1;i>2&&(i=2),i<0&&(i=0),this.setViewDate(new Date(t.getFullYear(),t.getMonth(),1)),this.setCurrentView(this.viewIndexes[i])}getCell(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.day;if(!((t=w(t))instanceof Date))return;let{year:r,month:n,date:s}=h(t),o=`[data-year="${r}"]`,a=`[data-month="${n}"]`,l={[i.day]:`${o}${a}[data-date="${s}"]`,[i.month]:`${o}${a}`,[i.year]:`${o}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(l[e]):void 0}_showMobileOverlay(){j.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce((t,e)=>parseFloat(e)+t,0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return h(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return c(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===i.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===i.days}get $container(){return this.$customContainer||B}static replacer(t,e,i){return t.replace(e,function(t,e,r,n){return e+i+n})}}var K;return H(V,"defaults",r),H(V,"version","3.6.0"),H(V,"defaultGlobalContainerId","air-datepicker-global-container"),K=V.prototype,Object.assign(K,O),e.default}()}
2,19122:function(t,e,i){"use strict";var r=i(13385),n=i.n(r);e.A=n()},89654:function(t,e){"use strict";e.A=void 0;e.A={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:mm aa",firstDay:0}},19689:function(t,e,i){!function(t,e){"use strict";var i=0,r=e("head"),n=t.BigText,s=e.fn.bigtext,o={DEBUG_MODE:!1,DEFAULT_MIN_FONT_SIZE_PX:null,DEFAULT_MAX_FONT_SIZE_PX:528,GLOBAL_STYLE_ID:"bigtext-style",STYLE_ID:"bigtext-id",LINE_CLASS_PREFIX:"bigtext-line",EXEMPT_CLASS:"bigtext-exempt",noConflict:function(i){return i&&(e.fn.bigtext=s,t.BigText=n),o},supports:{wholeNumberFontSizeOnly:function(){if(!("getComputedStyle"in t))return!0;var i=e("<div/>").css({position:"absolute","font-size":"14.1px"}).insertBefore(e("script").eq(0)),r=t.getComputedStyle(i[0],null),n=r&&"14px"===r.getPropertyValue("font-size");return i.remove(),n}()},init:function(){e("#"+o.GLOBAL_STYLE_ID).length||r.append(o.generateStyleTag(o.GLOBAL_STYLE_ID,[".bigtext * { white-space: nowrap; } .bigtext > * { display: block; }",".bigtext ."+o.EXEMPT_CLASS+", .bigtext ."+o.EXEMPT_CLASS+" * { white-space: normal; }"]))},bindResize:function(i,r){var n;e(t).unbind(i).bind(i,function(){n&&clearTimeout(n),n=setTimeout(r,100)})},getStyleId:function(t){return o.STYLE_ID+"-"+t},generateStyleTag:function(t,i){return e("<style>"+i.join("\n")+"</style>").attr("id",t)},clearCss:function(t){var i=o.getStyleId(t);e("#"+i).remove()},generateCss:function(t,e,i,r){var n=[];o.clearCss(t);for(var s=0,a=e.length;s<a;s++)n.push("#"+t+" ."+o.LINE_CLASS_PREFIX+s+" {"+(r[s]?" white-space: normal;":"")+(e[s]?" font-size: "+e[s]+"px;":"")+(i[s]?" word-spacing: "+i[s]+"px;":"")+"}");return o.generateStyleTag(o.getStyleId(t),n)},jQueryMethod:function(t){return o.init(),t=e.extend({minfontsize:o.DEFAULT_MIN_FONT_SIZE_PX,maxfontsize:o.DEFAULT_MAX_FONT_SIZE_PX,childSelector:"",resize:!0},t||{}),this.each(function(){var n=e(this).addClass("bigtext"),s=n.width(),a=n.attr("id"),h=t.childSelector?n.find(t.childSelector):n.children();a||(a="bigtext-id"+i++,n.attr("id",a)),t.resize&&o.bindResize("resize.bigtext-event-"+a,function(){o.jQueryMethod.call(e("#"+a),t)}),o.clearCss(a),h.addClass(function(t,e){return[e.replace(new RegExp("\\b"+o.LINE_CLASS_PREFIX+"\\d+\\b"),""),o.LINE_CLASS_PREFIX+t].join(" ")});var l=o.calculateSizes(n,h,s,t.maxfontsize,t.minfontsize);r.append(o.generateCss(a,l.fontSizes,l.wordSpacings,l.minFontSizes))}),this.trigger("bigtext:complete")},testLineDimensions:function(t,e,i,r,n,s,o){var a;if(o="number"==typeof o?o:0,t.css(i,r+s),(a=t.width())>=e){if(t.css(i,""),a===e)return{match:"exact",size:parseFloat((parseFloat(r)-.1).toFixed(3))};var h=e-o,l=a-e;return{match:"estimate",size:parseFloat((parseFloat(r)-("word-spacing"===i&&o&&l<h?0:n)).toFixed(3))}}return a},calculateSizes:function(t,i,r,n,s){var a=t.clone(!0).addClass("bigtext-cloned").css({fontFamily:t.css("font-family"),textTransform:t.css("text-transform"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),position:"absolute",left:o.DEBUG_MODE?0:-9999,top:o.DEBUG_MODE?0:-9999}).appendTo(document.body),h=[],l=[],u=[],c=[];return i.css("float","left").each(function(){var t,i,a=e(this),l=o.supports.wholeNumberFontSizeOnly?[8,4,1]:[8,4,1,.1];if(a.hasClass(o.EXEMPT_CLASS))return h.push(null),c.push(null),void u.push(!1);var d=parseFloat(a.css("font-size")),p=(a.width()/d).toFixed(6);i=parseInt(r/p,10)-32;t:for(var f=0,g=l.length;f<g;f++)e:for(var v=1;v<=10;v++){if(i+v*l[f]>n){i=n;break t}if("number"!=typeof(t=o.testLineDimensions(a,r,"font-size",i+v*l[f],l[f],"px",t))){if(i=t.size,"exact"===t.match)break t;break e}}c.push(r/i),i>n?(h.push(n),u.push(!1)):s&&i<s?(h.push(s),u.push(!0)):(h.push(i),u.push(!1))}).each(function(t){var i,n=e(this),s=0;if(n.hasClass(o.EXEMPT_CLASS))l.push(null);else{n.css("font-size",h[t]+"px");for(var a=1;a<3;a+=1)if("number"!=typeof(i=o.testLineDimensions(n,r,"word-spacing",a,1,"px",i))){
vendor: 31,759 bytes, line 2
2s=i.size;break}n.css("font-size",""),l.push(s)}}).removeAttr("style"),o.DEBUG_MODE?a.css({"background-color":"rgba(255,255,255,.4)"}):a.remove(),{fontSizes:h,wordSpacings:l,ratios:c,minFontSizes:u}}};e.fn.bigtext=o.jQueryMethod,t.BigText=o}(this,i(87569))},51269:function(t,e,i){var r,n;window,r=[i(47183),i(48907)],void 0===(n=function(t,e){return function(t,e,i){"use strict";function r(t){var e=document.createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element)}),e}var n=e.prototype;return n.insert=function(t,e){var i=this._makeCells(t);if(i&&i.length){var n=this.cells.length;e=void 0===e?n:e;var s=r(i),o=e==n;if(o)this.slider.appendChild(s);else{var a=this.cells[e].element;this.slider.insertBefore(s,a)}if(0===e)this.cells=i.concat(this.cells);else if(o)this.cells=this.cells.concat(i);else{var h=this.cells.splice(e,n-e);this.cells=this.cells.concat(i).concat(h)}this._sizeCells(i),this.cellChange(e,!0)}},n.append=function(t){this.insert(t,this.cells.length)},n.prepend=function(t){this.insert(t,0)},n.remove=function(t){var e=this.getCells(t);if(e&&e.length){var r=this.cells.length-1;e.forEach(function(t){t.remove();var e=this.cells.indexOf(t);r=Math.min(e,r),i.removeFrom(this.cells,t)},this),this.cellChange(r,!0)}},n.cellSizeChange=function(t){var e=this.getCell(t);if(e){e.getSize();var i=this.cells.indexOf(e);this.cellChange(i)}},n.cellChange=function(t,e){var i=this.selectedElement;this._positionCells(t),this._getWrapShiftCells(),this.setGallerySize();var r=this.getCell(i);r&&(this.selectedIndex=this.getCellSlideIndex(r)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[t]),this.select(this.selectedIndex),e&&this.positionSliderAtSelected()},e}(0,t,e)}.apply(e,r))||(t.exports=n)},81971:function(t,e,i){var r,n;window,r=[i(48907)],void 0===(n=function(t){return function(t,e){"use strict";var i={startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();var t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){var e=this;requestAnimationFrame(function(){e.animate()})}},positionSlider:function(){var t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t,e){t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;var i=this.getPositionValue(t);this.slider.style.transform=e?"translate3d("+i+",0,0)":"translateX("+i+")"},dispatchScrollEvent:function(){var t=this.slides[0];if(t){var e=-this.x-t.target,i=e/this.slidesWidth;this.dispatchEvent("scroll",null,[i,e])}},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){!this.isPointerDown&&Math.round(100*this.x)==Math.round(100*t)&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(t,e,i){for(var r=0;r<t.length;r++){var n=t[r],s=e>0?i:0;n.wrapShift(s),e-=n.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(var e=0;e<t.length;e++)t[e].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){if(this.isDraggable&&this.isPointerDown){var t=this.dragX-this.x-this.velocity;this.applyForce(t)}},applySelectedAttraction:function(){if((!this.isDraggable||!this.isPointerDown)&&!this.isFreeScrolling&&this.slides.length){var t=(-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction;this.applyForce(t)}}};return i}(0,t)}.apply(e,r))||(t.exports=n)},99498:function(t,e,i){var r,n;window,r=[i(38142)],void 0===(n=function(t){return function(t,e){"use strict";function i(t,e){this.element=t,this.parent=e,this.create()}var r=i.prototype;return r.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0,this.element.style[this.parent.originSide]=0},r.destroy=function(){this.unselect(),this.element.style.position="";var t=this.parent.originSide;this.element.style[t]="",this.element.style.transform="",this.element.removeAttribute("aria-hidden")},r.getSize=function(){this.size=e(this.element)},r.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},r.updateTarget=r.setDefaultTarget=function(){var t="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign},r.renderPosition=function(t){var e="left"===this.parent.originSide?1:-1,i=this.parent.options.percentPosition?t*e*(this.parent.size.innerWidth/this.size.width):t*e;this.element.style.transform="translateX("+this.parent.getPositionValue(i)+")"},r.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},r.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},r.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},r.remove=function(){this.element.parentNode.removeChild(this.element)},i}(0,t)}.apply(e,r))||(t.exports=n)},97836:function(t,e,i){var r,n;!function(s){r=[i(47183),i(39709),i(48907)],n=function(t,e,i){return function(t,e,i,r){"use strict";r.extend(e.defaults,{draggable:">1",dragThreshold:3}),e.createMethods.push("_createDrag");var n=e.prototype;r.extend(n,i.prototype),n._touchActionValue="pan-y",n._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable)},n.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},n.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},n.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},n.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},n.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},n._uiChangeDrag=function(){delete this.isFreeScrolling},n.pointerDown=function(e,i){this.isDraggable?this.okayPointerDown(e)&&(this._pointerDownPreventDefault(e),this.pointerDownFocus(e),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=o(),t.addEventListener("scroll",this),this._pointerDownDefault(e,i)):this._pointerDownDefault(e,i)},n._pointerDownDefault=function(t,e){this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])};var s={INPUT:!0,TEXTAREA:!0,SELECT:!0};function o(){return{x:t.pageXOffset,y:t.pageYOffset}}return n.pointerDownFocus=function(t){s[t.target.nodeName]||this.focus()},n._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,r=s[t.target.nodeName];e||i||r||t.preventDefault()},n.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},n.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},n.pointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},n.dragStart=function(e,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this),this.dispatchEvent("dragStart",e,[i]))},n.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},n.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var r=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x%=this.slideableWidth);var n=this.dragStartPosition+i.x*r;if(!this.options.wrapAround&&this.slides.length){var s=Math.max(-this.slides[0].target,this.dragStartPosition);n=n>s?.5*(n+s):n;var o=Math.min(-this.getLastSlide().target,this.dragStartPosition);n=n<o?.5*(n+o):n}this.dragX=n,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[e,i])}},n.dragEnd=function(t,e){if(this.isDraggable){this.options.freeScroll&&(this.isFreeScrolling=!0);var i=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var r=this.getRestingPosition();this.isFreeScrolling=-r>this.slides[0].target&&-r<this.getLastSlide().target}else this.options.freeScroll||i!=this.selectedIndex||(i+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(i),delete this.isDragSelect,this.dispatchEvent("dragEnd",t,[e])}},n.dragEndRestingSelect=function(){var t=this.getRestingPosition(),e=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),i=this._getClosestResting(t,e,1),r=this._getClosestResting(t,e,-1);return i.distance<r.distance?i.index:r.index},n._getClosestResting=function(t,e,i){for(var r=this.selectedIndex,n=1/0,s=this.options.contain&&!this.options.wrapAround?function(t,e){return t<=e}:function(t,e){return t<e};s(e,n)&&(r+=i,n=e,null!==(e=this.getSlideDistance(-t,r)));)e=Math.abs(e);return{distance:n,index:r-i}},n.getSlideDistance=function(t,e){var i=this.slides.length,n=this.options.wrapAround&&i>1,s=n?r.modulo(e,i):e,o=this.slides[s];if(!o)return null;var a=n?this.slideableWidth*Math.floor(e/i):0;return t-(o.target+a)},n.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:t<0&&e<0?-1:0},n.staticClick=function(t,e){var i=this.getParentCell(t.target),r=i&&i.element,n=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,r,n])},n.onscroll=function(){var t=o(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},e}(s,t,e,i)}.apply(e,r),void 0===n||(t.exports=n)}(window)},47183:function(t,e,i){var r,n;!function(s){r=[i(69400),i(38142),i(48907),i(99498),i(30773),i(81971)],n=function(t,e,i,r,n,o){return function(t,e,i,r,n,s,o){"use strict";var a=t.jQuery,h=t.getComputedStyle,l=t.console;function u(t,e){for(t=r.makeArray(t);t.length;)e.appendChild(t.shift())}var c=0,d={};function p(t,e){var i=r.getQueryElement(t);if(i){if(this.element=i,this.element.flickityGUID){var n=d[this.element.flickityGUID];return n&&n.option(e),n}a&&(this.$element=a(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(e),this._create()}else l&&l.error("Bad element for Flickity: "+(i||t))}p.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},p.createMethods=[];var f=p.prototype;r.extend(f,e.prototype),f._create=function(){var e=this.guid=++c;for(var i in this.element.flickityGUID=e,d[e]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),(this.options.resize||this.options.watchCSS)&&t.addEventListener("resize",this),this.options.on){var r=this.options.on[i];this.on(i,r)}p.createMethods.forEach(function(t){this[t]()},this),this.options.watchCSS?this.watchCSS():this.activate()},f.option=function(t){r.extend(this.options,t)},f.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),u(this._filterFindCellElements(this.element.children),this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},f._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},f._filterFindCellElements=function(t){return r.filterFindElements(t,this.options.cellSelector)},f.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},f._makeCells=function(t){return this._filterFindCellElements(t).map(function(t){return new n(t,this)},this)},f.getLastCell=function(){return this.cells[this.cells.length-1]},f.getLastSlide=function(){return this.slides[this.slides.length-1]},f.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},f._positionCells=function(t){t=t||0,this.maxCellHeight=t&&this.maxCellHeight||0;var e=0;if(t>0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var r=this.cells.length,n=t;n<r;n++){var s=this.cells[n];s.setPosition(e),e+=s.size.outerWidth,this.maxCellHeight=Math.max(s.size.outerHeight,this.maxCellHeight)}this.slideableWidth=e,this.updateSlides(),this._containSlides(),this.slidesWidth=r?this.getLastSlide().target-this.slides[0].target:0},f._sizeCells=function(t){t.forEach(function(t){t.getSize()})},f.updateSlides=function(){if(this.slides=[],this.cells.length){var t=new s(this);this.slides.push(t);var e="left"==this.originSide?"marginRight":"marginLeft",i=this._getCanCellFit();this.cells.forEach(function(r,n){if(t.cells.length){var o=t.outerWidth-t.firstMargin+(r.size.outerWidth-r.size[e]);i.call(this,n,o)||(t.updateTarget(),t=new s(this),this.slides.push(t)),t.addCell(r)}else t.addCell(r)},this),t.updateTarget(),this.updateSelectedSlide()}},f._getCanCellFit=function(){var t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){var e=parseInt(t,10);return function(t){return t%e!==0}}var i="string"==typeof t&&t.match(/^(\d+)%$/),r=i?parseInt(i[1],10)/100:1;return function(t,e){return e<=(this.size.innerWidth+1)*r}},f._init=f.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},f.getSize=function(){this.size=i(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var g={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};f.setCellAlign=function(){var t=g[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},f.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}},f._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition,e=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,e,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)}},f._getGapCells=function(t,e,i){for(var r=[];t>0;){var n=this.cells[e];if(!n)break;r.push(n),e+=i,t-=n.size.outerWidth}return r},f._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,e=t?"marginRight":"marginLeft",i=t?"marginLeft":"marginRight",r=this.slideableWidth-this.getLastCell().size[i],n=r<this.size.innerWidth,s=this.cursorPosition+this.cells[0].size[e],o=r-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach(function(t){n?t.target=r*this.cellAlign:(t.target=Math.max(t.target,s),t.target=Math.min(t.target,o))},this)}},f.dispatchEvent=function(t,e,i){var r=e?[e].concat(i):i;if(this.emitEvent(t,r),a&&this.$element){var n=t+=this.options.namespaceJQueryEvents?".flickity":"";if(e){var s=new a.Event(e);s.type=t,n=s}this.$element.trigger(n,i)}},f.select=function(t,e,i){if(this.isActive&&(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||e)&&(t=r.modulo(t,this.slides.length)),this.slides[t])){var n=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),i?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=n&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")}},f._wrapSelect=function(t){var e=this.slides.length;if(!(this.options.wrapAround&&e>1))return t;var i=r.modulo(t,e),n=Math.abs(i-this.selectedIndex),s=Math.abs(i+e-this.selectedIndex),o=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&s<n?t+=e:!this.isDragSelect&&o<n&&(t-=e),t<0?this.x-=this.slideableWidth:t>=e&&(this.x+=this.slideableWidth)},f.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},f.next=function(t,e){this.select(this.selectedIndex+1,t,e)},f.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},f.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},f.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(t&&"string"==typeof t)if(this.queryCell(t))return void this.selectCell(t,!1,!0);var e=0;t&&this.slides[t]&&(e=t),this.select(e,!1,!0)}},f.selectCell=function(t,e,i){var r=this.queryCell(t);if(r){var n=this.getCellSlideIndex(r);this.select(n,e,i)}},f.getCellSlideIndex=function(t){for(var e=0;e<this.slides.length;e++){if(-1!=this.slides[e].cells.indexOf(t))return e}},f.getCell=function(t){for(var e=0;e<this.cells.length;e++){var i=this.cells[e];if(i.element==t)return i}},f.getCells=function(t){t=r.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getCell(t);i&&e.push(i)},this),e},f.getCellElements=function(){return this.cells.map(function(t){return t.element})},f.getParentCell=function(t){var e=this.getCell(t);return e||(t=r.getParent(t,".flickity-slider > *"),this.getCell(t))},f.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(1+2*t>=i)return this.getCellElements();for(var n=[],s=e-t;s<=e+t;s++){var o=this.options.wrapAround?r.modulo(s,i):s,a=this.slides[o];a&&(n=n.concat(a.getCellElements()))}return n},f.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#.]?[\d/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},f.uiChange=function(){this.emitEvent("uiChange")},f.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},f.onresize=function(){this.watchCSS(),this.resize()},r.debounceMethod(p,"onresize",150),f.resize=function(){if(this.isActive&&!this.isAnimating&&!this.isDragging){this.getSize(),this.options.wrapAround&&(this.x=r.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},f.watchCSS=function(){this.options.watchCSS&&(-1!=h(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},f.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=p.keyboardHandlers[t.keyCode];i&&i.call(this)}},p.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},f.focus=function(){var e=t.pageYOffset;this.element.focus({preventScroll:!0}),t.pageYOffset!=e&&t.scrollTo(t.pageXOffset,e)},f.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),u(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},f.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),a&&this.$element&&a.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete d[this.guid]},r.extend(f,o),p.data=function(t){var e=(t=r.getQueryElement(t))&&t.flickityGUID;return e&&d[e]},r.htmlInit(p,"flickity"),a&&a.bridget&&a.bridget("flickity",p);return p.setJQuery=function(t){a=t},p.Cell=n,p.Slide=s,p}(s,t,e,i,r,n,o)}.apply(e,r),void 0===n||(t.exports=n)}(window)},85300:function(t,e,i){var r,n,s;window,n=[i(47183),i(97836),i(58330),i(56146),i(36419),i(51269),i(10344)],void 0===(s="function"==typeof(r=function(t){return t})?r.apply(e,n):r)||(t.exports=s)},10344:function(t,e,i){var r,n;window,r=[i(47183),i(48907)],void 0===(n=function(t,e){return function(t,e,i){"use strict";e.createMethods.push("_createLazyload");var r=e.prototype;function n(t){if("IMG"==t.nodeName){var e=t.getAttribute("data-flickity-lazyload"),r=t.getAttribute("data-flickity-lazyload-src"),n=t.getAttribute("data-flickity-lazyload-srcset");if(e||r||n)return[t]}var s="img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]",o=t.querySelectorAll(s);return i.makeArray(o)}function s(t,e){this.img=t,this.flickity=e,this.load()}return r._createLazyload=function(){this.on("select",this.lazyLoad)},r.lazyLoad=function(){var t=this.options.lazyLoad;if(t){var e="number"==typeof t?t:0,i=this.getAdjacentCellElements(e),r=[];i.forEach(function(t){var e=n(t);r=r.concat(e)}),r.forEach(function(t){new s(t,this)},this)}},s.prototype.handleEvent=i.handleEvent,s.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),e=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t,e&&this.img.setAttribute("srcset",e),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},s.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},s.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")},s.prototype.complete=function(t,e){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var i=this.flickity.getParentCell(this.img),r=i&&i.element;this.flickity.cellSizeChange(r),this.img.classList.add(e),this.flickity.dispatchEvent("lazyLoad",t,r)},e.LazyLoader=s,e}(0,t,e)}.apply(e,r))||(t.exports=n)},56146:function(t,e,i){var r,n;window,r=[i(47183),i(72956),i(48907)],void 0===(n=function(t,e,i){return function(t,e,i,r){"use strict";function n(t){this.parent=t,this._create()}n.prototype=Object.create(i.prototype),n.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},n.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},n.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},n.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},n.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],r=this.dots.length,n=r+t,s=r;s<n;s++){var o=document.createElement("li");o.className="dot",o.setAttribute("aria-label","Page dot "+(s+1)),e.appendChild(o),i.push(o)}this.holder.appendChild(e),this.dots=this.dots.concat(i)},n.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach(function(t){this.holder.removeChild(t)},this)},n.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))},n.prototype.onTap=n.prototype.onClick=function(t){var e=t.target;if("LI"==e.nodeName){this.parent.uiChange();var i=this.dots.indexOf(e);this.parent.select(i)}},n.prototype.destroy=function(){this.deactivate(),this.allOff()},e.PageDots=n,r.extend(e.defaults,{pageDots:!0}),e.createMethods.push("_createPageDots");var s=e.prototype;return s._createPageDots=function(){this.options.pageDots&&(this.pageDots=new n(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},s.activatePageDots=function(){this.pageDots.activate()},s.updateSelectedPageDots=function(){this.pageDots.updateSelected()},s.updatePageDots=function(){this.pageDots.setDots()},s.deactivatePageDots=function(){this.pageDots.deactivate()},e.PageDots=n,e}(0,t,e,i)}.apply(e,r))||(t.exports=n)},36419:function(t,e,i){var r,n;window,r=[i(69400),i(48907),i(47183)],void 0===(n=function(t,e,i){return function(t,e,i){"use strict";function r(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}r.prototype=Object.create(t.prototype),r.prototype.play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},r.prototype.tick=function(){if("playing"==this.state){var t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;var e=this;this.clear(),this.timeout=setTimeout(function(){e.parent.next(!0),e.tick()},t)}},r.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},r.prototype.clear=function(){clearTimeout(this.timeout)},r.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},r.prototype.unpause=function(){"paused"==this.state&&this.play()},r.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},r.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},e.extend(i.defaults,{pauseAutoPlayOnHover:!0}),i.createMethods.push("_createPlayer");var n=i.prototype;return n._createPlayer=function(){this.player=new r(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},n.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},n.playPlayer=function(){this.player.play()},n.stopPlayer=function(){this.player.stop()},n.pausePlayer=function(){this.player.pause()},n.unpausePlayer=function(){this.player.unpause()},n.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},n.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},n.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},i.Player=r,i}(t,e,i)}.apply(e,r))||(t.exports=n)},58330:function(t,e,i){var r,n;window,r=[i(47183),i(72956),i(48907)],void 0===(n=function(t,e,i){return function(t,e,i,r){"use strict";var n="http://www.w3.org/2000/svg";function s(t,e){this.direction=t,this.parent=e,this._create()}function o(t){return"string"==typeof t?t:"M "+t.x0+",50 L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}s.prototype=Object.create(i.prototype),s.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");e.className="flickity-button flickity-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),this.disable(),e.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();e.appendChild(i),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},s.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},s.prototype.createSVG=function(){var t=document.createElementNS(n,"svg");t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 100 100");var e=document.createElementNS(n,"path"),i=o(this.parent.options.arrowShape);return e.setAttribute("d",i),e.setAttribute("class","arrow"),this.isLeft||e.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(e),t},s.prototype.handleEvent=r.handleEvent,s.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},s.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},s.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},s.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1)this.enable();else{var e=t.length?t.length-1:0,i=this.isPrevious?0:e;this[this.parent.selectedIndex==i?"disable":"enable"]()}},s.prototype.destroy=function(){this.deactivate(),this.allOff()},r.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");var a=e.prototype;return a._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new s(-1,this),this.nextButton=new s(1,this),this.on("activate",this.activatePrevNextButtons))},a.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},a.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=s,e}(0,t,e,i)}.apply(e,r))||(t.exports=n)}
2,30773:function(t,e,i){var r,n;window,void 0===(n="function"==typeof(r=function(){"use strict";function t(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}var e=t.prototype;return e.addCell=function(t){if(this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length){this.x=t.x;var e=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[e]}},e.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft",e=this.getLastCell(),i=e?e.size[t]:0,r=this.outerWidth-(this.firstMargin+i);this.target=this.x+this.firstMargin+r*this.parent.cellAlign},e.getLastCell=function(){return this.cells[this.cells.length-1]},e.select=function(){this.cells.forEach(function(t){t.select()})},e.unselect=function(){this.cells.forEach(function(t){t.unselect()})},e.getCellElements=function(){return this.cells.map(function(t){return t.element})},t})?r.call(e,i,e,t):r)||(t.exports=n)},7828:function(t,e,i){var r,n,s;!function(){"use strict";n=[i(87569)],r=function(t){var e="1.2.3",i=[],r={optionsKey:"jcf",dataKey:"jcf-instance",rtlClass:"jcf-rtl",focusClass:"jcf-focus",pressedClass:"jcf-pressed",disabledClass:"jcf-disabled",hiddenClass:"jcf-hidden",resetAppearanceClass:"jcf-reset-appearance",unselectableClass:"jcf-unselectable"},n="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,s=/Windows Phone/.test(navigator.userAgent);r.isMobileDevice=!(!n&&!s);var o=function(){var e=t("<style>").appendTo("head"),i=e.prop("sheet")||e.prop("styleSheet"),n=function(t,e,r){r=r||0,i.insertRule?i.insertRule(t+"{"+e+"}",r):i.addRule(t,e,r)};n("."+r.hiddenClass,"position:absolute !important;left:-9999px !important;height:1px !important;width:1px !important;margin:0 !important;border-width:0 !important;-webkit-appearance:none;-moz-appearance:none;appearance:none"),n("."+r.rtlClass+" ."+r.hiddenClass,"right:-9999px !important; left: auto !important"),n("."+r.unselectableClass,"-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0);"),n("."+r.resetAppearanceClass,"background: none; border: none; -webkit-appearance: none; appearance: none; opacity: 0; filter: alpha(opacity=0);");var s=t("html"),o=t("body");"rtl"!==s.css("direction")&&"rtl"!==o.css("direction")||s.addClass(r.rtlClass),s.on("reset",function(){setTimeout(function(){h.refreshAll()},0)}),r.styleSheetCreated=!0};(function(){var e,i=navigator.pointerEnabled||navigator.msPointerEnabled,r="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,n={},s="jcf-";e=i?{pointerover:navigator.pointerEnabled?"pointerover":"MSPointerOver",pointerdown:navigator.pointerEnabled?"pointerdown":"MSPointerDown",pointermove:navigator.pointerEnabled?"pointermove":"MSPointerMove",pointerup:navigator.pointerEnabled?"pointerup":"MSPointerUp"}:{pointerover:"mouseover",pointerdown:"mousedown"+(r?" touchstart":""),pointermove:"mousemove"+(r?" touchmove":""),pointerup:"mouseup"+(r?" touchend":"")},t.each(e,function(e,i){t.each(i.split(" "),function(t,i){n[i]=e})}),t.each(e,function(e,i){i=i.split(" "),t.event.special[s+e]={setup:function(){var e=this;t.each(i,function(t,i){e.addEventListener?e.addEventListener(i,h,!1):e["on"+i]=h})},teardown:function(){var e=this;t.each(i,function(t,i){e.addEventListener?e.removeEventListener(i,h,!1):e["on"+i]=null})}}});var o=null,a=function(t){var e=Math.abs(t.pageX-o.x),i=Math.abs(t.pageY-o.y),r=25;if(e<=r&&i<=r)return!0},h=function(e){var i=e||window.event,r=null,h=n[i.type];if((e=t.event.fix(i)).type=s+h,i.pointerType)switch(i.pointerType){case 2:e.pointerType="touch";break;case 3:e.pointerType="pen";break;case 4:e.pointerType="mouse";break;default:e.pointerType=i.pointerType}else e.pointerType=i.type.substr(0,5);return e.pageX||e.pageY||(r=i.changedTouches?i.changedTouches[0]:i,e.pageX=r.pageX,e.pageY=r.pageY),"touchend"===i.type&&(o={x:e.pageX,y:e.pageY}),"mouse"===e.pointerType&&o&&a(e)?void 0:(t.event.dispatch||t.event.handle).call(this,e)}})(),function(){var e=("onwheel"in document||document.documentMode>=9?"wheel":"mousewheel DOMMouseScroll").split(" "),i="jcf-mousewheel";t.event.special[i]={setup:function(){var i=this;t.each(e,function(t,e){i.addEventListener?i.addEventListener(e,r,!1):i["on"+e]=r})},teardown:function(){var i=this;t.each(e,function(t,e){i.addEventListener?i.removeEventListener(e,r,!1):i["on"+e]=null})}};var r=function(e){var r=e||window.event;if((e=t.event.fix(r)).type=i,"detail"in r&&(e.deltaY=-r.detail),"wheelDelta"in r&&(e.deltaY=-r.wheelDelta),"wheelDeltaY"in r&&(e.deltaY=-r.wheelDeltaY),"wheelDeltaX"in r&&(e.deltaX=-r.wheelDeltaX),"deltaY"in r&&(e.deltaY=r.deltaY),"deltaX"in r&&(e.deltaX=r.deltaX),e.delta=e.deltaY||e.deltaX,1===r.deltaMode){var n=16;e.delta*=n,e.deltaY*=n,e.deltaX*=n}return(t.event.dispatch||t.event.handle).call(this,e)}}();var a={fireNativeEvent:function(e,i){t(e).each(function(){var t,e=this;e.dispatchEvent?((t=document.createEvent("HTMLEvents")).initEvent(i,!0,
2!0),e.dispatchEvent(t)):document.createEventObject&&((t=document.createEventObject()).target=e,e.fireEvent("on"+i,t))})},bindHandlers:function(){var e=this;t.each(e,function(i,r){0===i.indexOf("on")&&t.isFunction(r)&&(e[i]=function(){return r.apply(e,arguments)})})}},h={version:e,modules:{},getOptions:function(){return t.extend({},r)},setOptions:function(e,i){arguments.length>1?this.modules[e]&&t.extend(this.modules[e].prototype.options,i):t.extend(r,e)},addModule:function(e){t.isFunction(e)&&(e=e(t,window));var n=function(e){e.element.data(r.dataKey)||e.element.data(r.dataKey,this),i.push(this),this.options=t.extend({},r,this.options,s(e.element),e),this.bindHandlers(),this.init.apply(this,arguments)},s=function(e){var i=e.data(r.optionsKey),n=e.attr(r.optionsKey);if(i)return i;if(n)try{return t.parseJSON(n)}catch(t){}};n.prototype=e,t.extend(e,a),e.plugins&&t.each(e.plugins,function(e,i){t.extend(i.prototype,a)});var o=n.prototype.destroy;n.prototype.destroy=function(){this.options.element.removeData(this.options.dataKey);for(var t=i.length-1;t>=0;t--)if(i[t]===this){i.splice(t,1);break}o&&o.apply(this,arguments)},this.modules[e.name]=n},getInstance:function(e){return t(e).data(r.dataKey)},replace:function(e,i,n){var s,a=this;return r.styleSheetCreated||o(),t(e).each(function(){var e,o=t(this);(s=o.data(r.dataKey))?s.refresh():(i||t.each(a.modules,function(t,e){if(e.prototype.matchElement.call(e.prototype,o))return i=t,!1}),i&&(e=t.extend({element:o},n),s=new a.modules[i](e)))}),s},refresh:function(e){t(e).each(function(){var e=t(this).data(r.dataKey);e&&e.refresh()})},destroy:function(e){t(e).each(function(){var e=t(this).data(r.dataKey);e&&e.destroy()})},replaceAll:function(e){var i=this;t.each(this.modules,function(r,n){t(n.prototype.selector,e).each(function(){this.className.indexOf("jcf-ignore")<0&&i.replace(this,r)})})},refreshAll:function(e){if(e)t.each(this.modules,function(i,n){t(n.prototype.selector,e).each(function(){var e=t(this).data(r.dataKey);e&&e.refresh()})});else for(var n=i.length-1;n>=0;n--)i[n].refresh()},destroyAll:function(e){if(e)t.each(this.modules,function(i,n){t(n.prototype.selector,e).each(function(e,i){var n=t(i).data(r.dataKey);n&&n.destroy()})});else for(;i.length;)i[0].destroy()}};window.jcf=h;return h},void 0===(s="function"==typeof r?r.apply(e,n):r)||(t.exports=s)}()},10063:function(){!function(t){t.addModule(function(t){"use strict";return{name:"Range",selector:'input[type="range"]',options:{realElementClass:"jcf-real-element",fakeStructure:'<span class="jcf-range"><span class="jcf-range-wrapper"><span class="jcf-range-track"><span class="jcf-range-handle"></span></span></span></span>',dataListMark:'<span class="jcf-range-mark"></span>',rangeDisplayWrapper:'<span class="jcf-range-display-wrapper"></span>',rangeDisplay:'<span class="jcf-range-display"></span>',handleSelector:".jcf-range-handle",trackSelector:".jcf-range-track",activeHandleClass:"jcf-active-handle",verticalClass:"jcf-vertical",orientation:"horizontal",range:!1,dragHandleCenter:!0,snapToMarks:!0,snapRadius:5,minRange:0},matchElement:function(t){return t.is(this.selector)},init:function(){this.initStructure(),this.attachEvents(),this.refresh()},initStructure:function(){for(this.page=t("html"),this.realElement=t(this.options.element).addClass(this.options.hiddenClass),this.fakeElement=t(this.options.fakeStructure).insertBefore(this.realElement).prepend(this.realElement),this.track=this.fakeElement.find(this.options.trackSelector),this.trackHolder=this.track.parent(),this.handle=this.fakeElement.find(this.options.handleSelector),this.createdHandleCount=0,this.activeDragHandleIndex=0,this.isMultiple=this.realElement.prop("multiple")||"string"==typeof this.realElement.attr("multiple"),this.values=this.isMultiple?this.realElement.attr("value").split(","):[this.realElement.val()],this.handleCount=this.isMultiple?this.values.length:1,this.rangeDisplayWrapper=t(this.options.rangeDisplayWrapper).insertBefore(this.track),"min"!==this.options.range&&"all"!==this.options.range||(this.rangeMin=t(this.options.rangeDisplay).addClass("jcf-range-min").prependTo(this.rangeDisplayWrapper)),"max"!==this.options.range&&"all"!==this.options.range||(this.rangeMax=t(this.options.rangeDisplay).addClass("jcf-range-max").prependTo(this.rangeDisplayWrapper));this.createdHandleCount<this.handleCount;)this.createdHandleCount++,this.handle.clone().addClass("jcf-index-"+this.createdHandleCount).insertBefore(this.handle),this.createdHandleCount>1&&(this.rangeMid||(this.rangeMid=t()),this.rangeMid=this.rangeMid.add(t(this.options.rangeDisplay).addClass("jcf-range-mid").prependTo(this.rangeDisplayWrapper)));this.handle.detach(),this.handle=null,this.handles=this.fakeElement.find(this.options.handleSelector),this.handles.eq(0).addClass(this.options.activeHandleClass),this.isVertical="vertical"===this.options.orientation,this.directionProperty=this.isVertical?"top":"left",this.offsetProperty=this.isVertical?"bottom":"left",this.eventProperty=this.isVertical?"pageY":"pageX",this.sizeProperty=this.isVertical?"height":"width",this.sizeMethod=this.isVertical?"innerHe
2ight":"innerWidth",this.fakeElement.css("touchAction",this.isVertical?"pan-x":"pan-y"),this.isVertical&&this.fakeElement.addClass(this.options.verticalClass),this.minValue=parseFloat(this.realElement.attr("min")),this.maxValue=parseFloat(this.realElement.attr("max")),this.stepValue=parseFloat(this.realElement.attr("step"))||1,this.minValue=isNaN(this.minValue)?0:this.minValue,this.maxValue=isNaN(this.maxValue)?100:this.maxValue,1!==this.stepValue&&(this.maxValue-=(this.maxValue-this.minValue)%this.stepValue),this.stepsCount=(this.maxValue-this.minValue)/this.stepValue,this.createDataList()},attachEvents:function(){this.realElement.on({focus:this.onFocus}),this.trackHolder.on("jcf-pointerdown",this.onTrackPress),this.handles.on("jcf-pointerdown",this.onHandlePress)},createDataList:function(){var e=this,i=[],r=this.realElement.attr("list");r&&(t("#"+r).find("option").each(function(){var r,n=parseFloat(this.value||this.innerHTML);isNaN(n)||(r=e.valueToOffset(n),i.push({value:n,offset:r}),t(e.options.dataListMark).text(n).attr({"data-mark-value":n}).css(e.offsetProperty,r+"%").appendTo(e.track))}),i.length&&(e.dataValues=i))},getDragHandleRange:function(t){var e=-1/0,i=1/0;return t>0&&(e=this.valueToStepIndex(parseFloat(this.values[t-1])+this.options.minRange)),t<this.handleCount-1&&(i=this.valueToStepIndex(parseFloat(this.values[t+1])-this.options.minRange)),{minStepIndex:e,maxStepIndex:i}},getNearestHandle:function(e){this.isVertical&&(e=1-e);var i=this.handles.eq(0),r=1/0,n=this;return this.handleCount>1&&this.handles.each(function(){var s=parseFloat(this.style[n.offsetProperty])/100,o=Math.abs(s-e);o<r&&(r=o,i=t(this))}),i},onTrackPress:function(t){var e,i,r;t.preventDefault(),this.realElement.is(":disabled")||this.activeDragHandle||(e=this.track[this.sizeMethod](),i=this.track.offset()[this.directionProperty],this.activeDragHandle=this.getNearestHandle((t[this.eventProperty]-i)/this.trackHolder[this.sizeMethod]()),this.activeDragHandleIndex=this.handles.index(this.activeDragHandle),this.handles.removeClass(this.options.activeHandleClass).eq(this.activeDragHandleIndex).addClass(this.options.activeHandleClass),r=this.activeDragHandle[this.sizeMethod]()/2,this.dragData={trackSize:e,innerOffset:r,trackOffset:i,min:i,max:i+e},this.page.on({"jcf-pointermove":this.onHandleMove,"jcf-pointerup":this.onHandleRelease}),"mouse"===t.pointerType&&this.realElement.focus(),this.onHandleMove(t))},onHandlePress:function(e){var i,r,n;e.preventDefault(),this.realElement.is(":disabled")||this.activeDragHandle||(this.activeDragHandle=t(e.currentTarget),this.activeDragHandleIndex=this.handles.index(this.activeDragHandle),this.handles.removeClass(this.options.activeHandleClass).eq(this.activeDragHandleIndex).addClass(this.options.activeHandleClass),i=this.track[this.sizeMethod](),r=this.track.offset()[this.directionProperty],n=this.options.dragHandleCenter?this.activeDragHandle[this.sizeMethod]()/2:e[this.eventProperty]-this.handle.offset()[this.directionProperty],this.dragData={trackSize:i,innerOffset:n,trackOffset:r,min:r,max:r+i},this.page.on({"jcf-pointermove":this.onHandleMove,"jcf-pointerup":this.onHandleRelease}),"mouse"===e.pointerType&&this.realElement.focus())},onHandleMove:function(e){var i,r,n,s,o,a=this;if((i=this.isVertical?this.dragData.max+(this.dragData.min-e[this.eventProperty])-this.dragData.innerOffset:e[this.eventProperty]-this.dragData.innerOffset)<this.dragData.min?i=this.dragData.min:i>this.dragData.max&&(i=this.dragData.max),e.preventDefault(),this.options.snapToMarks&&this.dataValues){var h=i-this.dragData.trackOffset;r=(i-this.dragData.trackOffset)/this.dragData.trackSize*100,t.each(this.dataValues,function(t,e){var i=e.offset/100*a.dragData.trackSize,n=i-a.options.snapRadius,s=i+a.options.snapRadius;if(h>=n&&h<=s)return r=e.offset,!1})}else r=(i-this.dragData.trackOffset)/this.dragData.trackSize*100;n=Math.round(r*this.stepsCount/100),this.handleCount>1&&(n<(o=this.getDragHandleRange(this.activeDragHandleIndex)).minStepIndex?n=Math.max(o.minStepIndex,n):n>o.maxStepIndex&&(n=Math.min(o.maxStepIndex,n))),s=n*(100/this.stepsCount),this.dragData.stepIndex!==n&&(this.dragData.stepIndex=n,this.dragData.offset=s,this.activeDragHandle.css(this.offsetProperty,this.dragData.offset+"%"),this.values[this.activeDragHandleIndex]=""+this.stepIndexToValue(n),this.updateV
2alues(),this.realElement.trigger("input"))},onHandleRelease:function(){var t;"number"==typeof this.dragData.offset&&(t=this.stepIndexToValue(this.dragData.stepIndex),this.realElement.val(t).trigger("change")),this.page.off({"jcf-pointermove":this.onHandleMove,"jcf-pointerup":this.onHandleRelease}),delete this.activeDragHandle,delete this.dragData},onFocus:function(){this.fakeElement.hasClass(this.options.focusClass)||(this.fakeElement.addClass(this.options.focusClass),this.realElement.on({blur:this.onBlur,keydown:this.onKeyPress}))},onBlur:function(){this.fakeElement.removeClass(this.options.focusClass),this.realElement.off({blur:this.onBlur,keydown:this.onKeyPress})},onKeyPress:function(t){var e=38===t.which||39===t.which,i=37===t.which||40===t.which;if(9===t.which&&this.handleCount>1){if(t.shiftKey&&this.activeDragHandleIndex>0)this.activeDragHandleIndex--;else{if(t.shiftKey||!(this.activeDragHandleIndex<this.handleCount-1))return;this.activeDragHandleIndex++}t.preventDefault(),this.handles.removeClass(this.options.activeHandleClass).eq(this.activeDragHandleIndex).addClass(this.options.activeHandleClass)}(i||e)&&(t.preventDefault(),this.step(e?this.stepValue:-this.stepValue))}
2,updateValues:function(){var t=this.values.join(",");this.values.length>1?(this.realElement.prop("valueLow",this.values[0]),this.realElement.prop("valueHigh",this.values[this.values.length-1]),this.realElement.val(t),this.realElement.val()!==t&&this.realElement.val(this.values[this.values.length-1])):this.realElement.val(t),this.updateRanges()},updateRanges:function(){var t,e=this;this.rangeMin&&(t=this.handles[0],this.rangeMin.css(this.offsetProperty,0).css(this.sizeProperty,t.style[this.offsetProperty])),this.rangeMax&&(t=this.handles[this.handles.length-1],this.rangeMax.css(this.offsetProperty,t.style[this.offsetProperty]).css(this.sizeProperty,100-parseFloat(t.style[this.offsetProperty])+"%")),this.rangeMid&&this.handles.each(function(t,i){var r,n;t>0&&(r=e.handles[t-1],(n=e.rangeMid[t-1]).style[e.offsetProperty]=r.style[e.offsetProperty],n.style[e.sizeProperty]=parseFloat(i.style[e.offsetProperty])-parseFloat(r.style[e.offsetProperty])+"%")})},step:function(t){var e=parseFloat(this.values[this.activeDragHandleIndex||0]),i=e,r=this.minValue,n=this.maxValue;isNaN(e)&&(i=0),i+=t,this.handleCount>1&&(this.activeDragHandleIndex>0&&(r=parseFloat(this.values[this.activeDragHandleIndex-1])+this.options.minRange),this.activeDragHandleIndex<this.handleCount-1&&(n=parseFloat(this.values[this.activeDragHandleIndex+1])-this.options.minRange)),i>n?i=n:i<r&&(i=r),i!==e&&(this.values[this.activeDragHandleIndex||0]=""+i,this.updateValues(),this.realElement.trigger("input").trigger("change"),this.setSliderValue(this.values))},valueToStepIndex:function(t){return(t-this.minValue)/this.stepValue},stepIndexToValue:function(t){return this.minValue+this.stepValue*t},valueToOffset:function(t){var e=this.maxValue-this.minValue;return 100*((t-this.minValue)/e)},getSliderValue:function(){return t.map(this.values,function(t){return parseFloat(t)||0})},setSliderValue:function(t){var e=this;this.handles.each(function(i,r){r.style[e.offsetProperty]=e.valueToOffset(t[i])+"%"})},refresh:function(){var t=this.realElement.is(":disabled");this.fakeElement.toggleClass(this.options.disabledClass,t),this.setSliderValue(this.getSliderValue()),this.updateRanges()},destroy:function(){this.realElement.removeClass(this.options.hiddenClass).insertBefore(this.fakeElement),this.fakeElement.remove(),this.realElement.off({keydown:this.onKeyPress,focus:this.onFocus,blur:this.onBlur})}}})}(jcf)},74608:function(){!function(t){t.addModule(function(e,i){"use strict";var r={name:"Select",selector:"select",options:{element:null,multipleCompactStyle:!1},plugins:{ListBox:s,ComboBox:n,SelectList:o},matchElement:function(t){return t.is("select")},init:function(){this.element=e(this.options.element),this.createInstance()},isListBox:function(){return this.element.is("[size]:not([jcf-size]), [multiple]")},createInstance:function(){this.instance&&this.instance.destroy(),this.isListBox()&&!this.options.multipleCompactStyle?this.instance=new s(this.options):this.instance=new n(this.options)},refresh:function(){this.isListBox()&&this.instance instanceof n||!this.isListBox()&&this.instance instanceof s?this.createInstance():this.instance.refresh()},destroy:function(){this.instance.destroy()}};function n(t){this.options=e.extend({wrapNative:!0,wrapNativeOnMobile:!0,fakeDropInBody:!0,useCustomScroll:!0,flipDropToFit:!0,maxVisibleItems:10,fakeAreaStructure:'<span class="jcf-select"><span class="jcf-select-text"></span><span class="jcf-select-opener"></span></span>',fakeDropStructure:'<div class="jcf-select-drop"><div class="jcf-select-drop-content"></div></div>',optionClassPrefix:"jcf-option-",selectClassPrefix:"jcf-select-",dropContentSelector:".jcf-select-drop-content",selectTextSelector:".jcf-select-text",dropActiveClass:"jcf-drop-active",flipDropClass:"jcf-drop-flipped"},t),this.init()}function s(t){this.options=e.extend({wrapNative:!0,useCustomScroll:!0,fakeStructure:'<span class="jcf-list-box"><span class="jcf-list-wrapper"></span></span>',selectClassPrefix:"jcf-select-",listHolder:".jcf-list-wrapper"},t),this.init()}function o(t){this.options=e.extend({holder:null,maxVisibleItems:10,selectOnClick:!0,useHoverClass:!1,useCustomScroll:!1,handleResize:!0,multipleSelectWithoutKey:!1,alwaysPreventMouseWheel:!1,indexAttribute:"data-index",cloneClassPrefix:"jcf-option-",containerStructure:'<span class="jcf-list"><span class="jcf-list-content"></span></span>',containerSelector:".jcf-list-content",captionClass:"jcf-optgroup-caption",disabledClass:"jcf-disabled",optionClass:"jcf-option",groupClass:"jcf-optgroup",hoverClass:"jcf-hover",selectedClass:"jcf-selected",scrollClass:"jcf-scroll-active"},t),this.init()}e.extend(n.prototype,{init:function(){this.initStructure(),this.bindHandlers(),this.attachEvents(),this.refresh()},initStructure:function(){this.win=e(i),this.doc=e(document),this.realElement=e(this.options.element),this.fakeElement=e(this.options.fakeAreaStructure).insertAfter(this.realElement),this.selectTextContainer=this.fakeElement.find(this.options.selectTextSelector),this.selectText=e("<span></span>").appendTo(this.selectTextContainer),h(this.fakeElement),this.fakeElement.addClass(a(this.realElement.prop("className"),this.options.selectClassPrefix)),this.realElement.prop("multiple")&&this.fakeElement.addClass("jcf-compact-multiple"),this.options.isMobileDevice&&this.options.wrapNativeOnMobile&&!this.options.wrapNative&&(this.options.wrapNative=!0),this.options.wrapNative?this.realElement.prepe
2ndTo(this.fakeElement).css({position:"absolute",height:"100%",width:"100%"}).addClass(this.options.resetAppearanceClass):(this.realElement.addClass(this.options.hiddenClass),this.fakeElement.attr("title",this.realElement.attr("title")),this.fakeDropTarget=this.options.fakeDropInBody?e("body"):this.fakeElement)},attachEvents:function(){var t=this;this.delayedRefresh=function(){setTimeout(function(){t.refresh(),t.list&&(t.list.refresh(),t.list.scrollToActiveOption())},1)},this.options.wrapNative?this.realElement.on({focus:this.onFocus,change:this.onChange,click:this.onChange,keydown:this.delayedRefresh}):(this.realElement.on({focus:this.onFocus,change:this.onChange,keydown:this.onKeyDown}),this.fakeElement.on({"jcf-pointerdown":this.onSelectAreaPress}))},onKeyDown:function(t){13===t.which?this.toggleDropdown():this.dropActive&&this.delayedRefresh()},onChange:function(){this.refresh()},onFocus:function(){this.pressedFlag&&this.focusedFlag||(this.fakeElement.addClass(this.options.focusClass),this.realElement.on("blur",this.onBlur),this.toggleListMode(!0),this.focusedFlag=!0)},onBlur:function(){this.pressedFlag||(this.fakeElement.removeClass(this.options.focusClass),this.realElement.off("blur",this.onBlur),this.toggleListMode(!1),this.focusedFlag=!1)},onResize:function(){this.dropActive&&this.hideDropdown()},onSelectDropPress:function(){this.pressedFlag=!0},onSelectDropRelease:function(t,e){this.pressedFlag=!1,"mouse"===e.pointerType&&this.realElement.focus()},onSelectAreaPress:function(t){!this.options.fakeDropInBody&&e(t.target).closest(this.dropdown).length||t.button>1||this.realElement.is(":disabled")||(this.selectOpenedByEvent=t.pointerType,this.toggleDropdown(),this.focusedFlag||("mouse"===t.pointerType?this.realElement.focus():this.onFocus(t)),this.pressedFlag=!0,this.fakeElement.addClass(this.options.pressedClass),this.doc.on("jcf-pointerup",this.onSelectAreaRelease))},onSelectAreaRelease:function(t){this.focusedFlag&&"mouse"===t.pointerType&&this.realElement.focus(),this.pressedFlag=!1,this.fakeElement.removeClass(this.options.pressedClass),this.doc.off("jcf-pointerup",this.onSelectAreaRelease)},onOutsideClick:function(t){var i=e(t.target);i.closest(this.fakeElement).length||i.closest(this.dropdown).length||this.hideDropdown()},onSelect:function(){this.refresh(),this.realElement.prop("multiple")?this.repositionDropdown():this.hideDropdown(),this.fireNativeEvent(this.realElement,"change")},toggleListMode:function(t){this.options.wrapNative||(t?this.realElement.attr({size:4,"jcf-size":""}):this.options.wrapNative||this.realElement.removeAttr("size jcf-size"))},createDropdown:function(){this.dropdown&&(this.list.destroy(),this.dropdown.remove()),this.dropdown=e(this.options.fakeDropStructure).appendTo(this.fakeDropTarget),this.dropdown.addClass(a(this.realElement.prop("className"),this.options.selectClassPrefix)),h(this.dropdown),this.realElement.prop("multiple")&&this.dropdown.addClass("jcf-compact-multiple"),this.options.fakeDropInBody&&this.dropdown.css({position:"absolute",top:-9999}),this.list=new o({useHoverClass:!0,handleResize:!1,alwaysPreventMouseWheel:!0,maxVisibleItems:this.options.maxVisibleItems,useCustomScroll:this.options.useCustomScroll,holder:this.dropdown.find(this.options.dropContentSelector),multipleSelectWithoutKey:this.realElement.prop("multiple"),element:this.realElement}),e(this.list).on({select:this.onSelect,press:this.onSelectDropPress,release:this.onSelectDropRelease})},repositionDropdown:function(){var t,e,i,r=this.fakeElement.offset(),n=this.fakeElement[0].getBoundingClientRect(),s=n.width||n.right-n.left,o=this.fakeElement.outerHeight(),a=this.dropdown.css("width",s).outerHeight(),h=this.win.scrollTop(),l=this.win.height(),u=!1;r.top+o+a>h+l&&r.top-a>h&&(u=!0),this.options.fakeDropInBody&&(i="static"!==this.fakeDropTarget.css("position")?this.fakeDropTarget.offset().top:0,this.options.flipDropToFit&&u?(e=r.left,t=r.top-a-i):(e=r.left,t=r.top+o-i),this.dropdown.css({width:s,left:e,top:t})),this.dropdown.add(this.fakeElement).toggleClass(this.options.flipDropClass,this.options.flipDropToFit&&u)},showDropdown:function(){this.realElement.prop("options").length&&(this.dropdown||this.createDropdown(),this.dropActive=!0,this.dropdown.appendTo(this.fakeDropTarget),this.fakeElement.addClass(this.options.dropActiveClass),this.refreshSelectedText(),this.repositionDropdown(),this.list.setScrollTop(this.savedScrollTop),this.list.refresh(),this.win.on("resize",this.onResize),this.doc.on("jcf-pointerdown",this.onOutsideClick))},hideDropdown:function(){this.dropdown&&(this.savedScrollTop=this.list.getScrollTop(),this.fakeElement.removeClass(this.options.dropActiveClass+" "+this.options.flipDropClass),this.dropdown.removeClass(this.options.flipDropClass).detach(),this.doc.off("jcf-pointerdown",this.onOutsideClick),this.win.off("resize",this.onResize),this.dropActive=!1,"touch"===this.selectOpenedByEvent&&this.onBlur())},toggleDropdown:function(){this.dropActive?this.hideDropdown():this.showDropdown()},refreshSelectedText:function(){var t,i=this.realElement.prop("selectedIndex"),r=this.realElement.prop("options")[i],n=r?r.getAttribute("data-image"):null,s="";this.realElement.prop("multiple")?(e.each(this.realElement.prop("options"),function(t,e){e.selected&&(s+=(s?", ":"")+e.innerHTML)}),s||(s=this.realElement.attr("placeholder")||""),this.selectText.removeAttr("class").html(s)):r?this.currentSelectedText===r.innerHTML&&this.currentSelectedImage===n||(t=a(r.className,this.options.optionClassPrefix),this.selectText.attr("class",t).html(r.innerHTML),n?(this.selectImage||(this.selectImage=e("<img>").prependTo(this.selectTextContainer).hide()),this.selectImage.attr("src",n).show()):this.selectImage&&this.selectImage.hide(),this.currentSelectedText=r.innerHTML,this.currentSelectedImage=n):(this.selectImage&&this.selectImage.hide(),this.selectText.removeAttr("class").empty())},refresh:function(){"none"===this.realElement.prop("style").display?this.fakeElement.hide():this.fakeElement.show(),this.refreshSelectedText(),this.fakeElement.toggleClass(this.options.disabledClass,this.realElement.is(":disabled"))},destroy:function(){this.options.wrapNative?this.realElement.insertBefore(this.fakeElement).css({position:"",height:"",width:""}).removeClass(this.options.resetAppearanceClass):(this.realElement.removeClass(this.options.hiddenClass),this.realElement.is("[jcf-size]")&&this.realElement.removeAttr("size jcf-size")),this.fakeElement.remove(),this.doc.off("jcf-pointerup",this.onSelectAreaRelease),this.realElement.off({focus:this.onFocus})}}),e.extend(s.prototype,{init:function(){this.bindHandlers(),this.initStructure(),this.attachEvents()},initStructure:function(){this.realElement=e(this.options.element),this.fakeElement=e(this.options.fakeStructure).insertAfter(this.realElement),this.listHolder=this.fakeElement.find(this.options.listHolder),h(this.fakeElement),this.fakeElement.addClass(a(this.realElement.prop("className"),this.options.selectClassPrefix)),this.realElement.addClass(this.options.hiddenClass),this.list=new o({useCustomScroll:this.options.useCustomScroll,holder:this.listHolder,selectOnClick:!1,element:this.realElement})},attachEvents:function(){var t=this;this.delayedRefresh=function(e){e&&(16===e.which||e.ctrlKey||e.metaKey||e.altKey)||(clearTimeout(t.refreshTimer),t.refreshTimer=setTimeout(function(){t.refresh(),t.list.scrollToActiveOption()},1))}
2,this.realElement.on({focus:this.onFocus,click:this.delayedRefresh,keydown:this.delayedRefresh}),e(this.list).on({select:this.onSelect,press:this.onFakeOptionsPress,release:this.onFakeOptionsRelease})},onFakeOptionsPress:function(t,e){this.pressedFlag=!0,"mouse"===e.pointerType&&this.realElement.focus()},onFakeOptionsRelease:function(t,e){this.pressedFlag=!1,"mouse"===e.pointerType&&this.realElement.focus()},onSelect:function(){this.fireNativeEvent(this.realElement,"change"),this.fireNativeEvent(this.realElement,"click")},onFocus:function(){this.pressedFlag&&this.focusedFlag||(this.fakeElement.addClass(this.options.focusClass),this.realElement.on("blur",this.onBlur),this.focusedFlag=!0)},onBlur:function(){this.pressedFlag||(this.fakeElement.removeClass(this.options.focusClass),this.realElement.off("blur",this.onBlur),this.focusedFlag=!1)},refresh:function(){this.fakeElement.toggleClass(this.options.disabledClass,this.realElement.is(":disabled")),this.list.refresh()},destroy:function(){this.list.destroy(),this.realElement.insertBefore(this.fakeElement).removeClass(this.options.hiddenClass),this.fakeElement.remove()}}),e.extend(o.prototype,{init:function(){this.initStructure(),this.refreshSelectedClass(),this.attachEvents()},initStructure:function(){this.element=e(this.options.element),this.indexSelector="["+this.options.indexAttribute+"]",this.container=e(this.options.containerStructure).appendTo(this.options.holder),this.listHolder=this.container.find(this.options.containerSelector),this.lastClickedIndex=this.element.prop("selectedIndex"),this.rebuildList(),this.element.prop("multiple")&&(this.previousSelection=this.getSelectedOptionsIndexes())},attachEvents:function(){this.bindHandlers(),this.listHolder.on("jcf-pointerdown",this.indexSelector,this.onItemPress),this.listHolder.on("jcf-pointerdown",this.onPress),this.options.useHoverClass&&this.listHolder.on("jcf-pointerover",this.indexSelector,this.onHoverItem)},onPress:function(t){e(this).trigger("press",t),this.listHolder.on("jcf-pointerup",this.onRelease)},onRelease:function(t){e(this).trigger("release",t),this.listHolder.off("jcf-pointerup",this.onRelease)},onHoverItem:function(t){var e=parseFloat(t.currentTarget.getAttribute(this.options.indexAttribute));this.fakeOptions.removeClass(this.options.hoverClass).eq(e).addClass(this.options.hoverClass)},onItemPress:function(t){"touch"===t.pointerType||this.options.selectOnClick?(this.tmpListOffsetTop=this.list.offset().top,this.listHolder.on("jcf-pointerup",this.indexSelector,this.onItemRelease)):this.onSelectItem(t)},onItemRelease:function(t){this.listHolder.off("jcf-pointerup",this.indexSelector,this.onItemRelease),this.tmpListOffsetTop===this.list.offset().top&&this.listHolder.on("click",this.indexSelector,{savedPointerType:t.pointerType},this.onSelectItem),delete this.tmpListOffsetTop},onSelectItem:function(t){var i,r=parseFloat(t.currentTarget.getAttribute(this.options.indexAttribute)),n=t.data&&t.data.savedPointerType||t.pointerType||"mouse";this.listHolder.off("click",this.indexSelector,this.onSelectItem),t.button>1||this.realOptions[r].disabled||(this.element.prop("multiple")?t.metaKey||t.ctrlKey||"touch"===n||this.options.multipleSelectWithoutKey?this.realOptions[r].selected=!this.realOptions[r].selected:t.shiftKey?(i=[this.lastClickedIndex,r].sort(function(t,e){return t-e}),this.realOptions.each(function(t,e){e.selected=t>=i[0]&&t<=i[1]})):this.element.prop("selectedIndex",r):this.element.prop("selectedIndex",r),t.shiftKey||(this.lastClickedIndex=r),this.refreshSelectedClass(),"mouse"===n&&this.scrollToActiveOption(),e(this).trigger("select"))},rebuildList:function(){var i=this,r=this.element[0];this.storedSelectHTML=r.innerHTML,this.optionIndex=0,this.list=e(this.createOptionsList(r)),this.listHolder.empty().append(this.list),this.realOptions=this.element.find("option"),this.fakeOptions=this.list.find(this.indexSelector),this.fakeListItems=this.list.find("."+this.options.captionClass+","+this.indexSelector),delete this.optionIndex;var n=this.options.maxVisibleItems,s=this.element.prop("size");s>1&&!this.element.is("[jcf-size]")&&(n=s);var o=this.fakeOptions.length>n;this.container.toggleClass(this.options.scrollClass,o),o&&(this.listHolder.css({maxHeight:this.getOverflowHeight(n),overflow:"auto"}),this.options.useCustomScroll&&t.modules.Scrollable)?t.replace(this.listHolder,"Scrollable",{handleResize:this.options.handleResize,alwaysPreventMouseWheel:this.options.alwaysPreventMouseWheel}):this.options.alwaysPreventMouseWheel&&(this.preventWheelHandler=function(t){var e=i.listHolder.scrollTop(),r=i.listHolder.prop("scrollHeight")-i.listHolder.innerHe
2ight();(e<=0&&t.deltaY<0||e>=r&&t.deltaY>0)&&t.preventDefault()},this.listHolder.on("jcf-mousewheel",this.preventWheelHandler))},refreshSelectedClass:function(){var t,e=this,i=this.element.prop("multiple"),r=this.element.prop("selectedIndex");i?this.realOptions.each(function(t,i){e.fakeOptions.eq(t).toggleClass(e.options.selectedClass,!!i.selected)}):(this.fakeOptions.removeClass(this.options.selectedClass+" "+this.options.hoverClass),t=this.fakeOptions.eq(r).addClass(this.options.selectedClass),this.options.useHoverClass&&t.addClass(this.options.hoverClass))},scrollToActiveOption:function(){var t=this.getActiveOptionOffset();"number"==typeof t&&this.listHolder.prop("scrollTop",t)},getSelectedOptionsIndexes:function(){var t=[];return this.realOptions.each(function(e,i){i.selected&&t.push(e)}),t},getChangedSelectedIndex:function(){var t=this.element.prop("selectedIndex"),i=this,r=!1,n=null;return this.element.prop("multiple")?(this.currentSelection=this.getSelectedOptionsIndexes(),e.each(this.currentSelection,function(t,e){!r&&i.previousSelection.indexOf(e)<0&&(0===t&&(r=!0),n=e)}),this.previousSelection=this.currentSelection,n):t},getActiveOptionOffset:function(){var t=this.getChangedSelectedIndex();if(null!==t){var e=this.listHolder.height(),i=this.listHolder.prop("scrollTop"),r=this.fakeOptions.eq(t),n=r.offset().top-this.list.offset().top,s=r.innerHeight();return n+s>=i+e?n-e+s:n<i?n:void 0}},getOverflowHeight:function(t){var e=this.fakeListItems.eq(t-1),i=this.list.offset().top;return e.offset().top+e.innerHeight()-i},getScrollTop:function(){return this.listHolder.scrollTop()},setScrollTop:function(t){this.listHolder.scrollTop(t)},createOption:function(t){var e=document.createElement("span");e.className=this.options.optionClass,e.innerHTML=t.innerHTML,e.setAttribute(this.options.indexAttribute,this.optionIndex++);var i,r=t.getAttribute("data-image");return r&&((i=document.createElement("img")).src=r,e.insertBefore(i,e.childNodes[0])),t.disabled&&(e.className+=" "+this.options.disabledClass),t.className&&(e.className+=" "+a(t.className,this.options.cloneClassPrefix)),e},createOptGroup:function(t){var e,i,r=document.createElement("span"),n=t.getAttribute("label");return(e=document.createElement("span")).className=this.options.captionClass,e.innerHTML=n,r.appendChild(e),t.children.length&&(i=this.createOptionsList(t),r.appendChild(i)),r.className=this.options.groupClass,r},createOptionContainer:function(){return document.createElement("li")},createOptionsList:function(t){var i=this,r=document.createElement("ul");return e.each(t.children,function(t,e){var n,s=i.createOptionContainer(e);switch(e.tagName.toLowerCase()){case"option":n=i.createOption(e);break;case"optgroup":n=i.createOptGroup(e)}r.appendChild(s).appendChild(n)}),r},refresh:function(){this.storedSelectHTML!==this.element.prop("innerHTML")&&this.rebuildList();var e=t.getInstance(this.listHolder);e&&e.refresh(),this.refreshSelectedClass()},destroy:function(){this.listHolder.off("jcf-mousewheel",this.preventWheelHandler),this.listHolder.off("jcf-pointerdown",this.indexSelector,this.onSelectItem),this.listHolder.off("jcf-pointerover",this.indexSelector,this.onHoverItem),this.listHolder.off("jcf-pointerdown",this.onPress)}});var a=function(t,e){return t?t.replace(/[\s]*([\S]+)+[\s]*/gi,e+"$1 "):""},h=function(){var e=t.getOptions().unselectableClass;function i(t){t.preventDefault()}return function(t){t.addClass(e).on("selectstart",i)}}();return r})}(jcf)},84038:function(){function t(e,i,r){this.extend(t,google.maps.OverlayView),this.map_=e,this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var n=r||{};this.gridSize_=n.gridSize||60,this.minClusterSize_=n.minimumClusterSize||2,this.maxZoom_=n.maxZoom||null,this.styles_=n.styles||[],this.imagePath_=n.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=n.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,null!=n.zoomOnClick&&(this.zoomOnClick_=n.zoomOnClick),this.averageCenter_=!1,null!=n.averageCenter&&(this.averageCenter_=n.averageCenter),this.setupStyles_(),this.setMap(e),this.prevZoom_=this.map_.getZoom();var s=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var t=s.map_.getZoom();s.prevZoom_!=t&&(s.prevZoom_=t,s.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){s.redraw()}
2),i&&i.length&&this.addMarkers(i,!1)}function e(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinClusterSize(),this.averageCenter_=t.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new i(this,t.getStyles(),t.getGridSize())}function i(t,e,r){t.getMarkerClusterer().extend(i,google.maps.OverlayView),this.styles_=e,this.padding_=r||0,this.cluster_=t,this.center_=null,this.map_=t.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}t.prototype.MARKER_CLUSTER_IMAGE_PATH_="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m",t.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png",t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t.prototype.onAdd=function(){this.setReady_(!0)},t.prototype.draw=function(){},t.prototype.setupStyles_=function(){if(!this.styles_.length)for(var t,e=0;t=this.sizes[e];e++)this.styles_.push({url:this.imagePath_+(e+1)+"."+this.imageExtension_,height:t,width:t})},t.prototype.fitMapToMarkers=function(){for(var t,e=this.getMarkers(),i=new google.maps.LatLngBounds,r=0;t=e[r];r++)i.extend(t.getPosition());this.map_.fitBounds(i)},t.prototype.setStyles=function(t){this.styles_=t},t.prototype.getStyles=function(){return this.styles_},t.prototype.isZoomOnClick=function(){return this.zoomOnClick_},t.prototype.isAverageCenter=function(){return this.averageCenter_},t.prototype.getMarkers=function(){return this.markers_},t.prototype.getTotalMarkers=function(){return this.markers_.length},t.prototype.setMaxZoom=function(t){this.maxZoom_=t},t.prototype.getMaxZoom=function(){return this.maxZoom_},t.prototype.calculator_=function(t,e){for(var i=0,r=t.length,n=r;0!==n;)n=parseInt(n/10,10),i++;return{text:r,index:i=Math.min(i,e)}},t.prototype.setCalculator=function(t){this.calculator_=t},t.prototype.getCalculator=function(){return this.calculator_},t.prototype.addMarkers=function(t,e){for(var i,r=0;i=t[r];r++)this.pushMarkerTo_(i);e||this.redraw()},t.prototype.pushMarkerTo_=function(t){if(t.isAdded=!1,t.draggable){var e=this;google.maps.event.addListener(t,"dragend",function(){t.isAdded=!1,e.repaint()})}this.markers_.push(t)},t.prototype.addMarker=function(t,e){this.pushMarkerTo_(t),e||this.redraw()},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers_.indexOf)e=this.markers_.indexOf(t);else for(var i,r=0;i=this.markers_[r];r++)if(i==t){e=r;break}return-1!=e&&(t.setMap(null),this.markers_.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!(e||!i)&&(this.resetViewport(),this.redraw(),!0)},t.prototype.removeMarkers=function(t,e){for(var i,r=!1,n=0;i=t[n];n++){var s=this.removeMarker_(i);r=r||s}if(!e&&r)return this.resetViewport(),this.redraw(),!0},t.prototype.setReady_=function(t){this.ready_||(this.ready_=t,this.createClusters_())},t.prototype.getTotalClusters=function(){return this.clusters_.length},t.prototype.getMap=function(){return this.map_},t.prototype.setMap=function(t){this.map_=t},t.prototype.getGridSize=function(){return this.gridSize_},t.prototype.setGridSize=function(t){this.gridSize_=t},t.prototype.getMinClusterSize=function(){return this.minClusterSize_},t.prototype.setMinClusterSize=function(t){this.minClusterSize_=t},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),r=new google.maps.LatLng(t.getSouthWest
2().lat(),t.getSouthWest().lng()),n=e.fromLatLngToDivPixel(i);n.x+=this.gridSize_,n.y-=this.gridSize_;var s=e.fromLatLngToDivPixel(r);s.x-=this.gridSize_,s.y+=this.gridSize_;var o=e.fromDivPixelToLatLng(n),a=e.fromDivPixelToLatLng(s);return t.extend(o),t.extend(a),t},t.prototype.isMarkerInBounds_=function(t,e){return e.contains(t.getPosition())},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers_=[]},t.prototype.resetViewport=function(t){for(var e,i=0;e=this.clusters_[i];i++)e.remove();var r;for(i=0;r=this.markers_[i];i++)r.isAdded=!1,t&&r.setMap(null);this.clusters_=[]},t.prototype.repaint=function(){var t=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),window.setTimeout(function(){for(var e,i=0;e=t[i];i++)e.remove()},0)},t.prototype.redraw=function(){this.createClusters_()},t.prototype.distanceBetweenPoints_=function(t,e){if(!t||!e)return 0;var i=(e.lat()-t.lat())*Math.PI/180,r=(e.lng()-t.lng())*Math.PI/180,n=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(r/2)*Math.sin(r/2);return 6371*(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)))},t.prototype.addToClosestCluster_=function(t){for(var i,r=4e4,n=null,s=(t.getPosition(),0);
2i=this.clusters_[s];s++){var o=i.getCenter();if(o){var a=this.distanceBetweenPoints_(o,t.getPosition());a<r&&(r=a,n=i)}}n&&n.isMarkerInClusterBounds(t)?n.addMarker(t):((i=new e(this)).addMarker(t),this.clusters_.push(i))},t.prototype.createClusters_=function(){if(this.ready_)for(var t,e=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),i=this.getExtendedBounds(e),r=0;t=this.markers_[r];r++)!t.isAdded&&this.isMarkerInBounds_(t,i)&&this.addToClosestCluster_(t)},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers_.indexOf)return-1!=this.markers_.indexOf(t);for(var e,i=0;e=this.markers_[i];i++)if(e==t)return!0;return!1},e.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,i=(this.center_.lat()*(e-1)+t.getPosition().lat())/e,r=(this.center_.lng()*(e-1)+t.getPosition().lng())/e;this.center_=new google.maps.LatLng(i,r),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();t.isAdded=!0,this.markers_.push(t);var n=this.markers_.length;if(n<this.minClusterSize_&&t.getMap()!=this.map_&&t.setMap(this.map_),n==this.minClusterSize_)for(var s=0;s<n;s++)this.markers_[s].setMap(null);return n>=this.minClusterSize_&&t.setMap(null),this.updateIcon(),!0},e.prototype.getMarkerClusterer=function(){return this.markerClusterer_},e.prototype.getBounds=function(){for(var t,e=new google.maps.LatLngBounds(this.center_,this.center_),i=this.getMarkers(),r=0;t=i[r];r++)e.extend(t.getPosition());return e},e.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},e.prototype.getSize=function(){return this.markers_.length},e.prototype.getMarkers=function(){return this.markers_},e.prototype.getCenter=function(){return this.center_},e.prototype.calculateBounds_=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)},e.prototype.isMarkerInClusterBounds=function(t){return this.bounds_.contains(t.getPosition())},e.prototype.getMap=function(){return this.map_},e.prototype.updateIcon=function(){var t=this.map_.getZoom(),e=this.markerClusterer_.getMaxZoom();if(e&&t>e)for(var i,r=0;i=this.markers_[r];r++)i.setMap(this.map_);else if(this.markers_.length<this.minClusterSize_)this.clusterIcon_.hide();else{var n=this.markerClusterer_.getStyles().length,s=this.markerClusterer_.getCalculator()(this.markers_,n);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(s),this.clusterIcon_.show()}},i.prototype.triggerClusterClick=function(){var t=this.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"clusterclick",this.cluster_),t.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())},i.prototype.onAdd=function(){if(this.div_=document.createElement("DIV"),this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.innerHTML=this.sums_.text}this.getPanes().overlayMouseTarget.appendChild(this.div_);var e=this;google.maps.event.addDomListener(this.div_,"click",function(){e.triggerClusterClick()})},i.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return"object"==typeof this.iconAnchor_&&2===this.iconAnchor_.length?(e.x-=this.iconAnchor_[0],e.y-=this.iconAnchor_[1]):(e.x-=parseInt(this.width_/2,10),e.y-=parseInt(this.height_/2,10)),e},i.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}},i.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},i.prototype.show=function(){if(this.div_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.style.display=""}this.visible_=!0},i.prototype.remove=function(){this.setMap(null)},i.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)},i.prototype.setSums=function(t){this.sums_=t,this.text_=t.text,this.index_=t.index,this.div_&&(this.div_.innerHTML=t.text),this.useStyle()},i.prototype.useStyle=function(){var t=Math.max(0,this.sums_.index-1);t=Math.min(this.styles_.length-1,t);var e=this.styles_[t];this.url_=e.url,this.height_=e.height,this.width_=e.width,this.textColor_=e.textColor,this.anchor_=e.anchor,this.textSize_=e.textSize,this.backgroundPosition_=e.backgroundPosition,this.iconAnchor_=e.iconAnchor},i.prototype.setCenter=function(t){this.center_=t},i.prototype.createCss=function(t){var e=[];e.push("background-image:url("+this.url_+");");var i=this.backgroundPosition_?this.backgroundPosition_:"0 0";e.push("background-position:"+i+";"),"object"==typeof this.anchor_?("number"==typeof this.anchor_[0]&&this.anchor_[0]>0&&this.anchor_[0]<this.height_?e.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):"number"==typeof this.anchor_[0]&&this.anchor_[0]<0&&-this.anchor_[0]<this.height_?e.push("height:"+this.height_+"px; line-height:"+(this.height_+this.anchor_[0])+"px;"):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),"number"==typeof this.anchor_[1]&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?e.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):e.push("width:"+this.width_+"px; text-align:center;")):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var r=this.textColor_?this.textColor_:"black",n=this.textSize_?this.textSize_:11;return e.push("cursor:pointer; top:"+t.y+"px; left:"+t.x+"px; color:"+r+"; position:absolute; font-size:"+n+"px; font-family:Arial,sans-serif; font-weight:bold"),e.join("")},window.MarkerClusterer=t,t.prototype.addMarker=t.prototype.addMarker,t.prototype.addMarkers=t.prototype.addMarkers,t.prototype.clearMarkers=t.prototype.clearMarkers,t.prototype.fitMapToMarkers=t.prototype.fitMapToMarkers,t.prototype.getCalculator=t.prototype.getCalculator,t.prototype.getGridSize=t.prototype.getGridSize,t.prototype.getExtendedBounds=t.prototype.getExtendedBounds,t.prototype.getMap=t.prototype.getMap,t.prototype.getMarkers=t.prototype.getMarkers,t.prototype.getMaxZoom=t.prototype.getMaxZoom,t.prototype.getStyles=t.prototype.getStyles,t.prototype.getTotalClusters=t.prototype.getTotalClusters,t.prototype.getTotalMarkers=t.prototype.getTotalMarkers,t.prototype.redraw=t.prototype.redraw,t.prototype.removeMarker=t.prototype.removeMarker,t.prototype.removeMarkers=t.prototype.removeMarkers,t.prototype.resetViewport=t.prototype.resetViewport,t.prototype.repaint=t.prototype.repaint,t.prototype.setCalculator=t.prototype.setCalculator,t.prototype.setGridSize=t.prototype.setGridSize,t.prototype.setMaxZoom=t.prototype.setMaxZoom,t.prototype.onAdd=t.prototype.onAdd,t.prototype.draw=t.prototype.draw,e.prototype.getCenter=e.prototype.getCenter,e.prototype.getSize=e.prototype.getSize,e.prototype.getMarkers=e.prototype.getMarkers,i.prototype.onAdd=i.prototype.onAdd,i.prototype.draw=i.prototype.draw,i.prototype.onRemove=i.prototype.onRemove}
vendor: 4,242 bytes, line 2
2,61561:function(t,e,i){var r,n;!function(s){r=[i(87569)],n=function(t){return function(t,e){"use strict";var i=t.document,r=e(t),n=e.Deferred,s=e("html"),o=[],a="aria-hidden",h="lity-"+a,l='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',u={esc:!0,handler:null,handlers:{image:E,inline:F,youtube:x,vimeo:C,googlemaps:D,facebookvideo:k,iframe:A},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>×</button></div></div></div>'},c=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,d=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,p=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,f=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,g=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,v=function(){var t=i.createElement("div"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var r in e)if(void 0!==t.style[r])return e[r];return!1}();function m(t){var e=n();return v&&t.length?(t.one(v,e.resolve),setTimeout(e.resolve,500)):e.resolve(),e.promise()}function y(t,i,r){if(1===arguments.length)return e.extend({},t);if("string"==typeof i){if(void 0===r)return void 0===t[i]?null:t[i];t[i]=r}else e.extend(t,i);return this}function _(t){for(var e,i=decodeURI(t.split("#")[0]).split("&"),r={},n=0,s=i.length;n<s;n++)i[n]&&(r[(e=i[n].split("="))[0]]=e[1]);return r}function S(t,i){return t+(t.indexOf("?")>-1?"&":"?")+e.param(i)}function w(t,e){var i=t.indexOf("#");return-1===i?e:(i>0&&(t=t.substr(i)),e+t)}function b(t){return e('<span class="lity-error"></span>').append(t)}function E(t,i){var r=i.opener()&&i.opener().data("lity-desc")||"Image with no description",s=e('<img src="'+t+'" alt="'+r+'"/>'),o=n(),a=function(){o.reject(b("Failed loading image"))};return s.on("load",function(){if(0===this.naturalWidth)return a();o.resolve(s)}).on("error",a),o.promise()}function F(t,i){var r,n,s;try{r=e(t)}catch(t){return!1}return!!r.length&&(n=e('<i style="display:none !important"></i>'),s=r.hasClass("lity-hide"),i.element().one("lity:remove",function(){n.before(r).remove(),s&&!r.closest(".lity-content").length&&r.addClass("lity-hide")}),r.removeClass("lity-hide").after(n))}function x(t){var i=d.exec(t);return!!i&&A(w(t,S("https://www.youtube"+(i[2]||"")+".com/embed/"+i[4],e.extend({autoplay:1},_(i[5]||"")))))}function C(t){var i=p.exec(t);return!!i&&A(w(t,S("https://player.vimeo.com/video/"+i[3],e.extend({autoplay:1},_(i[4]||"")))))}function k(t){var i=g.exec(t);return!!i&&(0!==t.indexOf("http")&&(t="https:"+t),A(w(t,S("https://www.facebook.com/plugins/video.php?href="+t,e.extend({autoplay:1},_(i[4]||""))))))}function D(t){var e=f.exec(t);return!!e&&A(w(t,S("https://www.google."+e[3]+"/maps?"+e[6],{output:e[6].indexOf("layer=c")>0?"svembed":"embed"})))}function A(t){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+t+'"/></div>'}function T(){return i.documentElement.clientHeight?i.documentElement.clientHeight:Math.round(r.height())}function P(t){var e=N();e&&(27===t.keyCode&&e.options("esc")&&e.close(),9===t.keyCode&&I(t,e))}function I(t,e){var r=e.element().find(l),n=r.index(i.activeElement);t.shiftKey&&n<=0?(r.get(r.length-1).focus(),t.preventDefault()):t.shiftKey||n!==r.length-1||(r.get(0).focus(),t.preventDefault())}function M(){e.each(o,function(t,e){e.resize()})}function R(t){1===o.unshift(t)&&(s.addClass("lity-active"),r.on({resize:M,keydown:P})),e("body > *").not(t.element()).addClass("lity-hidden").each(function(){var t=e(this);void 0===t.data(h)&&t.data(h,t.attr(a)||null)}).attr(a,"true")}function L(t){t.element().attr(a,"true"),1===o.length&&(s.removeClass("lity-active"),r.off({resize:M,key
2down:P})),((o=e.grep(o,function(e){return t!==e})).length?o[0].element():e(".lity-hidden")).removeClass("lity-hidden").each(function(){var t=e(this),i=t.data(h);i?t.attr(a,i):t.removeAttr(a),t.removeData(h)})}function N(){return 0===o.length?null:o[0]}function O(t,i,r,n){var s,o="inline",a=e.extend({},r);return n&&a[n]?(s=a[n](t,i),o=n):(e.each(["inline","iframe"],function(t,e){delete a[e],a[e]=r[e]}),e.each(a,function(e,r){return!r||(!(!r.test||r.test(t,i))||(!1!==(s=r(t,i))?(o=e,!1):void 0))})),{handler:o,content:s||""}}function H(t,r,s,o){var h,l,c,d=this,p=!1,f=!1;function g(t){c=e(t).css("max-height",T()+"px"),l.find(".lity-loader").each(function(){var t=e(this);m(t).always(function(){t.remove()})}),l.removeClass("lity-loading").find(".lity-content").empty().append(c),p=!0,c.trigger("lity:ready",[d])}r=e.extend({},u,r),l=e(r.template),d.element=function(){return l},d.opener=function(){return s},d.options=e.proxy(y,d,r),d.handlers=e.proxy(y,d,r.handlers),d.resize=function(){p&&!f&&c.css("max-height",T()+"px").trigger("lity:resize",[d])},d.close=function(){if(p&&!f){f=!0,L(d);var t=n();if(o&&(i.activeElement===l[0]||e.contains(l[0],i.activeElement)))try{o.focus()}catch(t){}return c.trigger("lity:close",[d]),l.removeClass("lity-opened").addClass("lity-closed"),m(c.add(l)).always(function(){c.trigger("lity:remove",[d]),l.remove(),l=void 0,t.resolve()}),t.promise()}},h=O(t,d,r.handlers,r.handler),l.attr(a,"false").addClass("lity-loading lity-opened lity-"+h.handler).appendTo("body").focus().on("click","[data-lity-close]",function(t){e(t.target).is("[data-lity-close]")&&d.close()}).trigger("lity:open",[d]),R(d),e.when(h.content).always(g)}function B(t,r,n){t.preventDefault?(t.preventDefault(),t=(n=e(this)).data("lity-target")||n.attr("href")||n.attr("src")):n=e(n);var s=new H(t,e.extend({},n.data("lity-options")||n.data("lity"),r),n,i.activeElement);if(!t.preventDefault)return s}return E.test=function(t){return c.test(t)},B.version="2.4.1",B.options=e.proxy(y,B,u),B.handlers=e.proxy(y,B,u.handlers),B.current=N,e(i).on("click.lity","[data-lity]",B),B}(s,t)}.apply(e,r),void 0===n||(t.exports=n)}("undefined"!=typeof window?window:this)},8042:function(t){var e;e=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=22)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n={debug:function(){},info:function(){},warn:function(){},error:function(){}},s=void 0,o=void 0;(e.Log=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.reset=function(){o=3,s=n},t.debug=function(){if(o>=4){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];s.debug.apply(s,Array.from(e))}},t.info=function(){if(o>=3){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];s.info.apply(s,Array.from(e))}},t.warn=function(){if(o>=2){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];s.warn.apply(s,Array.from(e))}},t.error=function(){if(o>=1){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];s.error.apply(s,Array.from(e))}},r(t,null,[{key:"NONE",get:function(){return 0}},{key:"ERROR",get:function(){return 1}},{key:"WARN",get:function(){return 2}},{key:"INFO",get:function(){return 3}},{key:"DEBUG",get:function(){return 4}},{key:"level",get:function(){return o}
vendor: 11,902 bytes, line 2
2,set:function(t){if(!(0<=t&&t<=4))throw new Error("Invalid log level");o=t}},{key:"logger",get:function(){return s},set:function(t){if(!t.debug&&t.info&&(t.debug=t.info),!(t.debug&&t.info&&t.warn&&t.error))throw new Error("Invalid logger");s=t}}]),t}()).reset()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n={setInterval:function(t){function e(e,i){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t,e){return setInterval(t,e)}),clearInterval:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return clearInterval(t)})},s=!1,o=null;e.Global=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t._testing=function(){s=!0},t.setXMLHttpRequest=function(t){o=t},r(t,null,[{key:"location",get:function(){if(!s)return location}},{key:"localStorage",get:function(){if(!s&&"undefined"!=typeof window)return localStorage}},{key:"sessionStorage",get:function(){if(!s&&"undefined"!=typeof window)return sessionStorage}},{key:"XMLHttpRequest",get:function(){if(!s&&"undefined"!=typeof window)return o||XMLHttpRequest}},{key:"timer",get:function(){if(!s)return n}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataService=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=i(7),o=".well-known/openid-configuration";e.MetadataService=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.JsonService;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw n.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=e,this._jsonService=new i(["application/jwk-set+json"])}return t.prototype.resetSigningKeys=function(){this._settings=this._settings||{},this._settings.signingKeys=void 0},t.prototype.getMetadata=function(){var t=this;return this._settings.metadata?(n.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(n.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then(function(e){n.Log.debug("MetadataService.getMetadata: json received");var i=t._settings.metadataSeed||{};return t._settings.metadata=Object.assign({},i,e),t._settings.metadata})):(n.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},t.prototype.getIssuer=function(){return this._getMetadataProperty("issuer")},t.prototype.getAuthorizationEndpoint=function(){return this._getMetadataProperty("authorization_endpoint")},t.prototype.getUserInfoEndpoint=function(){return this._getMetadataProperty("userinfo_endpoint")},t.prototype.getTokenEndpoint=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._getMetadataProperty("token_endpoint",t)},t.prototype.getCheckSessionIframe=function(){return this._getMetadataProperty("check_session_iframe",!0)},t.prototype.getEndSessionEndpoint=function(){return this._getMetadataProperty("end_session_endpoint",!0)},t.prototype.getRevocationEndpoint=function(){return this._getMetadataProperty("revocation_endpoint",!0)},t.prototype.getKeysEndpoint=function(){return this._getMetadataProperty("jwks_uri",!0)},t.prototype._getMetadataProperty=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n.Log.debug("MetadataService.getMetadataProperty for: "+t),this.getMetadata().then(function(i){if(n.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===i[t]){if(!0===e)return void n.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+t);throw n.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+t),new Error("Metadata does not contain property "+t)}return i[t]})},t.prototype.getSigningKeys=function(){var t=this;return this._settings.signingKeys?(n.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then(function(e){return n.Log.debug("MetadataService.getSigningKeys: jwks_uri received",e),t._jsonService.getJson(e).then(function(e){if(n.Log.debug("MetadataService.getSigningKeys: key set received",e),!e.keys)throw n.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return t._settings.signingKeys=e.keys,t._settings.signingKeys})})},r(t,[{key:"metadataUrl",get:function(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(o)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=o))),this._metadataUrl}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlUtility=void 0;var r=i(0),n=i(1);e.UrlUtility=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.addQueryParam=function(t,e,i){return t.indexOf("?")<0&&(t+="?"),"?"!==t[t.length-1]&&(t+="&"),t+=encodeURIComponent(e),(t+="=")+encodeURIComponent(i)},t.parseUrlFragment=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.Global;"string"!=typeof t&&(t=i.location.href);var s=t.lastIndexOf(e);s>=0&&(t=t.substr(s+1)),"?"===e&&(s=t.indexOf("#"))>=0&&(t=t.substr(0,s));for(var o,a={},h=/([^&=]+)=([^&]*)/g,l=0;o=h.exec(t);)if(a[decodeURIComponent(o[1])]=decodeURIComponent(o[2].replace(/\+/g," ")),l++>50)return r.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",t),{error:"Response exceeded expected number of parameters"};for(var u in a)return a;return{}},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JoseUtil=void 0;var r=i(26),n=function(t){return t&&t.__esModule?t:{default:t}}(i(33));e.JoseUtil=(0,n.default)({jws:r.jws,KeyUtil:r.KeyUtil,X509:r.X509,crypto:r.crypto,hextob64u:r.hextob64u,b64tohex:r.b64tohex,AllowedSigningAlgs:r.AllowedSigningAlgs})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OidcClientSettings=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),s=i(0),o=i(23),a=i(6),h=i(24),l=i(2),u=".well-known/openid-configuration";e.OidcClientSettings=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.authority,n=e.metadataUrl,s=e.metadata,u=e.signingKeys,c=e.metadataSeed,d=e.client_id,p=e.client_secret,f=e.response_type,g=void 0===f?"id_token":f,v=e.scope,m=void 0===v?"openid":v,y=e.redirect_uri,_=e.post_logout_redirect_uri,S=e.client_authentication,w=void 0===S?"client_secret_post":S,b=e.prompt,E=e.display,F=e.max_age,x=e.ui_locales,C=e.acr_values,k=e.resource,D=e.response_mode,A=e.filterProtocolClaims,T=void 0===A||A,P=e.loadUserInfo,I=void 0===P||P,M=e.staleStateAge,R=void 0===M?900:M,L=e.clockSkew,N=void 0===L?300:L,O=e.clockService,H=void 0===O?new o.ClockService:O,B=e.userInfoJwtIssuer,j=void 0===B?"OP":B,U=e.mergeClaims,V=void 0!==U&&U,K=e.stateStore,z=void 0===K?new a.WebStorageStateStore:K,q=e.ResponseValidatorCtor,W=void 0===q?h.ResponseValidator:q,$=e.MetadataServiceCtor,J=void 0===$?l.MetadataService:$,Y=e.extraQueryParams,G=void 0===Y?{}:Y,X=e.extraTokenParams,Z=void 0===X?{}:X;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._authority=i,this._metadataUrl=n,this._metadata=s,this._metadataSeed=c,this._signingKeys=u,this._client_id=d,this._client_secret=p,this._response_type=g,this._scope=m,this._redirect_uri=y,this._post_logout_redirect_uri=_,this._client_authentication=w,this._prompt=b,this._display=E,this._max_age=F,this._ui_locales=x,this._acr_values=C,this._resource=k,this._response_mode=D,this._filterProtocolClaims=!!T,this._loadUserInfo=!!I,this._staleStateAge=R,this._clockSkew=N,this._clockService=H,this._userInfoJwtIssuer=j,this._mergeClaims=!!V,this._stateStore=z,this._validator=new W(this),this._metadataService=new J(this),this._extraQueryParams="object"===(void 0===G?"undefined":r(G))?G:{},this._extraTokenParams="object"===(void 0===Z?"undefined":r(Z))?Z:{}}return t.prototype.getEpochTime=function(){return this._clockService.getEpochTime()},n(t,[{key:"client_id",get:function(){return this._client_id},set:function(t){if(this._client_id)throw s.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=t}},{key:"client_secret",get:function(){return this._client_secret}},{key:"response_type",get:function(){return this._response_type}},{key:"scope",get:function(){return this._scope}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function(){return this._post_logout_redirect_uri}},{key:"client_authentication",get:function(){return this._client_authentication}},{key:"prompt",get:function(){return this._prompt}},{key:"display",get:function(){return this._display}},{key:"max_age",get:function(){return this._max_age}},{key:"ui_locales",get:function(){return this._ui_locales}},{key:"acr_values",get:function(){return this._acr_values}},{key:"resource",get:function(){return this._resource}},{key:"response_mode",get:function(){return this._response_mode}},{key:"authority",get:function(){return this._authority},set:function(t){if(this._authority)throw s.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=t}},{key:"metadataUrl",get:function(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(u)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=u)),this._metadataUrl}},{key:"metadata",get:function(){return this._metadata},set:function(t){this._metadata=t}},{key:"metadataSeed",get:function(){return this._metadataSeed},set:function(t){this._metadataSeed=t}},{key:"signingKeys",get:function(){return this._signingKeys},set:function(t){this._signingKeys=t}},{key:"filterProtocolClaims",get:function(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function(){return this._loadUserInfo}},{key:"staleStateAge",get:function(){return this._staleStateAge}},{key:"clockSkew",get:function(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function(){return this._userInfoJwtIssuer}},{key:"mergeClaims",get:function(){return this._mergeClaims}},{key:"stateStore",get:function(){return this._stateStore}}
vendor: 4,870 bytes, line 2
2,{key:"validator",get:function(){return this._validator}},{key:"metadataService",get:function(){return this._metadataService}},{key:"extraQueryParams",get:function(){return this._extraQueryParams},set:function(t){"object"===(void 0===t?"undefined":r(t))?this._extraQueryParams=t:this._extraQueryParams={}}},{key:"extraTokenParams",get:function(){return this._extraTokenParams},set:function(t){"object"===(void 0===t?"undefined":r(t))?this._extraTokenParams=t:this._extraTokenParams={}}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebStorageStateStore=void 0;var r=i(0),n=i(1);e.WebStorageStateStore=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.prefix,r=void 0===i?"oidc.":i,s=e.store,o=void 0===s?n.Global.localStorage:s;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._store=o,this._prefix=r}return t.prototype.set=function(t,e){return r.Log.debug("WebStorageStateStore.set",t),t=this._prefix+t,this._store.setItem(t,e),Promise.resolve()},t.prototype.get=function(t){r.Log.debug("WebStorageStateStore.get",t),t=this._prefix+t;var e=this._store.getItem(t);return Promise.resolve(e)},t.prototype.remove=function(t){r.Log.debug("WebStorageStateStore.remove",t),t=this._prefix+t;var e=this._store.getItem(t);return this._store.removeItem(t),Promise.resolve(e)},t.prototype.getAllKeys=function(){r.Log.debug("WebStorageStateStore.getAllKeys");for(var t=[],e=0;e<this._store.length;e++){var i=this._store.key(e);0===i.indexOf(this._prefix)&&t.push(i.substr(this._prefix.length))}return Promise.resolve(t)},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JsonService=void 0;var r=i(0),n=i(1);e.JsonService=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.Global.XMLHttpRequest,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),e&&Array.isArray(e)?this._contentTypes=e.slice():this._contentTypes=[],this._contentTypes.push("application/json"),r&&this._contentTypes.push("application/jwt"),this._XMLHttpRequest=i,this._jwtHandler=r}return t.prototype.getJson=function(t,e){var i=this;if(!t)throw r.Log.error("JsonService.getJson: No url passed"),new Error("url");return r.Log.debug("JsonService.getJson, url: ",t),new Promise(function(n,s){var o=new i._XMLHttpRequest;o.open("GET",t);var a=i._contentTypes,h=i._jwtHandler;o.onload=function(){if(r.Log.debug("JsonService.getJson: HTTP response received, status",o.status),200===o.status){var e=o.getResponseHeader("Content-Type");if(e){var i=a.find(function(t){if(e.startsWith(t))return!0});if("application/jwt"==i)return void h(o).then(n,s);if(i)try{return void n(JSON.parse(o.responseText))}catch(t){return r.Log.error("JsonService.getJson: Error parsing JSON response",t.message),void s(t)}}s(Error("Invalid response Content-Type: "+e+", from URL: "+t))}else s(Error(o.statusText+" ("+o.status+")"))},o.onerror=function(){r.Log.error("JsonService.getJson: network error"),s(Error("Network Error"))},e&&(r.Log.debug("JsonService.getJson: token passed, setting Authorization header"),o.setRequestHeader("Authorization","Bearer "+e)),o.send()})},t.prototype.postForm=function(t,e,i){var n=this;if(!t)throw r.Log.error("JsonService.postForm: No url passed"),new Error("url");return r.Log.debug("JsonService.postForm, url: ",t),new Promise(function(s,o){var a=new n._XMLHttpRequest;a.open("POST",t);var h=n._contentTypes;a.onload=function(){if(r.Log.debug("JsonService.postForm: HTTP response received, status",a.status),200!==a.status){if(400===a.status&&(i=a.getResponseHeader("Content-Type"))&&h.find(function(t){if(i.startsWith(t))return!0}))try{var e=JSON.parse(a.responseText);if(e&&e.error)return r.Log.error("JsonService.postForm: Error from server: ",e.error),void o(new Error(e.error))}catch(t){return r.Log.error("JsonService.postForm: Error parsing JSON response",t.message),void o(t)}o(Error(a.statusText+" ("+a.status+")"))}else{var i;if((i=a.getResponseHeader("Content-Type"))&&h.find(function(t){if(i.startsWith(t))return!0}))try{return void s(JSON.parse(a.responseText))}catch(t){return r.Log.error("JsonService.postForm: Error parsing JSON response",t.message),void o(t)}o(Error("Invalid response Content-Type: "+i+", from URL: "+t))}},a.onerror=function(){r.Log.error("JsonService.postForm: network error"),o(Error("Network Error"))};var l="";for(var u in e){var c=e[u];c&&(l.length>0&&(l+="&"),l+=encodeURIComponent(u),l+="=",l+=encodeURIComponent(c))}a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),void 0!==i&&a.setRequestHeader("Authorization","Basic "+btoa(i)),a.send(l)})},t}()}
vendor: 4,431 bytes, line 2
2,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninRequest=void 0;var r=i(0),n=i(3),s=i(13);e.SigninRequest=function(){function t(e){var i=e.url,o=e.client_id,a=e.redirect_uri,h=e.response_type,l=e.scope,u=e.authority,c=e.data,d=e.prompt,p=e.display,f=e.max_age,g=e.ui_locales,v=e.id_token_hint,m=e.login_hint,y=e.acr_values,_=e.resource,S=e.response_mode,w=e.request,b=e.request_uri,E=e.extraQueryParams,F=e.request_type,x=e.client_secret,C=e.extraTokenParams,k=e.skipUserInfo;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!i)throw r.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!o)throw r.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!a)throw r.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!h)throw r.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!l)throw r.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!u)throw r.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var D=t.isOidc(h),A=t.isCode(h);S||(S=t.isCode(h)?"query":null),this.state=new s.SigninState({nonce:D,data:c,client_id:o,authority:u,redirect_uri:a,code_verifier:A,request_type:F,response_mode:S,client_secret:x,scope:l,extraTokenParams:C,skipUserInfo:k}),i=n.UrlUtility.addQueryParam(i,"client_id",o),i=n.UrlUtility.addQueryParam(i,"redirect_uri",a),i=n.UrlUtility.addQueryParam(i,"response_type",h),i=n.UrlUtility.addQueryParam(i,"scope",l),i=n.UrlUtility.addQueryParam(i,"state",this.state.id),D&&(i=n.UrlUtility.addQueryParam(i,"nonce",this.state.nonce)),A&&(i=n.UrlUtility.addQueryParam(i,"code_challenge",this.state.code_challenge),i=n.UrlUtility.addQueryParam(i,"code_challenge_method","S256"));var T={prompt:d,display:p,max_age:f,ui_locales:g,id_token_hint:v,login_hint:m,acr_values:y,resource:_,request:w,request_uri:b,response_mode:S};for(var P in T)T[P]&&(i=n.UrlUtility.addQueryParam(i,P,T[P]));for(var I in E)i=n.UrlUtility.addQueryParam(i,I,E[I]);this.url=i}return t.isOidc=function(t){return!!t.split(/\s+/g).filter(function(t){return"id_token"===t})[0]},t.isOAuth=function(t){return!!t.split(/\s+/g).filter(function(t){return"token"===t})[0]},t.isCode=function(t){return!!t.split(/\s+/g).filter(function(t){return"code"===t})[0]},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.State=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=function(t){return t&&t.__esModule?t:{default:t}}(i(14));e.State=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.id,r=e.data,n=e.created,o=e.request_type;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._id=i||(0,s.default)(),this._data=r,this._created="number"==typeof n&&n>0?n:parseInt(Date.now()/1e3),this._request_type=o}return t.prototype.toStorageString=function(){return n.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},t.fromStorageString=function(e){return n.Log.debug("State.fromStorageString"),new t(JSON.parse(e))},t.clearStaleState=function(e,i){var r=Date.now()/1e3-i;return e.getAllKeys().then(function(i){n.Log.debug("State.clearStaleState: got keys",i);for(var s=[],o=function(o){var a=i[o];h=e.get(a).then(function(i){var s=!1;if(i)try{var o=t.fromStorageString(i);n.Log.debug("State.clearStaleState: got item from key: ",a,o.created),o.created<=r&&(s=!0)}catch(t){n.Log.error("State.clearStaleState: Error parsing state for key",a,t.message),s=!0}else n.Log.debug("State.clearStaleState: no item in storage for key: ",a),s=!0;if(s)return n.Log.debug("State.clearStaleState: removed item for key: ",a),e.remove(a)}),s.push(h)},a=0;a<i.length;a++){var h;o(a)}return n.Log.debug("State.clearStaleState: waiting on promise count:",s.length),Promise.all(s)})},r(t,[{key:"id",get:function(){return this._id}},{key:"data",get:function(){return this._data}},{key:"created",get:function(){return this._created}},{key:"request_type",get:function(){return this._request_type}}]),t}()}
2,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OidcClient=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=i(5),o=i(12),a=i(8),h=i(34),l=i(35),u=i(36),c=i(13),d=i(9);e.OidcClient=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),e instanceof s.OidcClientSettings?this._settings=e:this._settings=new s.OidcClientSettings(e)}return t.prototype.createSigninRequest=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.response_type,r=e.scope,s=e.redirect_uri,o=e.data,h=e.state,l=e.prompt,u=e.display,c=e.max_age,d=e.ui_locales,p=e.id_token_hint,f=e.login_hint,g=e.acr_values,v=e.resource,m=e.request,y=e.request_uri,_=e.response_mode,S=e.extraQueryParams,w=e.extraTokenParams,b=e.request_type,E=e.skipUserInfo,F=arguments[1];n.Log.debug("OidcClient.createSigninRequest");var x=this._settings.client_id;i=i||this._settings.response_type,r=r||this._settings.scope,s=s||this._settings.redirect_uri,l=l||this._settings.prompt,u=u||this._settings.display,c=c||this._settings.max_age,d=d||this._settings.ui_locales,g=g||this._settings.acr_values,v=v||this._settings.resource,_=_||this._settings.response_mode,S=S||this._settings.extraQueryParams,w=w||this._settings.extraTokenParams;var C=this._settings.authority;return a.SigninRequest.isCode(i)&&"code"!==i?Promise.reject(new Error("OpenID Connect hybrid flow is not supported")):this._metadataService.getAuthorizationEndpoint().then(function(e){n.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",e);var k=new a.SigninRequest({url:e,client_id:x,redirect_uri:s,response_type:i,scope:r,data:o||h,authority:C,prompt:l,display:u,max_age:c,ui_locales:d,id_token_hint:p,login_hint:f,acr_values:g,resource:v,request:m,request_uri:y,extraQueryParams:S,extraTokenParams:w,request_type:b,response_mode:_,client_secret:t._settings.client_secret,skipUserInfo:E}),D=k.state;return(F=F||t._stateStore).set(D.id,D.toStorageString()).then(function(){return k})})},t.prototype.readSigninResponseState=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n.Log.debug("OidcClient.readSigninResponseState");var r="query"===this._settings.response_mode||!this._settings.response_mode&&a.SigninRequest.isCode(this._settings.response_type)?"?":"#",s=new h.SigninResponse(t,r);return s.state?(e=e||this._stateStore,(i?e.remove.bind(e):e.get.bind(e))(s.state).then(function(t){if(!t)throw n.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:c.SigninState.fromStorageString(t),response:s}})):(n.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response")))},t.prototype.processSigninResponse=function(t,e){var i=this;return n.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(t,e,!0).then(function(t){var e=t.state,r=t.response;return n.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),i._validator.validateSigninResponse(e,r)})},t.prototype.createSignoutRequest=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.id_token_hint,r=e.data,s=e.state,o=e.post_logout_redirect_uri,a=e.extraQueryParams,h=e.request_type,u=arguments[1];return n.Log.debug("OidcClient.createSignoutRequest"),o=o||this._settings.post_logout_redirect_uri,a=a||this._settings.extraQueryParams,this._metadataService.getEndSessionEndpoint().then(function(e){if(!e)throw n.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");n.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",e);
vendor: 5,197 bytes, line 2
2var c=new l.SignoutRequest({url:e,id_token_hint:i,post_logout_redirect_uri:o,data:r||s,extraQueryParams:a,request_type:h}),d=c.state;return d&&(n.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(u=u||t._stateStore).set(d.id,d.toStorageString())),c})},t.prototype.readSignoutResponseState=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n.Log.debug("OidcClient.readSignoutResponseState");var r=new u.SignoutResponse(t);if(!r.state)return n.Log.debug("OidcClient.readSignoutResponseState: No state in response"),r.error?(n.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",r.error),Promise.reject(new o.ErrorResponse(r))):Promise.resolve({state:void 0,response:r});var s=r.state;return e=e||this._stateStore,(i?e.remove.bind(e):e.get.bind(e))(s).then(function(t){if(!t)throw n.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:d.State.fromStorageString(t),response:r}})},t.prototype.processSignoutResponse=function(t,e){var i=this;return n.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(t,e,!0).then(function(t){var e=t.state,r=t.response;return e?(n.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),i._validator.validateSignoutResponse(e,r)):(n.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),r)})},t.prototype.clearStaleState=function(t){return n.Log.debug("OidcClient.clearStaleState"),t=t||this._stateStore,d.State.clearStaleState(t,this.settings.staleStateAge)},r(t,[{key:"_stateStore",get:function(){return this.settings.stateStore}},{key:"_validator",get:function(){return this.settings.validator}},{key:"_metadataService",get:function(){return this.settings.metadataService}},{key:"settings",get:function(){return this._settings}},{key:"metadataService",get:function(){return this._metadataService}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenClient=void 0;var r=i(7),n=i(2),s=i(0);e.TokenClient=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.JsonService,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.MetadataService;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw s.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=e,this._jsonService=new i,this._metadataService=new o(this._settings)}return t.prototype.exchangeCode=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).grant_type=e.grant_type||"authorization_code",e.client_id=e.client_id||this._settings.client_id,e.client_secret=e.client_secret||this._settings.client_secret,e.redirect_uri=e.redirect_uri||this._settings.redirect_uri;var i=void 0,r=e._client_authentication||this._settings._client_authentication;return delete e._client_authentication,e.code?e.redirect_uri?e.code_verifier?e.client_id?e.client_secret||"client_secret_basic"!=r?("client_secret_basic"==r&&(i=e.client_id+":"+e.client_secret,delete e.client_id,delete e.client_secret),this._metadataService.getTokenEndpoint(!1).then(function(r){return s.Log.debug("TokenClient.exchangeCode: Received token endpoint"),t._jsonService.postForm(r,e,i).then(function(t){return s.Log.debug("TokenClient.exchangeCode: response received"),t})})):(s.Log.error("TokenClient.exchangeCode: No client_secret passed"),Promise.reject(new Error("A client_secret is required"))):(s.Log.error("TokenClient.exchangeCode: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(s.Log.error("TokenClient.exchangeCode: No code_verifier passed"),Promise.reject(new Error("A code_verifier is required"))):(s.Log.error("TokenClient.exchangeCode: No redirect_uri passed"),Promise.reject(new Error("A redirect_uri is required"))):(s.Log.error("TokenClient.exchangeCode: No code passed"),Promise.reject(new Error("A code is required")))},t.prototype.exchangeRefreshToken=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).grant_type=e.grant_type||"refresh_token",e.client_id=e.client_id||this._settings.client_id,e.client_secret=e.client_secret||this._settings.client_secret;var i=void 0,r=e._client_authentication||this._settings._client_authentication;return delete e._client_authentication,e.refresh_token?e.client_id?("client_secret_basic"==r&&(i=e.client_id+":"+e.client_secret,delete e.client_id,delete e.client_secret),this._metadataService.getTokenEndpoint(!1).then(function(r){return s.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),t._jsonService.postForm(r,e,i).then(function(t){return s.Log.debug("TokenClient.exchangeRefreshToken: response received"),t})})):(s.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(s.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"),Promise.reject(new Error("A refresh_token is required")))},t}()}
2,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorResponse=void 0;var r=i(0);e.ErrorResponse=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.error,s=i.error_description,o=i.error_uri,a=i.state,h=i.session_state;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!n)throw r.Log.error("No error passed to ErrorResponse"),new Error("error");var l=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,s||n));return l.name="ErrorResponse",l.error=n,l.error_description=s,l.error_uri=o,l.state=a,l.session_state=h,l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(Error)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninState=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=i(9),o=i(4),a=function(t){return t&&t.__esModule?t:{default:t}}(i(14));e.SigninState=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.nonce,n=i.authority,s=i.client_id,h=i.redirect_uri,l=i.code_verifier,u=i.response_mode,c=i.client_secret,d=i.scope,p=i.extraTokenParams,f=i.skipUserInfo;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var g=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,arguments[0]));if(!0===r?g._nonce=(0,a.default)():r&&(g._nonce=r),!0===l?g._code_verifier=(0,a.default)()+(0,a.default)()+(0,a.default)():l&&(g._code_verifier=l),g.code_verifier){var v=o.JoseUtil.hashString(g.code_verifier,"SHA256");g._code_challenge=o.JoseUtil.hexToBase64Url(v)}return g._redirect_uri=h,g._authority=n,g._client_id=s,g._response_mode=u,g._client_secret=c,g._scope=d,g._extraTokenParams=p,g._skipUserInfo=f,g}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.toStorageString=function(){return n.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},e.fromStorageString=function(t){return n.Log.debug("SigninState.fromStorageString"),new e(JSON.parse(t))},r(e,[{key:"nonce",get:function(){return this._nonce}},{key:"authority",get:function(){return this._authority}},{key:"client_id",get:function(){return this._client_id}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"code_verifier",get:function(){return this._code_verifier}},{key:"code_challenge",get:function(){return this._code_challenge}},{key:"response_mode",get:function(){return this._response_mode}},{key:"client_secret",get:function(){return this._client_secret}},{key:"scope",get:function(){return this._scope}},{key:"extraTokenParams",get:function(){return this._extraTokenParams}},{key:"skipUserInfo",get:function(){return this._skipUserInfo}}]),e}(s.State)}
2,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return("undefined"!=r&&null!==r&&void 0!==r.getRandomValues?n:s)().replace(/-/g,"")};var r="undefined"!=typeof window?window.crypto||window.msCrypto:null;function n(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(t){return(t^r.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}function s(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(t){return(t^16*Math.random()>>t/4).toString(16)})}t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.User=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0);e.User=function(){function t(e){var i=e.id_token,r=e.session_state,n=e.access_token,s=e.refresh_token,o=e.token_type,a=e.scope,h=e.profile,l=e.expires_at,u=e.state;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id_token=i,this.session_state=r,this.access_token=n,this.refresh_token=s,this.token_type=o,this.scope=a,this.profile=h,this.expires_at=l,this.state=u}return t.prototype.toStorageString=function(){return n.Log.debug("User.toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})},t.fromStorageString=function(e){return n.Log.debug("User.fromStorageString"),new t(JSON.parse(e))},r(t,[{key:"expires_in",get:function(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}},set:function(t){var e=parseInt(t);if("number"==typeof e&&e>0){var i=parseInt(Date.now()/1e3);this.expires_at=i+e}}},{key:"expired",get:function(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessTokenEvents=void 0;var r=i(0),n=i(46);e.AccessTokenEvents=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.accessTokenExpiringNotificationTime,r=void 0===i?60:i,s=e.accessTokenExpiringTimer,o=void 0===s?new n.Timer("Access token expiring"):s,a=e.accessTokenExpiredTimer,h=void 0===a?new n.Timer("Access token expired"):a;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._accessTokenExpiringNotificationTime=r,this._accessTokenExpiring=o,this._accessTokenExpired=h}return t.prototype.load=function(t){if(t.access_token&&void 0!==t.expires_in){var e=t.expires_in;if(r.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",e),e>0){var i=e-this._accessTokenExpiringNotificationTime;i<=0&&(i=1),r.Log.debug("AccessTokenEvents.load: registering expiring timer in:",i),this._accessTokenExpiring.init(i)}else r.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var n=e+1;r.Log.debug("AccessTokenEvents.load: registering expired timer in:",n),this._accessTokenExpired.init(n)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},t.prototype.unload=function(){r.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},t.prototype.addAccessTokenExpiring=function(t){this._accessTokenExpiring.addHandler(t)},t.prototype.removeAccessTokenExpiring=function(t){this._accessTokenExpiring.removeHandler(t)},t.prototype.addAccessTokenExpired=function(t){this._accessTokenExpired.addHandler(t)},t.prototype.removeAccessTokenExpired=function(t){this._accessTokenExpired.removeHandler(t)},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Event=void 0;var r=i(0);e.Event=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._name=e,this._callbacks=[]}return t.prototype.addHandler=function(t){this._callbacks.push(t)},t.prototype.removeHandler=function(t){var e=this._callbacks.findIndex(function(e){return e===t});e>=0&&this._callbacks.splice(e,1)},t.prototype.raise=function(){r.Log.debug("Event: Raising event: "+this._name);for(var t=0;t<this._callbacks.length;t++){var e;(e=this._callbacks)[t].apply(e,arguments)}},t}()}
2,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionMonitor=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=i(19),o=i(1);e.SessionMonitor=function(){function t(e){var i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.CheckSessionIFrame,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.Global.timer;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw n.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=e,this._CheckSessionIFrameCtor=r,this._timer=a,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),Promise.resolve(this._userManager.getUser().then(function(t){t?i._start(t):i._settings.monitorAnonymousSession&&i._userManager.querySessionStatus().then(function(t){var e={session_state:t.session_state};t.sub&&t.sid&&(e.profile={sub:t.sub,sid:t.sid}),i._start(e)}).catch(function(t){n.Log.error("SessionMonitor ctor: error from querySessionStatus:",t.message)})}).catch(function(t){n.Log.error("SessionMonitor ctor: error from getUser:",t.message)}))}return t.prototype._start=function(t){var e=this,i=t.session_state;i&&(t.profile?(this._sub=t.profile.sub,this._sid=t.profile.sid,n.Log.debug("SessionMonitor._start: session_state:",i,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,n.Log.debug("SessionMonitor._start: session_state:",i,", anonymous user")),this._checkSessionIFrame?this._checkSessionIFrame.start(i):this._metadataService.getCheckSessionIframe().then(function(t){if(t){n.Log.debug("SessionMonitor._start: Initializing check session iframe");var r=e._client_id,s=e._checkSessionInterval,o=e._stopCheckSessionOnError;e._checkSessionIFrame=new e._CheckSessionIFrameCtor(e._callback.bind(e),r,t,s,o),e._checkSessionIFrame.load().then(function(){e._checkSessionIFrame.start(i)})}else n.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")}).catch(function(t){n.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",t.message)}))},t.prototype._stop=function(){var t=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(n.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var e=this._timer.setInterval(function(){t._timer.clearInterval(e),t._userManager.querySessionStatus().then(function(e){var i={session_state:e.session_state};e.sub&&e.sid&&(i.profile={sub:e.sub,sid:e.sid}),t._start(i)}).catch(function(t){n.Log.error("SessionMonitor: error from querySessionStatus:",t.message)})},1e3)},t.prototype._callback=function(){var t=this;this._userManager.querySessionStatus().then(function(e){var i=!0;e?e.sub===t._sub?(i=!1,t._checkSessionIFrame.start(e.session_state),e.sid===t._sid?n.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",e.session_state):(n.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",e.session_state),t._userManager.events._raiseUserSessionChanged())):n.Log.debug("SessionMonitor._callback: Different subject signed into OP:",e.sub):n.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),i&&(t._sub?(n.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),t._userManager.events._raiseUserSignedOut()):(n.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),t._userManager.events._raiseUserSignedIn()))}).catch(function(e){t._sub&&(n.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",e.message),t._userManager.events._raiseUserSignedOut())})},r(t,[{key:"_settings",get:function(){return this._userManager.settings}},{key:"_metadataService",get:function(){return this._userManager.metadataService}},{key:"_client_id",get:function(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function(){return this._settings.stopCheckSessionOnError}}]),t}()}
vendor: 4,191 bytes, line 2
2,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckSessionIFrame=void 0;var r=i(0);e.CheckSessionIFrame=function(){function t(e,i,r,n){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._callback=e,this._client_id=i,this._url=r,this._interval=n||2e3,this._stopOnError=s;var o=r.indexOf("/",r.indexOf("//")+2);this._frame_origin=r.substr(0,o),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.width=0,this._frame.height=0,this._frame.src=r}return t.prototype.load=function(){var t=this;return new Promise(function(e){t._frame.onload=function(){e()},window.document.body.appendChild(t._frame),t._boundMessageEvent=t._message.bind(t),window.addEventListener("message",t._boundMessageEvent,!1)})},t.prototype._message=function(t){t.origin===this._frame_origin&&t.source===this._frame.contentWindow&&("error"===t.data?(r.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===t.data?(r.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):r.Log.debug("CheckSessionIFrame: "+t.data+" message from check session op iframe"))},t.prototype.start=function(t){var e=this;if(this._session_state!==t){r.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=t;var i=function(){e._frame.contentWindow.postMessage(e._client_id+" "+e._session_state,e._frame_origin)};i(),this._timer=window.setInterval(i,this._interval)}},t.prototype.stop=function(){this._session_state=null,this._timer&&(r.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenRevocationClient=void 0;var r=i(0),n=i(2),s=i(1);e.TokenRevocationClient=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Global.XMLHttpRequest,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.MetadataService;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw r.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=e,this._XMLHttpRequestCtor=i,this._metadataService=new o(this._settings)}return t.prototype.revoke=function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"access_token";if(!t)throw r.Log.error("TokenRevocationClient.revoke: No token provided"),new Error("No token provided.");if("access_token"!==n&&"refresh_token"!=n)throw r.Log.error("TokenRevocationClient.revoke: Invalid token type"),new Error("Invalid token type.");return this._metadataService.getRevocationEndpoint().then(function(s){if(s){r.Log.debug("TokenRevocationClient.revoke: Revoking "+n);var o=i._settings.client_id,a=i._settings.client_secret;return i._revoke(s,o,a,t,n)}if(e)throw r.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")})},t.prototype._revoke=function(t,e,i,n,s){var o=this;return new Promise(function(a,h){var l=new o._XMLHttpRequestCtor;l.open("POST",t),l.onload=function(){r.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",l.status),200===l.status?a():h(Error(l.statusText+" ("+l.status+")"))},l.onerror=function(){r.Log.debug("TokenRevocationClient.revoke: Network Error."),h("Network Error")};var u="client_id="+encodeURIComponent(e);i&&(u+="&client_secret="+encodeURIComponent(i)),u+="&token_type_hint="+encodeURIComponent(s),u+="&token="+encodeURIComponent(n),l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.send(u)})},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaPopupWindow=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}
vendor: 5,739 bytes, line 2
2return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0);e.CordovaPopupWindow=function(){function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._promise=new Promise(function(t,e){i._resolve=t,i._reject=e}),this.features=e.popupWindowFeatures||"location=no,toolbar=no,zoom=no",this.target=e.popupWindowTarget||"_blank",this.redirect_uri=e.startUrl,n.Log.debug("CordovaPopupWindow.ctor: redirect_uri: "+this.redirect_uri)}return t.prototype._isInAppBrowserInstalled=function(t){return["cordova-plugin-inappbrowser","cordova-plugin-inappbrowser.inappbrowser","org.apache.cordova.inappbrowser"].some(function(e){return t.hasOwnProperty(e)})},t.prototype.navigate=function(t){if(t&&t.url){if(!window.cordova)return this._error("cordova is undefined");var e=window.cordova.require("cordova/plugin_list").metadata;if(!1===this._isInAppBrowserInstalled(e))return this._error("InAppBrowser plugin not found");this._popup=cordova.InAppBrowser.open(t.url,this.target,this.features),this._popup?(n.Log.debug("CordovaPopupWindow.navigate: popup successfully created"),this._exitCallbackEvent=this._exitCallback.bind(this),this._loadStartCallbackEvent=this._loadStartCallback.bind(this),this._popup.addEventListener("exit",this._exitCallbackEvent,!1),this._popup.addEventListener("loadstart",this._loadStartCallbackEvent,!1)):this._error("Error opening popup window")}else this._error("No url provided");return this.promise},t.prototype._loadStartCallback=function(t){0===t.url.indexOf(this.redirect_uri)&&this._success({url:t.url})},t.prototype._exitCallback=function(t){this._error(t)},t.prototype._success=function(t){this._cleanup(),n.Log.debug("CordovaPopupWindow: Successful response from cordova popup window"),this._resolve(t)},t.prototype._error=function(t){this._cleanup(),n.Log.error(t),this._reject(new Error(t))},t.prototype.close=function(){this._cleanup()},t.prototype._cleanup=function(){this._popup&&(n.Log.debug("CordovaPopupWindow: cleaning up popup"),this._popup.removeEventListener("exit",this._exitCallbackEvent,!1),this._popup.removeEventListener("loadstart",this._loadStartCallbackEvent,!1),this._popup.close()),this._popup=null},r(t,[{key:"promise",get:function(){return this._promise}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),n=i(10),s=i(5),o=i(6),a=i(37),h=i(38),l=i(16),u=i(2),c=i(48),d=i(49),p=i(19),f=i(20),g=i(18),v=i(1),m=i(15),y=i(50);e.default={Version:y.Version,Log:r.Log,OidcClient:n.OidcClient,OidcClientSettings:s.OidcClientSettings,WebStorageStateStore:o.WebStorageStateStore,InMemoryWebStorage:a.InMemoryWebStorage,UserManager:h.UserManager,AccessTokenEvents:l.AccessTokenEvents,MetadataService:u.MetadataService,CordovaPopupNavigator:c.CordovaPopupNavigator,CordovaIFrameNavigator:d.CordovaIFrameNavigator,CheckSessionIFrame:p.CheckSessionIFrame,TokenRevocationClient:f.TokenRevocationClient,SessionMonitor:g.SessionMonitor,Global:v.Global,User:m.User},t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClockService=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.getEpochTime=function(){return Promise.resolve(Date.now()/1e3|0)},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResponseValidator=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=i(0),s=i(2),o=i(25),a=i(11),h=i(12),l=i(4),u=["nonce","at_hash","iat","nbf","exp","aud","iss","c_hash"];e.ResponseValidator=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.MetadataService,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UserInfoService,h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.JoseUtil,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a.TokenClient;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw n.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=e,this._metadataService=new i(this._settings),this._userInfoService=new r(this._settings),this._joseUtil=h,this._tokenClient=new u(this._settings)}return t.prototype.validateSigninResponse=function(t,e){var i=this;return n.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(t,e).then(function(e){return n.Log.debug("ResponseValidator.validateSigninResponse: state processed"),i._validateTokens(t,e).then(function(e){return n.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),i._processClaims(t,e).then(function(t){return n.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),t})})})},t.prototype.validateSignoutResponse=function(t,e){return t.id!==e.state?(n.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(n.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),e.state=t.data,e.error?(n.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",e.error),Promise.reject(new h.ErrorResponse(e))):Promise.resolve(e))},t.prototype._processSigninParams=function(t,e){if(t.id!==e.state)return n.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!t.client_id)return n.Log.error("ResponseValidator._processSigninParams: No client_id on
2state"),Promise.reject(new Error("No client_id on state"));if(!t.authority)return n.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==t.authority)return n.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=t.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==t.client_id)return n.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=t.client_id;return n.Log.debug("ResponseValidator._processSigninParams: state validated"),e.state=t.data,e.error?(n.Log.warn("ResponseValidator._processSigninParams: Response was error",e.error),Promise.reject(new h.ErrorResponse(e))):t.nonce&&!e.id_token?(n.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!t.nonce&&e.id_token?(n.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):t.code_verifier&&!e.code?(n.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!t.code_verifier&&e.code?(n.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(e.scope||(e.scope=t.scope),Promise.resolve(e))},t.prototype._processClaims=function(t,e){var i=this;if(e.isOpenIdConnect){if(n.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),e.profile=this._filterProtocolClaims(e.profile),!0!==t.skipUserInfo&&this._settings.loadUserInfo&&e.access_token)return n.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(e.access_token).then(function(t){return n.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),t.sub!==e.profile.sub?(n.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in id_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in id_token"))):(e.profile=i._mergeClaims(e.profile,t),n.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",e.profile),e)});n.Log.debug("ResponseValidator._processClaims: not loading user info")}else n.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(e)},t.prototype._mergeClaims=function(t,e){var i=Object.assign({},t);for(var n in e){var s=e[n];Array.isArray(s)||(s=[s]);for(var o=0;o<s.length;o++){var a=s[o];i[n]?Array.isArray(i[n])?i[n].indexOf(a)<0&&i[n].push(a):i[n]!==a&&("object"===(void 0===a?"undefined":r(a))&&this._settings.mergeClaims?i[n]=this._mergeClaims(i[n],a):i[n]=[i[n],a]):i[n]=a}}return i},t.prototype._filterProtocolClaims=function(t){n.Log.debug("ResponseValidator._filterProtocolClaims, incoming claims:",t);var e=Object.assign({},t);return this._settings._filterProtocolClaims?(u.forEach(function(t){delete e[t]}),n.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered",e)):n.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"),e},t.prototype._validateTokens=function(t,e){return e.code?(n.Log.debug("ResponseValidator._validateTokens: Validating code"),this._processCode(t,e)):e.id_token?e.access_token?(n.Log.debug("ResponseValidator._validateTokens: Validating id_token and access_token"),this._validateIdTokenAndAccessToken(t,e)):(n.Log.debug("ResponseValidator._validateTokens: Validating id_token"),this._validateIdToken(t,e)):(n.Log.debug("ResponseValidator._validateTokens: No code to process or id_token to validate"),Promise.resolve(e))},t.prototype._processCode=function(t,e){var i=this,s={client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier};return t.extraTokenParams&&"object"===r(t.extraTokenParams)&&Object.assign(s,t.extraTokenParams),this._tokenClient.exchangeCode(s).then(function(r){for(var s in r)e[s]=r[s];return e.id_token?(n.Log.debug("ResponseValidator._processCode: token response successful, processing id_token"),i._validateIdTokenAttributes(t,e)):(n.Log.debug("ResponseValidator._processCode: token response successful, returning response"),e)})},t.prototype._validateIdTokenAttributes=function(t,e){var i=this;return this._metadataService.getIssuer().then(function(r){var s=t.client_id,o=i._settings.clockSkew;return n.Log.debug("ResponseValidator._validateIdTokenAttributes: Validaing JWT attributes; using clock skew (in seconds) of: ",o),i._settings.getEpochTime().then(function(a){return i._joseUtil.validateJwtAttributes(e.id_token,r,s,o,a).then(function(i){return t.nonce&&t.nonce!==i.nonce?(n.Log.error("ResponseValidator._validateIdTokenAttributes: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):i.sub?(e.profile=i,e):(n.Log.error("ResponseValidator._validateIdTokenAttributes: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))})})})},t.prototype._validateIdTokenAndAccessToken=function(t,e){var i=this;
vendor: 22,405 bytes, line 2
2return this._validateIdToken(t,e).then(function(t){return i._validateAccessToken(t)})},t.prototype._getSigningKeyForJwt=function(t){var e=this;return this._metadataService.getSigningKeys().then(function(i){var r=t.header.kid;if(!i)return n.Log.error("ResponseValidator._validateIdToken: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));n.Log.debug("ResponseValidator._validateIdToken: Received signing keys");var s=void 0;if(r)s=i.filter(function(t){return t.kid===r})[0];else{if((i=e._filterByAlg(i,t.header.alg)).length>1)return n.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));s=i[0]}return Promise.resolve(s)})},t.prototype._getSigningKeyForJwtWithSingleRetry=function(t){var e=this;return this._getSigningKeyForJwt(t).then(function(i){return i?Promise.resolve(i):(e._metadataService.resetSigningKeys(),e._getSigningKeyForJwt(t))})},t.prototype._validateIdToken=function(t,e){var i=this;if(!t.nonce)return n.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var r=this._joseUtil.parseJwt(e.id_token);return r&&r.header&&r.payload?t.nonce!==r.payload.nonce?(n.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):this._metadataService.getIssuer().then(function(s){return n.Log.debug("ResponseValidator._validateIdToken: Received issuer"),i._getSigningKeyForJwtWithSingleRetry(r).then(function(o){if(!o)return n.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var a=t.client_id,h=i._settings.clockSkew;return n.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",h),i._joseUtil.validateJwt(e.id_token,o,s,a,h).then(function(){return n.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),r.payload.sub?(e.profile=r.payload,e):(n.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))})})}):(n.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",r),Promise.reject(new Error("Failed to parse id_token")))},t.prototype._filterByAlg=function(t,e){var i=null;if(e.startsWith("RS"))i="RSA";else if(e.startsWith("PS"))i="PS";else{if(!e.startsWith("ES"))return n.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",e),[];i="EC"}return n.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",i),t=t.filter(function(t){return t.kty===i}),n.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",i,t.length),t},t.prototype._validateAccessToken=function(t){if(!t.profile)return n.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!t.profile.at_hash)return n.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!t.id_token)return n.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var e=this._joseUtil.parseJwt(t.id_token);if(!e||!e.header)return n.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",e),Promise.reject(new Error("Failed to parse id_token"));var i=e.header.alg;if(!i||5!==i.length)return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",i),Promise.reject(new Error("Unsupported alg: "+i));var r=i.substr(2,3);if(!r)return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",i,r),Promise.reject(new Error("Unsupported alg: "+i));if(256!==(r=parseInt(r))&&384!==r&&512!==r)return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",i,r),Promise.reject(new Error("Unsupported alg: "+i));var s="sha"+r,o=this._joseUtil.hashString(t.access_token,s);if(!o)return n.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",s),Promise.reject(new Error("Failed to validate at_hash"));var a=o.substr(0,o.length/2),h=this._joseUtil.hexToBase64Url(a);return h!==t.profile.at_hash?(n.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",h,t.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(n.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(t))},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserInfoService=void 0;var r=i(7),n=i(2),s=i(0),o=i(4);e.UserInfoService=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.JsonService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.MetadataService,h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.JoseUtil;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw s.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=e,this._jsonService=new i(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new a(this._settings),this._joseUtil=h}return t.prototype.getClaims=function(t){var e=this;return t?this._metadataService.getUserInfoEndpoint().then(function(i){return s.Log.debug("UserInfoService.getClaims: received userinfo url",i),e._jsonService.getJson(i,t).then(function(t){return s.Log.debug("UserInfoService.getClaims: claims received",t),t})}):(s.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},t.prototype._getClaimsFromJwt=function t(e){var i=this;try{var r=this._joseUtil.parseJwt(e.responseText);if(!r||!r.header||!r.payload)return s.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",r),Promise.reject(new Error("Failed to parse id_token"));var n=r.header.kid,o=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":o=this._metadataService.getIssuer();break;case"ANY":o=Promise.resolve(r.payload.iss);break;default:o=Promise.resolve(this._settings.userInfoJwtIssuer)}return o.then(function(t){return s.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+t),i._metadataService.getSigningKeys().then(function(o){if(!o)return s.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));s.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var a=void 0;if(n)a=o.filter(function(t){return t.kid===n})[0];else{if((o=i._filterByAlg(o,r.header.alg)).length>1)return s.Log.error("UserInfoService._getClaimsFromJwt: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));a=o[0]}if(!a)return s.Log.error("UserInfoService._getClaimsFromJwt: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var h=i._settings.client_id,l=i._settings.clockSkew;return s.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",l),i._joseUtil.validateJwt(e.responseText,a,t,h,l,void 0,!0).then(function(){return s.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),r.payload})})})}catch(t){return s.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",t.message),void reject(t)}},t.prototype._filterByAlg=function(t,e){var i=null;if(e.startsWith("RS"))i="RSA";else if(e.startsWith("PS"))i="PS";else{if(!e.startsWith("ES"))return s.Log.debug("UserInfoService._filterByAlg: alg not supported: ",e),[];i="EC"}return s.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",i),t=t.filter(function(t){return t.kty===i}),s.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",i,t.length),t},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AllowedSigningAlgs=e.b64tohex=e.hextob64u=e.crypto=e.X509=e.KeyUtil=e.jws=void 0;var r=i(27);e.jws=r.jws,e.KeyUtil=r.KEYUTIL,e.X509=r.X509,e.crypto=r.crypto,e.hextob64u=r.hextob64u,e.b64tohex=r.b64tohex,e.AllowedSigningAlgs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"]},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r={userAgent:!1},n={};if(void 0===s)var s={};s.lang={extend:function(t,e,i){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var n=function(){};if(n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),i){var s;for(s in i)t.prototype[s]=i[s];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(r.userAgent)&&(o=function(t,e){for(s=0;s<a.length;s+=1){var i=a[s],r=e[i];"function"==typeof r&&r!=Object.prototype[i]&&(t[i]=r)}})}catch(t){}o(t.prototype,i)}}};var o,a,h,l,u,c,d,p,f,g,v,m=m||(o=Math,h=(a={}).lib={},l=h.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var i=new t;return e&&i.mixIn(e),i.hasOwnProperty("init")||(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=h.WordArray=l.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,i=t.words,r=this.sigBytes,n=t.sigBytes;if(this.clamp(),r%4)for(var s=0;s<n;s++){var o=i[s>>>2]>>>24-s%4*8&255;e[r+s>>>2]|=o<<24-(r+s)%4*8}else for(s=0;s<n;s+=4)e[r+s>>>2]=i[s>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=o.ceil(e/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i<t;i+=4)e.push(4294967296*o.random()|0);return new u.init(e,t)}}),c=a.enc={},d=c.Hex={stringify:function(t){for(var e=t.words,i=t.sigBytes,r=[],n=0;n<i;n++){var s=e[n>>>2]>>>24-n%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r<e;r+=2)i[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new u.init(i,e/2)}},p=c.Latin1={stringify:function(t){for(var e=t.words,i=t.sigBytes,r=[],n=0;n<i;n++){var s=e[n>>>2]>>>24-n%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r<e;r++)i[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new u.init(i,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},g=h.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,i=e.words,r=e.sigBytes,n=this.blockSize,s=r/(4*n),a=(s=t?o.ceil(s):o.max((0|s)-this._minBufferSize,0))*n,h=o.min(4*a,r);if(a){for(var l=0;l<a;l+=n)this._doProcessBlock(i,l);var c=i.splice(0,a);e.sigBytes-=h}return new u.init(c,h)},clone:function(){var t=l.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h.Hasher=g.extend({cfg:l.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,i){return new t.init(i).finalize(e)}},_createHmacHelper:function(t){return function(e,i){return new v.HMAC.init(t,i).finalize(e)}}}),v=a.algo={},a);!function(){var t,e=(t=m).lib,i=e.Base,r=e.WordArray;(t=t.x64={}).Word=i.extend({init:function(t,e){this.high=t,this.low=e}}),t.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,i=[],n=0;n<e;n++){var s=t[n];i.push(s.high),i.push(s.low)}return r.create(i,this.sigBytes)},clone:function(){for(var t=i.clone.call(this),e=t.words=this.words.slice(0),r=e.length,n=0;n<r;n++)e[n]=e[n].clone();return t}})}(),function(){var t=m,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,i=t.sigBytes,r=this._map;t.clamp(),t=[];for(var n=0;n<i;n+=3)for(var s=(e[n>>>2]>>>24-n%4*8&255)<<16|(e[n+1>>>2]>>>24-(n+1)%4*8&255)<<8|e[n+2>>>2]>>>24-(n+2)%4*8&255,o=0;4>o&&n+.75*o<i;o++)t.push(r.charAt(s>>>6*(3-o)&63));if(e=r.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var i=t.length,r=this._map;(n=r.charAt(64))&&-1!=(n=t.indexOf(n))&&(i=n);for(var n=[],s=0,o=0;o<i;o++)if(o%4){var a=r.indexOf(t.charAt(o-1))<<o%4*2,h=r.indexOf(t.charAt(o))>>>6-o%4*2;n[s>>>2]|=(a|h)<<24-s%4*8,s++}return e.create(n,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){for(var e=m,i=(n=e.lib).WordArray,r=n.Hasher,n=e.algo,s=[],o=[],a=function(t){return 4294967296*(t-(0|t))|0},h=2,l=0;64>l;){var u;t:{u=h;for(var c=t.sqrt(u),d=2;d<=c;d++)if(!(u%d)){u=!1;break t}u=!0}u&&(8>l&&(s[l]=a(t.pow(h,.5))),o[l]=a(t.pow(h,1/3)),l++),h++}var p=[];n=n.SHA256=r.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var i=this._hash.words,r=i[0],n=i[1],s=i[2],a=i[3],h=i[4],l=i[5],u=i[6],c=i[7],d=0;64>d;d++){if(16>d)p[d]=0|t[e+d];else{var f=p[d-15],g=p[d-2];p[d]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+p[d-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[d-16]}f=c+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&u)+o[d]+p[d],g=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&n^r&s^n&s),c=u,u=l,l=h,h=a+f|0,a=s,s=n,n=r,r=f+g|0}i[0]=i[0]+r|0,i[1]=i[1]+n|0,i[2]=i[2]+s|0,i[3]=i[3]+a|0,i[4]=i[4]+h|0,i[5]=i[5]+l|0,i[6]=i[6]+u|0,i[7]=i[7]+c|0},_doFinalize:function(){var e=this._data,i=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return i[n>>>5]|=128<<24-n%32,i[14+(n+64>>>9<<4)]=t.floor(r/4294967296),i[15+(n+64>>>9<<4)]=r,e.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA256=r._createHelper(n),e.HmacSHA256=r._createHmacHelper(n)}(Math),function(){function t(){return r.create.apply(r,arguments)}for(var e=m,i=e.lib.Hasher,r=(s=e.x64).Word,n=s.WordArray,s=e.algo,o=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],a=[],h=0;80>h;h++)a[h]=t();s=s.SHA512=i.extend({_doReset:function(){this._hash=new n.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var i=(c=this._hash.words)[0],r=c[1],n=c[2],s=c[3],h=c[4],l=c[5],u=c[6],c=c[7],d=i.high,p=i.low,f=r.high,g=r.low,v=n.high,m=n.low,y=s.high,_=s.low,S=h.high,w=h.low,b=l.high,E=l.low,F=u.high,x=u.low,C=c.high,k=c.low,D=d,A=p,T=f,P=g,I=v,M=m,R=y,L=_,N=S,O=w,H=b,B=E,j=F,U=x,V=C,K=k,z=0;80>z;z++){var q=a[z];if(16>z)var W=q.high=0|t[e+2*z],$=q.low=0|t[e+2*z+1];else{W=(($=(W=a[z-15]).high)>>>1|(J=W.low)<<31)^($>>>8|J<<24)^$>>>7;var J=(J>>>1|$<<31)^(J>>>8|$<<24)^(J>>>7|$<<25),Y=(($=(Y=a[z-2]).high)>>>19|(G=Y.low)<<13)^($<<3|G>>>29)^$>>>6,G=(G>>>19|$<<13)^(G<<3|$>>>29)^(G>>>6|$<<26),X=($=a[z-7]).high,Z=(Q=a[z-16]).high,Q=Q.low;W=(W=(W=W+X+(($=J+$.low)>>>0<J>>>0?1:0))+Y+(($+=G)>>>0<G>>>0?1:0))+Z+(($+=Q)>>>0<Q>>>0?1:0),q.high=W,q.low=$}X=N&H^~N&j,Q=O&B^~O&U,q=D&T^D&I^T&I;var tt=A&P^A&M^P&M,et=(J=(D>>>28|A<<4)^(D<<30|A>>>2)^(D<<25|A>>>7),Y=(A>>>28|D<<4)^(A<<30|D>>>2)^(A<<25|D>>>7),(G=o[z]).high),it=G.low;Z=V+((N>>>14|O<<18)^(N>>>18|O<<14)^(N<<23|O>>>9))+((G=K+((O>>>14|N<<18)^(O>>>18|N<<14)^(O<<23|N>>>9)))>>>0<K>>>0?1:0),V=j,K=U,j=H,U=B,H=N,B=O,N=R+(Z=(Z=(Z=Z+X+((G+=Q)>>>0<Q>>>0?1:0))+et+((G+=it)>>>0<it>>>0?1:0))+W+((G+=$)>>>0<$>>>0?1:0))+((O=L+G|0)>>>0<L>>>0?1:0)|0,R=I,L=M,I=T,M=P,T=D,P=A,D=Z+(q=J+q+(($=Y+tt)>>>0<Y>>>0?1:0))+((A=G+$|0)>>>0<G>>>0?1:0)|0}p=i.low=p+A,i.high=d+D+(p>>>0<A>>>0?1:0),g=r.low=g+P,r.high=f+T+(g>>>0<P>>>0?1:0),m=n.low=m+M,n.high=v+I+(m>>>0<M>>>0?1:0),_=s.low=_+L,s.high=y+R+(_>>>0<L>>>0?1:0),w=h.low=w+O,h.high=S+N+(w>>>0<O>>>0?1:0),E=l.low=E+B,l.high=b+H+(E>>>0<B>>>0?1:0),x=u.low=x+U,u.high=F+j+(x>>>0<U>>>0?1:0),k=c.low=k+K,c.high=C+V+(k>>>0<K>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(i/4294967296),e[31+(r+128>>>10<<5)]=i,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=i._createHelper(s),e.HmacSHA512=i._createHmacHelper(s)}(),function(){var t=m,e=(n=t.x64).Word,i=n.WordArray,r=(n=t.algo).SHA512,n=n.SHA384=r.extend({_doReset:function(){this._hash=new i.init([new e.init(3418070365,3238371032),new e.init(1654270250,914150663),new e.init(2438529370,812702999),new e.init(355462360,4144912697),new e.init(1731405415,4290775857),new e.init(2394180231,1750603025),new e.init(3675008525,1694076839),new e.init(1203062813,3204075428)])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=r._createHelper(n),t.HmacSHA384=r._createHmacHelper(n)}();var y,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function S(t){var e,i,r="";for(e=0;e+3<=t.length;e+=3)i=parseInt(t.substring(e,e+3),16),r+=_.charAt(i>>6)+_.charAt(63&i);for(e+1==t.length?(i=parseInt(t.substring(e,e+1),16),r+=_.charAt(i<<2)):e+2==t.length&&(i=parseInt(t.substring(e,e+2),16),r+=_.charAt(i>>2)+_.charAt((3&i)<<4));(3&r.length)>0;)r+="=";return r}function w(t){var e,i,r,n="",s=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e)(r=_.indexOf(t.charAt(e)))<0||(0==s?(n+=D(r>>2),i=3&r,s=1):1==s?(n+=D(i<<2|r>>4),i=15&r,s=2):2==s?(n+=D(i),n+=D(r>>2),i=3&r,s=3):(n+=D(i<<2|r>>4),n+=D(15&r),s=0));return 1==s&&(n+=D(i<<2)),n}function b(t){var e,i=w(t),r=new Array;for(e=0;2*e<i.length;++e)r[e]=parseInt(i.substring(2*e,2*e+2),16);return r}function E(t,e,i){null!=t&&("number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function F(){return new E(null)}"Microsoft Internet Explorer"==r.appName?(E.prototype.am=function(t,e,i,r,n,s){for(var o=32767&e,a=e>>15;--s>=0;){var h=32767&this[t],l=this[t++]>>15,u=a*h+l*o;n=((h=o*h+((32767&u)<<15)+i[r]+(1073741823&n))>>>30)+(u>>>15)+a*l+(n>>>30),i[r++]=1073741823&h}return n},y=30):"Netscape"!=r.appName?(E.prototype.am=function(t,e,i,r,n,s){for(;--s>=0;){var o=e*this[t++]+i[r]+n;n=Math.floor(o/67108864),i[r++]=67108863&o}return n},y=26):(E.prototype.am=function(t,e,i,r,n,s){for(var o=16383&e,a=e>>14;--s>=0;){var h=16383&this[t],l=this[t++]>>14,u=a*h+l*o;n=((h=o*h+((16383&u)<<14)+i[r]+n)>>28)+(u>>14)+a*l,i[r++]=268435455&h}return n},y=28),E.prototype.DB=y,E.prototype.DM=(1<<y)-1,E.prototype.DV=1<<y,E.prototype.FV=Math.pow(2,52),E.prototype.F1=52-y,E.prototype.F2=2*y-52;var x,C,k=new Array;for(x="0".charCodeAt(0),C=0;C<=9;++C)k[x++]=C;for(x="a".charCodeAt(0),C=10;C<36;++C)k[x++]=C;for(x="A".charCodeAt(0),C=10;C<36;++C)k[x++]=C;function D(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function A(t,e){var i=k[t.charCodeAt(e)];return null==i?-1:i}function T(t){var e=F();return e.fromInt(t),e}function P(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}function I(t){this.m=t}function M(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>
vendor: 4,872 bytes, line 2
2>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function R(t,e){return t&e}function L(t,e){return t|e}function N(t,e){return t^e}function O(t,e){return t&~e}function H(t){if(0==t)return-1;var e=0;return!(65535&t)&&(t>>=16,e+=16),!(255&t)&&(t>>=8,e+=8),!(15&t)&&(t>>=4,e+=4),!(3&t)&&(t>>=2,e+=2),!(1&t)&&++e,e}function B(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function j(){}function U(t){return t}function V(t){this.r2=F(),this.q3=F(),E.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}I.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},I.prototype.revert=function(t){return t},I.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},I.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},I.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},M.prototype.convert=function(t){var e=F();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(E.ZERO)>0&&this.m.subTo(e,e),e},M.prototype.revert=function(t){var e=F();return t.copyTo(e),this.reduce(e),e},M.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],r=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},M.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},M.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},E.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},E.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},E.prototype.fromString=function(t,e){var i;if(16==e)i=4;else if(8==e)i=3;else if(256==e)i=8;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var r=t.length,n=!1,s=0;--r>=0;){var o=8==i?255&t[r]:A(t,r);o<0?"-"==t.charAt(r)&&(n=!0):(n=!1,0==s?this[this.t++]=o:s+i>this.DB?(this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this[this.t++]=o>>this.DB-s):this[this.t-1]|=o<<s,(s+=i)>=this.DB&&(s-=this.DB))}8==i&&!!(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),n&&E.ZERO.subTo(this,this)},E.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},E.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},E.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},E.prototype.lShiftTo=function(t,e){var i,r=t%this.DB,n=this.DB-r,s=(1<<n)-1,o=Math.floor(t/this.DB),a=this.s<<r&this.DM;for(i=this.t-1;i>=0;--i)e[i+o+1]=this[i]>>n|a,a=(this[i]&s)<<r;for(i=o-1;i>=0;--i)e[i]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},E.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var r=t%this.DB,n=this.DB-r,s=(1<<r)-1;e[0]=this[i]>>r;for(var o=i+1;o<this.t;++o)e[o-i-1]|=(this[o]&s)<<n,e[o-i]=this[o]>>r;r>0&&(e[this.t-i-1]|=(this.s&s)<<n),e.t=this.t-i,e.clamp()}},E.prototype.subTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]-t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r-=t[i],e[i++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[i++]=this.DV+r:r>0&&(e[i++]=r),e.t=i,e.clamp()},E.prototype.multiplyTo=function(t,e){var i=this.abs(),r=t.abs(),n=i.t;for(e.t=n+r.t;--n>=0;)e[n]=0;for(n=0;n<r.t;++n)e[n+i.t]=i.am(0,r[n],e,n,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&E.ZERO.subTo(e,e)},E.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var r=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,r,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},E.prototype.divRemTo=function(t,e,i){var r=t.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=F());var s=F(),o=this.s,a=t.s,h=this.DB-P(r[r.t-1]);h>0?(r.lShiftTo(h,s),n.lShiftTo(h,i)):(r.copyTo(s),n.copyTo(i));var l=s.t,u=s[l-1];if(0!=u){var c=u*(1<<this.F1)+(l>1?s[l-2]>>this.F2:0),d=this.FV/c,p=(1<<this.F1)/c,f=1<<this.F2,g=i.t,v=g-l,m=null==e?F():e;for(s.dlShiftTo(v,m),i.compareTo(m)>=0&&(i[i.t++]=1,i.subTo(m,i)),E.ONE.dlShiftTo(l,m),m.subTo(s,s);s.t<l;)s[s.t++]=0;for(;--v>=0;){var y=i[--g]==u?this.DM:Math.floor(i[g]*d+(i[g-1]+f)*p);if((i[g]+=s.am(0,y,i,v,0,l))<y)for(s.dlShiftTo(v,m),i.subTo(m,i);i[g]<--y;)i.subTo(m,i)}null!=e&&(i.drShiftTo(l,e),o!=a&&E.ZERO.subTo(e,e)),i.t=l,i.clamp(),h>0&&i.rShiftTo(h,i),o<0&&E.ZERO.subTo(i,i)}}},E.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;
vendor: 4,357 bytes, line 2
2return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},E.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},E.prototype.exp=function(t,e){if(t>4294967295||t<1)return E.ONE;var i=F(),r=F(),n=e.convert(this),s=P(t)-1;for(n.copyTo(i);--s>=0;)if(e.sqrTo(i,r),(t&1<<s)>0)e.mulTo(r,n,i);else{var o=i;i=r,r=o}return e.revert(i)},E.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<<e)-1,n=!1,s="",o=this.t,a=this.DB-o*this.DB%e;if(o-- >0)for(a<this.DB&&(i=this[o]>>a)>0&&(n=!0,s=D(i));o>=0;)a<e?(i=(this[o]&(1<<a)-1)<<e-a,i|=this[--o]>>(a+=this.DB-e)):(i=this[o]>>(a-=e)&r,a<=0&&(a+=this.DB,--o)),i>0&&(n=!0),n&&(s+=D(i));return n?s:"0"},E.prototype.negate=function(){var t=F();return E.ZERO.subTo(this,t),t},E.prototype.abs=function(){return this.s<0?this.negate():this},E.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},E.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+P(this[this.t-1]^this.s&this.DM)},E.prototype.mod=function(t){var e=F();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(E.ZERO)>0&&t.subTo(e,e),e},E.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new I(e):new M(e),this.exp(t,i)},E.ZERO=T(0),E.ONE=T(1),j.prototype.convert=U,j.prototype.revert=U,j.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},j.prototype.sqrTo=function(t,e){t.squareTo(e)},V.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=F();return t.copyTo(e),this.reduce(e),e},V.prototype.revert=function(t){return t},V.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},V.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},V.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var K,z,q,W=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],$=(1<<26)/W[W.length-1];function J(){this.i=0,this.j=0,this.S=new Array}function Y(){!function(t){z[q++]^=255&t,z[q++]^=t>>8&255,z[q++]^=t>>16&255,z[q++]^=t>>24&255,q>=256&&(q-=256)}((new Date).getTime())}if(E.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},E.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),r=T(i),n=F(),s=F(),o="";for(this.divRemTo(r,n,s);n.signum()>0;)o=(i+s.intValue()).toString(t).substr(1)+o,n.divRemTo(r,n,s);return s.intValue().toString(t)+o},E.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),r=Math.pow(e,i),n=!1,s=0,o=0,a=0;a<t.length;++a){var h=A(t,a);h<0?"-"==t.charAt(a)&&0==this.signum()&&(n=!0):(o=e*o+h,++s>=i&&(this.dMultiply(r),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(o,0)),n&&E.ZERO.subTo(this,this)},E.prototype.fromNumber=function(t,e,i){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(E.ONE.shiftLeft(t-1),L,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(E.ONE.shiftLeft(t-1),this);else{var r=new Array,n=7&t;r.length=1+(t>>3),e.nextBytes(r),n>0?r[0]&=(1<<n)-1:r[0]=0,this.fromString(r,256)}}
vendor: 4,214 bytes, line 2
2,E.prototype.bitwiseTo=function(t,e,i){var r,n,s=Math.min(t.t,this.t);for(r=0;r<s;++r)i[r]=e(this[r],t[r]);if(t.t<this.t){for(n=t.s&this.DM,r=s;r<this.t;++r)i[r]=e(this[r],n);i.t=this.t}else{for(n=this.s&this.DM,r=s;r<t.t;++r)i[r]=e(n,t[r]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},E.prototype.changeBit=function(t,e){var i=E.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},E.prototype.addTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]+t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r+=t[i],e[i++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[i++]=r:r<-1&&(e[i++]=this.DV+r),e.t=i,e.clamp()},E.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},E.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},E.prototype.multiplyLowerTo=function(t,e,i){var r,n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(r=i.t-this.t;n<r;++n)i[n+this.t]=this.am(0,t[n],i,n,0,this.t);for(r=Math.min(t.t,e);n<r;++n)this.am(0,t[n],i,n,0,e-n);i.clamp()},E.prototype.multiplyUpperTo=function(t,e,i){--e;var r=i.t=this.t+t.t-e;for(i.s=0;--r>=0;)i[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)i[this.t+r-e]=this.am(e-r,t[r],i,0,0,this.t+r-e);i.clamp(),i.drShiftTo(1,i)},E.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(0==e)i=this[0]%t;else for(var r=this.t-1;r>=0;--r)i=(e*i+this[r])%t;return i},E.prototype.millerRabin=function(t){var e=this.subtract(E.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var r=e.shiftRight(i);(t=t+1>>1)>W.length&&(t=W.length);for(var n=F(),s=0;s<t;++s){n.fromInt(W[Math.floor(Math.random()*W.length)]);var o=n.modPow(r,this);if(0!=o.compareTo(E.ONE)&&0!=o.compareTo(e)){for(var a=1;a++<i&&0!=o.compareTo(e);)if(0==(o=o.modPowInt(2,this)).compareTo(E.ONE))return!1;if(0!=o.compareTo(e))return!1}}return!0},E.prototype.clone=function(){var t=F();return this.copyTo(t),t},E.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},E.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},E.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},E.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},E.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var i,r=this.DB-t*this.DB%8,n=0;if(t-- >0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[n++]=i|this.s<<this.DB-r);t>=0;)r<8?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),!!(128&i)&&(i|=-256),0==n&&(128&this.s)!=(128&i)&&++n,(n>0||i!=this.s)&&(e[n++]=i);return e},E.prototype.equals=function(t){return 0==this.compareTo(t)},E.prototype.min=function(t){return this.compareTo(t)<0?this:t},E.prototype.max=function(t){return this.compareTo(t)>0?this:t},E.prototype.and=function(t){var e=F();return this.bitwiseTo(t,R,e),e},E.prototype.or=function(t){var e=F();return this.bitwiseTo(t,L,e),e},E.prototype.xor=function(t){var e=F();return this.bitwiseTo(t,N,e),e},E.prototype.andNot=function(t){var e=F();return this.bitwiseTo(t,O,e),e},E.prototype.not=function(){for(var t=F(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},E.prototype.shiftLeft=function(t){var e=F();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},E.prototype.shiftRight=function(t){var e=F();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},E.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+H(this[t]);return this.s<0?this.t*this.DB:-1},E.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=B(this[i]^e);return t},E.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},E.prototype.setBit=function(t){return this.changeBit(t,L)},E.prototype.clearBit=function(t){return this.changeBit(t,O)}
vendor: 14,169 bytes, line 2
2,E.prototype.flipBit=function(t){return this.changeBit(t,N)},E.prototype.add=function(t){var e=F();return this.addTo(t,e),e},E.prototype.subtract=function(t){var e=F();return this.subTo(t,e),e},E.prototype.multiply=function(t){var e=F();return this.multiplyTo(t,e),e},E.prototype.divide=function(t){var e=F();return this.divRemTo(t,e,null),e},E.prototype.remainder=function(t){var e=F();return this.divRemTo(t,null,e),e},E.prototype.divideAndRemainder=function(t){var e=F(),i=F();return this.divRemTo(t,e,i),new Array(e,i)},E.prototype.modPow=function(t,e){var i,r,n=t.bitLength(),s=T(1);if(n<=0)return s;i=n<18?1:n<48?3:n<144?4:n<768?5:6,r=n<8?new I(e):e.isEven()?new V(e):new M(e);var o=new Array,a=3,h=i-1,l=(1<<i)-1;if(o[1]=r.convert(this),i>1){var u=F();for(r.sqrTo(o[1],u);a<=l;)o[a]=F(),r.mulTo(u,o[a-2],o[a]),a+=2}var c,d,p=t.t-1,f=!0,g=F();for(n=P(t[p])-1;p>=0;){for(n>=h?c=t[p]>>n-h&l:(c=(t[p]&(1<<n+1)-1)<<h-n,p>0&&(c|=t[p-1]>>this.DB+n-h)),a=i;!(1&c);)c>>=1,--a;if((n-=a)<0&&(n+=this.DB,--p),f)o[c].copyTo(s),f=!1;else{for(;a>1;)r.sqrTo(s,g),r.sqrTo(g,s),a-=2;a>0?r.sqrTo(s,g):(d=s,s=g,g=d),r.mulTo(g,o[c],s)}for(;p>=0&&!(t[p]&1<<n);)r.sqrTo(s,g),d=s,s=g,g=d,--n<0&&(n=this.DB-1,--p)}return r.revert(s)},E.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return E.ZERO;for(var i=t.clone(),r=this.clone(),n=T(1),s=T(0),o=T(0),a=T(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),e?(n.isEven()&&s.isEven()||(n.addTo(this,n),s.subTo(t,s)),n.rShiftTo(1,n)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);i.compareTo(r)>=0?(i.subTo(r,i),e&&n.subTo(o,n),s.subTo(a,s)):(r.subTo(i,r),e&&o.subTo(n,o),a.subTo(s,a))}return 0!=r.compareTo(E.ONE)?E.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a},E.prototype.pow=function(t){return this.exp(t,new j)},E.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var n=e.getLowestSetBit(),s=i.getLowestSetBit();if(s<0)return e;for(n<s&&(s=n),s>0&&(e.rShiftTo(s,e),i.rShiftTo(s,i));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return s>0&&i.lShiftTo(s,i),i},E.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=W[W.length-1]){for(e=0;e<W.length;++e)if(i[0]==W[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<W.length;){for(var r=W[e],n=e+1;n<W.length&&r<$;)r*=W[n++];for(r=i.modInt(r);e<n;)if(r%W[e++]==0)return!1}return i.millerRabin(t)},E.prototype.square=function(){var t=F();return this.squareTo(t),t},J.prototype.init=function(t){var e,i,r;for(e=0;e<256;++e)this.S[e]=e;for(i=0,e=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[i],this.S[i]=r;this.i=0,this.j=0},J.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},null==z){var G;if(z=new Array,q=0,void 0!==n&&(void 0!==n.crypto||void 0!==n.msCrypto)){var X=n.crypto||n.msCrypto;if(X.getRandomValues){var Z=new Uint8Array(32);for(X.getRandomValues(Z),G=0;G<32;++G)z[q++]=Z[G]}else if("Netscape"==r.appName&&r.appVersion<"5"){var Q=n.crypto.random(32);for(G=0;G<Q.length;++G)z[q++]=255&Q.charCodeAt(G)}}for(;q<256;)G=Math.floor(65536*Math.random()),z[q++]=G>>>8,z[q++]=255&G;q=0,Y()}function tt(){if(null==K){for(Y(),(K=new J).init(z),q=0;q<z.length;++q)z[q]=0;q=0}return K.next()}function et(){}function it(t,e){return new E(t,e)}function rt(t,e,i){for(var r="",n=0;r.length<e;)r+=i(String.fromCharCode.apply(String,t.concat([(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))),n+=1;return r}function nt(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function st(t,e){this.x=e,this.q=t}function ot(t,e,i,r){this.curve=t,this.x=e,this.y=i,this.z=null==r?E.ONE:r,this.zinv=null}function at(t,e,i){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(i),this.infinity=new ot(this,null,null)}et.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=tt()},nt.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},nt.prototype.setPublic=function(t,e){if(this.isPublic=!0,this.isPrivate=!1,"string"!=typeof t)this.n=t,this.e=e;else{if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA public key";this.n=it(t,16),this.e=parseInt(e,16)}},nt.prototype.encrypt=function(t){var e=function(t,e){if(e<t.length+11)throw"Message too long for RSA";for(var i=new Array,r=t.length-1;r>=0&&e>0;){var n=t.charCodeAt(r--);n<128?i[--e]=n:n>127&&n<2048?(i[--e]=63&n|128,i[--e]=n>>6|192):(i[--e]=63&n|128,i[--e]=n>>6&63|128,i[--e]=n>>12|224)}i[--e]=0;for(var s=new et,o=new Array;e>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);i[--e]=o[0]}return i[--e]=2,i[--e]=0,new E(i)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var i=this.doPublic(e);if(null==i)return null;var r=i.toString(16);return 1&r.length?"0"+r:r},nt.prototype.encryptOAEP=function(t,e,i){var r=function(t,e,i,r){var n=lt.crypto.MessageDigest,s=lt.crypto.Util,o=null;if(i||(i="sha1"),"string"==typeof i&&(o=n.getCanonicalAlgName(i),r=n.getHashLength(o),i=function(t){return Et(s.hashHex(Ft(t),o))}),t.length+2*r+2>e)throw"Message too long for RSA";var a,h="";for(a=0;a<e-t.length-2*r-2;a+=1)h+="\0";var l=i("")+h+"�"+t,u=new Array(r);(new et).nextBytes(u);var c=rt(u,l.length,i),d=[];for(a=0;a<l.length;a+=1)d[a]=l.charCodeAt(a)^c.charCodeAt(a);var p=rt(d,u.length,i),f=[0];for(a=0;a<u.length;a+=1)f[a+1]=u[a]^p.charCodeAt(a);return new E(f.concat(d))}(t,this.n.bitLength()+7>>3,e,i);if(null==r)return null;var n=this.doPublic(r);if(null==n)return null;var s=n.toString(16);return 1&s.length?"0"+s:s},nt.prototype.type="RSA",st.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.x.equals(t.x)},st.prototype.toBigInteger=function(){return this.x},st.prototype.negate=function(){return new st(this.q,this.x.negate().mod(this.q))},st.prototype.add=function(t){return new st(this.q,this.x.add(t.toBigInteger()).mod(this.q))},st.prototype.subtract=function(t){return new st(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))},st.prototype.multiply=function(t){return new st(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))},st.prototype.square=function(){return new st(this.q,this.x.square().mod(this.q))},st.prototype.divide=function(t){return new st(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))},ot.prototype.getX=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ot.prototype.getY=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ot.prototype.equals=function(t){return t==this||(this.isInfinity()?t.isInfinity():t.isInfinity()?this.isInfinity():!!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(E.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(E.ZERO))},ot.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(E.ZERO)&&!this.y.toBigInteger().equals(E.ZERO)},ot.prototype.negate=function(){return new ot(this.curve,this.x,this.y.negate(),this.z)},ot.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),i=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q);if(E.ZERO.equals(i))return E.ZERO.equals(e)?this.twice():this.curve.getInfinity();var r=new E("3"),n=this.x.toBigInteger(),s=this.y.toBigInteger(),o=(t.x.toBigInteger(),t.y.toBigInteger(),i.square()),a=o.multiply(i),h=n.multiply(o),l=e.square().multiply(this.z),u=l.subtract(h.shiftLeft(1)).multiply(t.z).subtract(a).multiply(i).mod(this.curve.q),c=h.multiply(r).multiply(e).subtract(s.multiply(a)).subtract(l.multiply(e)).multiply(t.z).add(e.multiply(a)).mod(this.curve.q),d=a.multiply(this.z).multiply(t.z).mod(this.curve.q);return new ot(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(c),d)},ot.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new E("3"),e=this.x.toBigInteger(),i=this.y.toBigInteger(),r=i.multiply(this.z),n=r.multiply(i).mod(this.curve.q),s=this.curve.a.toBigInteger(),o=e.square().multiply(t);E.ZERO.equals(s)||(o=o.add(this.z.square().multiply(s)));var a=(o=o.mod(this.curve.q)).square().subtract(e.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.q),h=o.multiply(t).multiply(e).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(o.square().multiply(o)).mod(this.curve.q),l=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new ot(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(h),l)},ot.prototype.multiply=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,i=t,r=i.multiply(new E("3")),n=this.negate(),s=this,o=this.curve.q.subtract(t),a=o.multiply(new E("3")),h=new ot(this.curve,this.x,this.y),l=h.negate();for(e=r.bitLength()-2;e>0;--e){s=s.twice();var u=r.testBit(e);u!=i.testBit(e)&&(s=s.add(u?this:n))}for(e=a.bitLength()-2;e>0;--e){h=h.twice();var c=a.testBit(e);c!=o.testBit(e)&&(h=h.add(c?h:l))}return s},ot.prototype.multiplyTwo=function(t,e,i){var r;r=t.bitLength()>i.bitLength()?t.bitLength()-1:i.bitLength()-1;for(var n=this.curve.getInfinity(),s=this.add(e);r>=0;)n=n.twice(),t.testBit(r)?n=i.testBit(r)?n.add(s):n.add(this):i.testBit(r)&&(n=n.add(e)),--r;return n},at.prototype.getQ=function(){return this.q},at.prototype.getA=function(){return this.a},at.prototype.getB=function(){return this.b},at.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)},at.prototype.getInfinity=function(){return this.infinity},at.prototype.fromBigInteger=function(t){return new st(this.q,t)},at.prototype.decodePointHex=function(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:default:return null;case 4:case 6:case 7:var e=(t.length-2)/2,i=t.substr(2,e),r=t.substr(e+2,e);return new ot(this,this.fromBigInteger(new E(i,16)),this.fromBigInteger(new E(r,16)))}},st.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},ot.prototype.getEncoded=function(t){var e=function(t,e){var i=t.toByteArrayUnsigned();if(e<i.length)i=i.slice(i.length-e);else for(;e>i.length;)i.unshift(0);return i},i=this.getX().toBigInteger(),r=this.getY().toBigInteger(),n=e(i,32);return t?r.isEven()?n.unshift(2):n.unshift(3):(n.unshift(4),n=n.concat(e(r,32))),n},ot.decodeFrom=function(t,e){e[0];var i=e.length-1,r=e.slice(1,1+i/2),n=e.slice(1+i/2,1+i);r.unshift(0),n.unshift(0);var s=new E(r),o=new E(n);return new ot(t,t.fromBigInteger(s),t.fromBigInteger(o))},ot.decodeFromHex=function(t,e){e.substr(0,2);var i=e.length-2,r=e.substr(2,i/2),n=e.substr(2+i/2,i/2),s=new E(r,16),o=new E(n,16);return new ot(t,t.fromBigInteger(s),t.fromBigInteger(o))},ot.prototype.add2D=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;if(this.x.equals(t.x))return this.y.equals(t.y)?this.twice():this.curve.getInfinity();var e=t.x.subtract(this.x),i=t.y.subtract(this.y).divide(e),r=i.square().subtract(this.x).subtract(t.x),n=i.multiply(this.x.subtract(r)).subtract(this.y);return new ot(this.curve,r,n)},ot.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=this.curve.fromBigInteger(E.valueOf(2)),e=this.curve.fromBigInteger(E.valueOf(3)),i=this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(t)),r=i.square().subtract(this.x.multiply(t)),n=i.multiply(this.x.subtract(r)).subtract(this.y);return new ot(this.curve,r,n)},ot.prototype.multiply2D=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,i=t,r=i.multiply(new E("3")),n=this.negate(),s=this;for(e=r.bitLength()-2;e>0;--e){s=s.twice();var o=r.testBit(e);o!=i.testBit(e)&&(s=s.add2D(o?this:n))}return s},ot.prototype.isOnCurve=function(){var t=this.getX().toBigInteger(),e=this.getY().toBigInteger(),i=this.curve.getA().toBigInteger(),r=this.curve.getB().toBigInteger(),n=this.curve.getQ(),s=e.multiply(e).mod(n),o=t.multiply(t).multiply(t).add(i.multiply(t)).add(r).mod(n);return s.equals(o)},ot.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},ot.prototype.validate=function(){var t=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var e=this.getX().toBigInteger(),i=this.getY().toBigInteger();if(e.compareTo(E.ONE)<0||e.compareTo(t.subtract(E.ONE))>0)throw new Error("x coordinate out of bounds");if(i.compareTo(E.ONE)<0||i.compareTo(t.subtract(E.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(t).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var ht=function(){var t=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),e=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function n(t,e,i){return e?r[e]:String.fromCharCode(parseInt(i,16))}var s=new String(""),o=Object.hasOwnProperty;return function(r,a){var h,l,u=r.match(t),c=u[0],d=!1;"{"===c?h={}:"["===c?h=[]:(h=[],d=!0);for(var p=[h],f=1-d,g=u.length;f<g;++f){var v;
vendor: 9,937 bytes, line 2
2switch((c=u[f]).charCodeAt(0)){default:(v=p[0])[l||v.length]=+c,l=void 0;break;case 34:if(-1!==(c=c.substring(1,c.length-1)).indexOf("\\")&&(c=c.replace(e,n)),v=p[0],!l){if(!(v instanceof Array)){l=c||s;break}l=v.length}v[l]=c,l=void 0;break;case 91:v=p[0],p.unshift(v[l||v.length]=[]),l=void 0;break;case 93:case 125:p.shift();break;case 102:(v=p[0])[l||v.length]=!1,l=void 0;break;case 110:(v=p[0])[l||v.length]=null,l=void 0;break;case 116:(v=p[0])[l||v.length]=!0,l=void 0;break;case 123:v=p[0],p.unshift(v[l||v.length]={}),l=void 0}}if(d){if(1!==p.length)throw new Error;h=h[0]}else if(p.length)throw new Error;return a&&(h=function t(e,r){var n=e[r];if(n&&"object"===(void 0===n?"undefined":i(n))){var s=null;for(var h in n)if(o.call(n,h)&&n!==e){var l=t(n,h);void 0!==l?n[h]=l:(s||(s=[]),s.push(h))}if(s)for(var u=s.length;--u>=0;)delete n[s[u]]}return a.call(e,r,n)}({"":h},"")),h}}();void 0!==lt&<||(e.KJUR=lt={}),void 0!==lt.asn1&<.asn1||(lt.asn1={}),lt.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var i=e.substr(1).length;i%2==1?i+=1:e.match(/^[0-7]/)||(i+=2);for(var r="",n=0;n<i;n++)r+="f";e=new E(r,16).xor(t).add(E.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return Dt(t,e)},this.newObject=function(t){var e=lt.asn1,i=e.ASN1Object,r=e.DERBoolean,n=e.DERInteger,s=e.DERBitString,o=e.DEROctetString,a=e.DERNull,h=e.DERObjectIdentifier,l=e.DEREnumerated,u=e.DERUTF8String,c=e.DERNumericString,d=e.DERPrintableString,p=e.DERTeletexString,f=e.DERIA5String,g=e.DERUTCTime,v=e.DERGeneralizedTime,m=e.DERVisibleString,y=e.DERBMPString,_=e.DERSequence,S=e.DERSet,w=e.DERTaggedObject,b=e.ASN1Util.newObject;if(t instanceof e.ASN1Object)return t;var E=Object.keys(t);if(1!=E.length)throw new Error("key of param shall be only one.");var F=E[0];if(-1==":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+F+":"))throw new Error("undefined key: "+F);if("bool"==F)return new r(t[F]);if("int"==F)return new n(t[F]);if("bitstr"==F)return new s(t[F]);if("octstr"==F)return new o(t[F]);if("null"==F)return new a(t[F]);if("oid"==F)return new h(t[F]);if("enum"==F)return new l(t[F]);if("utf8str"==F)return new u(t[F]);if("numstr"==F)return new c(t[F]);if("prnstr"==F)return new d(t[F]);if("telstr"==F)return new p(t[F]);if("ia5str"==F)return new f(t[F]);if("utctime"==F)return new g(t[F]);if("gentime"==F)return new v(t[F]);if("visstr"==F)return new m(t[F]);if("bmpstr"==F)return new y(t[F]);if("asn1"==F)return new i(t[F]);if("seq"==F){for(var x=t[F],C=[],k=0;k<x.length;k++){var D=b(x[k]);C.push(D)}return new _({array:C})}if("set"==F){for(x=t[F],C=[],k=0;k<x.length;k++)D=b(x[k]),C.push(D);return new S({array:C})}if("tag"==F){var A=t[F];if("[object Array]"===Object.prototype.toString.call(A)&&3==A.length){var T=b(A[2]);return new w({tag:A[0],explicit:A[1],obj:T})}return new w(A)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},lt.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",i=parseInt(t.substr(0,2),16),r=(e=Math.floor(i/40)+"."+i%40,""),n=2;n<t.length;n+=2){var s=("00000000"+parseInt(t.substr(n,2),16).toString(2)).slice(-8);r+=s.substr(1,7),"0"==s.substr(0,1)&&(e=e+"."+new E(r,2).toString(10),r="")}return e},lt.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},i=function(t){var i="",r=new E(t,10).toString(2),n=7-r.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";for(r=s+r,o=0;o<r.length-1;o+=7){var a=r.substr(o,7);o!=r.length-7&&(a="1"+a),i+=e(parseInt(a,2))}return i};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);r+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)r+=i(n[o]);return r},lt.asn1.ASN1Object=function(t){this.params=null,this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw new Error("this.hV is null or undefined");if(this.hV.length%2==1)throw new Error("value hex must be even length: n=0,v="+this.hV);var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var i=e.length/2;if(i>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+i).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(t){this.params=t},null!=t&&null!=t.tlv&&(this.hTLV=t.tlv,this.isModified=!1)},lt.asn1.DERAbstractString=function(t){lt.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=wt(this.s).toLowerCase()},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},s.lang.extend(lt.asn1.DERAbstractString,lt.asn1.ASN1Object),lt.asn1.DERAbstractTime=function(t){lt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){var e=t.getTime()+6e4*t.getTimezoneOffset();return new Date(e)},this.formatDate=function(t,e,i){var r=this.zeroPadding,n=this.localDateToUTC(t),s=String(n.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=s+r(String(n.getMonth()+1),2)+r(String(n.getDate()),2)+r(String(n.getHours()),2)+r(String(n.getMinutes()),2)+r(String(n.getSeconds()),2);if(!0===i){var a=n.getMilliseconds();if(0!=a){var h=r(String(a),3);o=o+"."+(h=h.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=vt(t)},this.setByDateValue=function(t,e,i,r,n,s){var o=new Date(Date.UTC(t,e-1,i,r,n,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},s.lang.extend(lt.asn1.DERAbstractTime,lt.asn1.ASN1Object),lt.asn1.DERAbstractStructured=function(t){lt.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},s.lang.extend(lt.asn1.DERAbstractStructured,lt.asn1.ASN1Object),lt.asn1.DERBoolean=function(t){lt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==t?"010100":"0101ff"},s.lang.extend(lt.asn1.DERBoolean,lt.asn1.ASN1Object),lt.asn1.DERInteger=function(t){lt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=lt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new E(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},s.lang.extend(lt.asn1.DERInteger,lt.asn1.ASN1Object),lt.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=lt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}lt.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var i=0;i<=e;i++)t+="0";var r="";for(i=0;i<t.length-1;i+=8){var n=t.substr(i,8),s=parseInt(n,2).toString(16);1==s.length&&(s="0"+s),r+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",i=0;i<t.length;i++)1==t[i]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},s.lang.extend(lt.asn1.DERBitString,lt.asn1.ASN1Object),lt.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=lt.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}lt.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},s.lang.extend(lt.asn1.DEROctetString,lt.asn1.DERAbstractString),lt.asn1.DERNull=function(){lt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},s.lang.extend(lt.asn1.DERNull,lt.asn1.ASN1Object),lt.asn1.DERObjectIdentifier=function(t){lt.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){var e=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},i=function(t){var i="",r=parseInt(t,10).toString(2),n=7-r.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";for(r=s+r,o=0;o<r.length-1;o+=7){var a=r.substr(o,7);
vendor: 42,919 bytes, line 2
2o!=r.length-7&&(a="1"+a),i+=e(parseInt(a,2))}return i};try{if(!t.match(/^[0-9.]+$/))return null;var r="",n=t.split("."),s=40*parseInt(n[0],10)+parseInt(n[1],10);r+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)r+=i(n[o]);return r}catch(t){return null}}(t);if(null==e)throw new Error("malformed oid string: "+t);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueName=function(t){var e=lt.asn1.x509.OID.name2oid(t);if(""===e)throw new Error("DERObjectIdentifier oidName undefined: "+t);this.setValueOidString(e)},this.setValueNameOrOid=function(t){t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(t){"string"==typeof t?this.setValueNameOrOid(t):void 0!==t.oid?this.setValueNameOrOid(t.oid):void 0!==t.name?this.setValueNameOrOid(t.name):void 0!==t.hex&&this.setValueHex(t.hex)},void 0!==t&&this.setByParam(t)},s.lang.extend(lt.asn1.DERObjectIdentifier,lt.asn1.ASN1Object),lt.asn1.DEREnumerated=function(t){lt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=lt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new E(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},s.lang.extend(lt.asn1.DEREnumerated,lt.asn1.ASN1Object),lt.asn1.DERUTF8String=function(t){lt.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},s.lang.extend(lt.asn1.DERUTF8String,lt.asn1.DERAbstractString),lt.asn1.DERNumericString=function(t){lt.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},s.lang.extend(lt.asn1.DERNumericString,lt.asn1.DERAbstractString),lt.asn1.DERPrintableString=function(t){lt.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},s.lang.extend(lt.asn1.DERPrintableString,lt.asn1.DERAbstractString),lt.asn1.DERTeletexString=function(t){lt.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},s.lang.extend(lt.asn1.DERTeletexString,lt.asn1.DERAbstractString),lt.asn1.DERIA5String=function(t){lt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},s.lang.extend(lt.asn1.DERIA5String,lt.asn1.DERAbstractString),lt.asn1.DERVisibleString=function(t){lt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="1a"},s.lang.extend(lt.asn1.DERVisibleString,lt.asn1.DERAbstractString),lt.asn1.DERBMPString=function(t){lt.asn1.DERBMPString.superclass.constructor.call(this,t),this.hT="1e"},s.lang.extend(lt.asn1.DERBMPString,lt.asn1.DERAbstractString),lt.asn1.DERUTCTime=function(t){lt.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=vt(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=vt(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},s.lang.extend(lt.asn1.DERUTCTime,lt.asn1.DERAbstractTime),lt.asn1.DERGeneralizedTime=function(t){lt.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=vt(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=vt(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},s.lang.extend(lt.asn1.DERGeneralizedTime,lt.asn1.DERAbstractTime),lt.asn1.DERSequence=function(t){lt.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++)t+=this.asn1Array[e].getEncodedHex();return this.hV=t,this.hV}},s.lang.extend(lt.asn1.DERSequence,lt.asn1.DERAbstractStructured),lt.asn1.DERSet=function(t){lt.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t.push(i.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},s.lang.extend(lt.asn1.DERSet,lt.asn1.DERAbstractStructured),lt.asn1.DERTaggedObject=function(t){lt.asn1.DERTaggedObject.superclass.constructor.call(this);var e=lt.asn1;this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,i){this.hT=e,this.isExplicit=t,this.asn1Object=i,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=i.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(t){null!=t.tag&&(this.hT=t.tag),null!=t.explicit&&(this.isExplicit=t.explicit),null!=t.tage&&(this.hT=t.tage,this.isExplicit=!0),null!=t.tagi&&(this.hT=t.tagi,this.isExplicit=!1),null!=t.obj&&(t.obj instanceof e.ASN1Object?(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)):"object"==i(t.obj)&&(this.asn1Object=e.ASN1Util.newObject(t.obj),this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},null!=t&&this.setByParam(t)},s.lang.extend(lt.asn1.DERTaggedObject,lt.asn1.ASN1Object);var lt,ut,ct,dt=new function(){};function pt(t){for(var e=new Array,i=0;i<t.length;i++)e[i]=t.charCodeAt(i);return e}function ft(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e}function gt(t){for(var e="",i=0;i<t.length;i++){var r=t[i].toString(16);1==r.length&&(r="0"+r),e+=r}return e}function vt(t){return gt(pt(t))}function mt(t){return(t=(t=t.replace(/\=/g,"")).replace(/\+/g,"-")).replace(/\//g,"_")}function yt(t){return t.length%4==2?t+="==":t.length%4==3&&(t+="="),(t=t.replace(/-/g,"+")).replace(/_/g,"/")}function _t(t){return t.length%2==1&&(t="0"+t),mt(S(t))}function St(t){return w(yt(t))}function wt(t){return It(Ot(t))}function bt(t){return decodeURIComponent(Mt(t))}function Et(t){for(var e="",i=0;i<t.length-1;i+=2)e+=String.fromCharCode(parseInt(t.substr(i,2),16));return e}function Ft(t){for(var e="",i=0;i<t.length;i++)e+=("0"+t.charCodeAt(i).toString(16)).slice(-2);return e}function xt(t){return S(t)}function Ct(t){var e=xt(t).replace(/(.{64})/g,"$1\r\n");return e.replace(/\r\n$/,"")}function kt(t){return w(t.replace(/[^0-9A-Za-z\/+=]*/g,""))}function Dt(t,e){return"-----BEGIN "+e+"-----\r\n"+Ct(t)+"\r\n-----END "+e+"-----\r\n"}function At(t,e){if(-1==t.indexOf("-----BEGIN "))throw"can't find PEM header: "+e;return kt(t=void 0!==e?(t=t.replace(new RegExp("^[^]*-----BEGIN "+e+"-----"),"")).replace(new RegExp("-----END "+e+"-----[^]*$"),""):(t=t.replace(/^[^]*-----BEGIN [^-]+-----/,"")).replace(/-----END [^-]+-----[^]*$/,""))}function Tt(t){var e,i,r,n,s,o,a,h,l,u,c;if(c=t.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/))return h=c[1],e=parseInt(h),2===h.length&&(50<=e&&e<100?e=1900+e:0<=e&&e<50&&(e=2e3+e)),i=parseInt(c[2])-1,r=parseInt(c[3]),n=parseInt(c[4]),s=parseInt(c[5]),o=parseInt(c[6]),a=0,""!==(l=c[7])&&(u=(l.substr(1)+"00").substr(0,3),a=parseInt(u)),Date.UTC(e,i,r,n,s,o,a);throw"unsupported zulu format: "+t}function Pt(t){return~~(Tt(t)/1e3)}function It(t){return t.replace(/%/g,"")}function Mt(t){return t.replace(/(..)/g,"%$1")}function Rt(t){var e="malformed IPv6 address";if(!t.match(/^[0-9A-Fa-f:]+$/))throw e;var i=(t=t.toLowerCase()).split(":").length-1;if(i<2)throw e;var r=":".repeat(7-i+2),n=(t=t.replace("::",r)).split(":");if(8!=n.length)throw e;for(var s=0;s<8;s++)n[s]=("0000"+n[s]).slice(-4);return n.join("")}function Lt(t){if(!t.match(/^[0-9A-Fa-f]{32}$/))throw"malformed IPv6 address octet";for(var e=(t=t.toLowerCase()).match(/.{1,4}/g),i=0;i<8;i++)e[i]=e[i].replace(/^0+/,""),""==e[i]&&(e[i]="0");var r=(t=":"+e.join(":")+":").match(/:(0:){2,}/g);if(null===r)return t.slice(1,-1);var n="";for(i=0;i<r.length;i++)r[i].length>n.length&&(n=r[i]);return(t=t.replace(n,"::")).slice(1,-1)}function Nt(t){var e="malformed hex value";if(!t.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw e;if(8!=t.length)return 32==t.length?Lt(t):t;try{return parseInt(t.substr(0,2),16)+"."+parseInt(t.substr(2,2),16)+"."+parseInt(t.substr(4,2),16)+"."+parseInt(t.substr(6,2),16)}catch(t){throw e}}function Ot(t){for(var e=encodeURIComponent(t),i="",r=0;r<e.length;r++)"%"==e[r]?(i+=e.substr(r,3),r+=2):i=i+"%"+vt(e[r]);return i}function Ht(t){return!(t.length%2!=0||!t.match(/^[0-9a-f]+$/)&&!t.match(/^[0-9A-F]+$/))}function Bt(t){return t.length%2==1?"0"+t:t.substr(0,1)>"7"?"00"+t:t}dt.getLblen=function(t,e){if("8"!=t.substr(e+2,1))return 1;var i=parseInt(t.substr(e+3,1));return 0==i?-1:0<i&&i<10?i+1:-2},dt.getL=function(t,e){var i=dt.getLblen(t,e);return i<1?"":t.substr(e+2,2*i)},dt.getVblen=function(t,e){var i;return""==(i=dt.getL(t,e))?-1:("8"===i.substr(0,1)?new E(i.substr(2),16):new E(i,16)).intValue()},dt.getVidx=function(t,e){var i=dt.getLblen(t,e);return i<0?i:e+2*(i+1)},dt.getV=function(t,e){var i=dt.getVidx(t,e),r=dt.getVblen(t,e);return t.substr(i,2*r)},dt.getTLV=function(t,e){return t.substr(e,2)+dt.getL(t,e)+dt.getV(t,e)},dt.getTLVblen=function(t,e){return 2+2*dt.getLblen(t,e)+2*dt.getVblen(t,e)},dt.getNextSiblingIdx=function(t,e){return dt.getVidx(t,e)+2*dt.getVblen(t,e)},dt.getChildIdx=function(t,e){var i,r,n,s=dt,o=[];i=s.getVidx(t,e),r=2*s.getVblen(t,e),"03"==t.substr(e,2)&&(i+=2,r-=2),n=0;for(var a=i;n<=r;){var h=s.getTLVblen(t,a);if((n+=h)<=r&&o.push(a),a+=h,n>=r)break}return o},dt.getNthChildIdx=function(t,e,i){return dt.getChildIdx(t,e)[i]},dt.getIdxbyList=function(t,e,i,r){var n,s,o=dt;return 0==i.length?void 0!==r&&t.substr(e,2)!==r?-1:e:(n=i.shift())>=(s=o.getChildIdx(t,e)).length?-1:o.getIdxbyList(t,s[n],i,r)},dt.getIdxbyListEx=function(t,e,i,r){var n,s,o=dt;if(0==i.length)return void 0!==r&&t.substr(e,2)!==r?-1:e;n=i.shift(),s=o.getChildIdx(t,e);for(var a=0,h=0;h<s.length;h++){var l=t.substr(s[h],2);if("number"==typeof n&&!o.isContextTag(l)&&a==n||"string"==typeof n&&o.isContextTag(l,n))return o.getIdxbyListEx(t,s[h],i,r);o.isContextTag(l)||a++}return-1},dt.getTLVbyList=function(t,e,i,r){var n=dt,s=n.getIdxbyList(t,e,i,r);return-1==s||s>=t.length?null:n.getTLV(t,s)},dt.getTLVbyListEx=function(t,e,i,r){var n=dt,s=n.getIdxbyListEx(t,e,i,r);return-1==s?null:n.getTLV(t,s)},dt.getVbyList=function(t,e,i,r,n){var s,o,a=dt;return-1==(s=a.getIdxbyList(t,e,i,r))||s>=t.length?null:(o=a.getV(t,s),!0===n&&(o=o.substr(2)),o)},dt.getVbyListEx=function(t,e,i,r,n){var s,o,a=dt;return-1==(s=a.getIdxbyListEx(t,e,i,r))?null:(o=a.getV(t,s),"03"==t.substr(s,2)&&!1!==n&&(o=o.substr(2)),o)},dt.getInt=function(t,e,i){null==i&&(i=-1);try{var r=t.substr(e,2);if("02"!=r&&"03"!=r)return i;var n=dt.getV(t,e);return"02"==r?parseInt(n,16):function(t){try{var e=t.substr(0,2);if("00"==e)return parseInt(t.substr(2),16);var i=parseInt(e,16),r=t.substr(2),n=parseInt(r,16).toString(2);return"0"==n&&(n="00000000"),n=n.slice(0,0-i),parseInt(n,2)}catch(t){return-1}}(n)}catch(t){return i}},dt.getOID=function(t,e,i){null==i&&(i=null);try{return"06"!=t.substr(e,2)?i:function(t){if(!Ht(t))return null;try{var e=[],i=t.substr(0,2),r=parseInt(i,16);e[0]=new String(Math.floor(r/40)),e[1]=new String(r%40);for(var n=t.substr(2),s=[],o=0;o<n.length/2;o++)s.push(parseInt(n.substr(2*o,2),16));var a=[],h="";for(o=0;o<s.length;o++)128&s[o]?h+=jt((127&s[o]).toString(2),7):(h+=jt((127&s[o]).toString(2),7),a.push(new String(parseInt(h,2))),h="");var l=e.join(".");return a.length>0&&(l=l+"."+a.join(".")),l}catch(t){return null}}(dt.getV(t,e))}catch(t){return i}},dt.getOIDName=function(t,e,i){null==i&&(i=null);try{var r=dt.getOID(t,e,i);if(r==i)return i;var n=lt.asn1.x509.OID.oid2name(r);return""==n?r:n}catch(t){return i}},dt.getString=function(t,e,i){null==i&&(i=null);try{return Et(dt.getV(t,e))}catch(t){return i}},dt.hextooidstr=function(t){var e=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},i=[],r=t.substr(0,2),n=parseInt(r,16);i[0]=new String(Math.floor(n/40)),i[1]=new String(n%40);for(var s=t.substr(2),o=[],a=0;a<s.length/2;a++)o.push(parseInt(s.substr(2*a,2),16));var h=[],l="";for(a=0;a<o.length;a++)128&o[a]?l+=e((127&o[a]).toString(2),7):(l+=e((127&o[a]).toString(2),7),h.push(new String(parseInt(l,2))),l="");var u=i.join(".");return h.length>0&&(u=u+"."+h.join(".")),u},dt.dump=function(t,e,i,r){var n=dt,s=n.getV,o=n.dump,a=n.getChildIdx,h=t;t instanceof lt.asn1.ASN1Object&&(h=t.getEncodedHex());var l=function(t,e){return t.length<=2*e?t:t.substr(0,e)+"..(total "+t.length/2+"bytes).."+t.substr(t.length-e,e)};void 0===e&&(e={ommit_long_octet:32}),void 0===i&&(i=0),void 0===r&&(r="");var u,c=e.ommit_long_octet;if("01"==(u=h.substr(i,2)))return"00"==(d=s(h,i))?r+"BOOLEAN FALSE\n":r+"BOOLEAN TRUE\n";if("02"==u)return r+"INTEGER "+l(d=s(h,i),c)+"\n";if("03"==u){var d=s(h,i);return n.isASN1HEX(d.substr(2))?(w=r+"BITSTRING, encapsulates\n")+o(d.substr(2),e,0,r+" "):r+"BITSTRING "+l(d,c)+"\n"}if("04"==u)return d=s(h,i),n.isASN1HEX(d)?(w=r+"OCTETSTRING, encapsulates\n")+o(d,e,0,r+" "):r+"OCTETSTRING "+l(d,c)+"\n";if("05"==u)return r+"NULL\n";if("06"==u){var p=s(h,i),f=lt.asn1.ASN1Util.oidHexToInt(p),g=lt.asn1.x509.OID.oid2name(f),v=f.replace(/\./g," ");return""!=g?r+"ObjectIdentifier "+g+" ("+v+")\n":r+"ObjectIdentifier ("+v+")\n"}if("0a"==u)return r+"ENUMERATED "+parseInt(s(h,i))+"\n";if("0c"==u)return r+"UTF8String '"+bt(s(h,i))+"'\n";if("13"==u)return r+"PrintableString '"+bt(s(h,i))+"'\n";if("14"==u)return r+"TeletexString '"+bt(s(h,i))+"'\n";if("16"==u)return r+"IA5String '"+bt(s(h,i))+"'\n";if("17"==u)return r+"UTCTime "+bt(s(h,i))+"\n";if("18"==u)return r+"GeneralizedTime "+bt(s(h,i))+"\n";if("1a"==u)return r+"VisualString '"+bt(s(h,i))+"'\n";if("1e"==u)return r+"BMPString '"+bt(s(h,i))+"'\n";if("30"==u){if("3000"==h.substr(i,4))return r+"SEQUENCE {}\n";w=r+"SEQUENCE\n";var m=e;if((2==(S=a(h,i)).length||3==S.length)&&"06"==h.substr(S[0],2)&&"04"==h.substr(S[S.length-1],2)){g=n.oidname(s(h,S[0]));var y=JSON.parse(JSON.stringify(e));y.x509ExtName=g,m=y}for(var _=0;_<S.length;_++)w+=o(h,m,S[_],r+" ");return w}if("31"==u){w=r+"SET\n";var S=a(h,i);for(_=0;_<S.length;_++)w+=o(h,e,S[_],r+" ");return w}if(128&(u=parseInt(u,16))){var w,b=31&u;if(32&u){for(w=r+"["+b+"]\n",S=a(h,i),_=0;_<S.length;_++)w+=o(h,e,S[_],r+" ");return w}return d=s(h,i),dt.isASN1HEX(d)?(w=r+"["+b+"]\n")+o(d,e,0,r+" "):(("68747470"==d.substr(0,8)||"subjectAltName"===e.x509ExtName&&2==b)&&(d=bt(d)),r+"["+b+"] "+d+"\n")}return r+"UNKNOWN("+u+") "+s(h,i)+"\n"},dt.isContextTag=function(t,e){var i,r;t=t.toLowerCase();try{i=parseInt(t,16)}catch(t){return-1}if(void 0===e)return 128==(192&i);try{return null!=e.match(/^\[[0-9]+\]$/)&&!((r=parseInt(e.substr(1,e.length-1),10))>31)&&128==(192&i)&&(31&i)==r}catch(t){return!1}},dt.isASN1HEX=function(t){var e=dt;if(t.length%2==1)return!1;var i=e.getVblen(t,0),r=t.substr(0,2),n=e.getL(t,0);return t.length-r.length-n.length==2*i},dt.checkStrictDER=function(t,e,i,r,n){var s=dt;if(void 0===i){if("string"!=typeof t)throw new Error("not hex string");if(t=t.toLowerCase(),!lt.lang.String.isHex(t))throw new Error("not hex string");i=t.length,n=(r=t.length/2)<128?1:Math.ceil(r.toString(16))+1}if(s.getL(t,e).length>2*n)throw new Error("L of TLV too long: idx="+e);var o=s.getVblen(t,e);if(o>r)throw new Error("value of L too long than hex: idx="+e);var a=s.getTLV(t,e),h=a.length-2-s.getL(t,e).length;if(h!==2*o)throw new Error("V string length and L's value not the same:"+h+"/"+2*o);if(0===e&&t.length!=a.length)throw new Error("total length and TLV length unmatch:"+t.length+"!="+a.length);var l=t.substr(e,2);if("02"===l){var u=s.getVidx(t,e);if("00"==t.substr(u,2)&&t.charCodeAt(u+2)<56)throw new Error("not least zeros for DER INTEGER")}if(32&parseInt(l,16)){for(var c=s.getVblen(t,e),d=0,p=s.getChildIdx(t,e),f=0;f<p.length;f++)d+=s.getTLV(t,p[f]).length,s.checkStrictDER(t,p[f],i,r,n);if(2*c!=d)throw new Error("sum of children's TLV length and L unmatch: "+2*c+"!="+d)}},dt.oidname=function(t){var e=lt.asn1;lt.lang.String.isHex(t)&&(t=e.ASN1Util.oidHexToInt(t));var i=e.x509.OID.oid2name(t);return""===i&&(i=t),i},void 0!==lt&<||(e.KJUR=lt={}),void 0!==lt.lang&<.lang||(lt.lang={}),lt.lang.String=function(){},"function"==typeof t?(e.utf8tob64u=ut=function(e){return mt(t.from(e,"utf8").toString("base64"))},e.b64utoutf8=ct=function(e){return t.from(yt(e),"base64").toString("utf8")}):(e.utf8tob64u=ut=function(t){return _t(It(Ot(t)))},e.b64utoutf8=ct=function(t){return decodeURIComponent(Mt(St(t)))}),lt.lang.String.isInteger=function(t){return!!t.match(/^[0-9]+$/)||!!t.match(/^-[0-9]+$/)},lt.lang.String.isHex=function(t){return Ht(t)},lt.lang.String.isBase64=function(t){return!(!(t=t.replace(/\s+/g,"")).match(/^[0-9A-Za-z+\/]+={0,3}$/)||t.length%4!=0)},lt.lang.String.isBase64URL=function(t){return!t.match(/[+/=]/)&&(t=yt(t),lt.lang.String.isBase64(t))},lt.lang.String.isIntegerArray=function(t){return!!(t=t.replace(/\s+/g,"")).match(/^\[[0-9,]+\]$/)},lt.lang.String.isPrintable=function(t){return null!==t.match(/^[0-9A-Za-z '()+,-./:=?]*$/)},lt.lang.String.isIA5=function(t){return null!==t.match(/^[\x20-\x21\x23-\x7f]*$/)},lt.lang.String.isMail=function(t){return null!==t.match(/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]{1,}\.[A-Za-z0-9]{1,}$/)};var jt=function(t,e,i){return null==i&&(i="0"),t.length>=e?t:new Array(e-t.length+1).join(i)+t};void 0!==lt&<||(e.KJUR=lt={}),void 0!==lt.crypto&<.crypto||(lt.crypto={}),lt.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:m.algo.MD5,sha1:m.algo.SHA1,sha224:m.algo.SHA224,sha256:m.algo.SHA256,sha384:m.algo.SHA384,sha512:m.algo.SHA512,ripemd160:m.algo.RIPEMD160},this.getDigestInfoHex=function(t,e){if(void 0===this.DIGESTINFOHEAD[e])throw"alg not supported in Util.DIGESTINFOHEAD: "+e;return this.DIGESTINFOHEAD[e]+t},this.getPaddedDigestInfoHex=function(t,e,i){var r=this.getDigestInfoHex(t,e),n=i/4;if(r.length+22>n)throw"key is too short for SigAlg: keylen="+i+","+e;for(var s="0001",o="00"+r,a="",h=n-4-o.length,l=0;l<h;l+=2)a+="ff";return s+a+o},this.hashString=function(t,e){return new lt.crypto.MessageDigest({alg:e}).digestString(t)},this.hashHex=function(t,e){return new lt.crypto.MessageDigest({alg:e}).digestHex(t)},this.sha1=function(t){return this.hashString(t,"sha1")},this.sha256=function(t){return this.hashString(t,"sha256")},this.sha256Hex=function(t){return this.hashHex(t,"sha256")},this.sha512=function(t){return this.hashString(t,"sha512")},this.sha512Hex=function(t){return this.hashHex(t,"sha512")},this.isKey=function(t){return t instanceof nt||t instanceof lt.crypto.DSA||t instanceof lt.crypto.ECDSA}},lt.crypto.Util.md5=function(t){return new lt.crypto.MessageDigest({alg:"md5",prov:"cryptojs"}).digestString(t)},lt.crypto.Util.ripemd160=function(t){return new lt.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"}).digestString(t)},lt.crypto.Util.SECURERANDOMGEN=new et,lt.crypto.Util.getRandomHexOfNbytes=function(t){var e=new Array(t);return lt.crypto.Util.SECURERANDOMGEN.nextBytes(e),gt(e)},lt.crypto.Util.getRandomBigIntegerOfNbytes=function(t){return new E(lt.crypto.Util.getRandomHexOfNbytes(t),16)},lt.crypto.Util.getRandomHexOfNbits=function(t){var e=t%8,i=new Array((t-e)/8+1);return lt.crypto.Util.SECURERANDOMGEN.nextBytes(i),i[0]=(255<<e&255^255)&i[0],gt(i)},lt.crypto.Util.getRandomBigIntegerOfNbits=function(t){return new E(lt.crypto.Util.getRandomHexOfNbits(t),16)},lt.crypto.Util.getRandomBigIntegerZeroToMax=function(t){for(var e=t.bitLength();;){var i=lt.crypto.Util.getRandomBigIntegerOfNbits(e);if(-1!=t.compareTo(i))return i}},lt.crypto.Util.getRandomBigIntegerMinToMax=function(t,e){var i=t.compareTo(e);if(1==i)throw"biMin is greater than biMax";if(0==i)return t;var r=e.subtract(t);return lt.crypto.Util.getRandomBigIntegerZeroToMax(r).add(t)},lt.crypto.MessageDigest=function(t){this.setAlgAndProvider=function(t,e){if(null!==(t=lt.crypto.MessageDigest.getCanonicalAlgName(t))&&void 0===e&&(e=lt.crypto.Util.DEFAULTPROVIDER[t]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(t)&&"cryptojs"==e){try{this.md=lt.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[t].create()}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=m.enc.Hex.parse(t);this.md.update(e)},this.digest=function(){return this.md.finalize().toString(m.enc.Hex)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}if(-1!=":sha256:".indexOf(t)&&"sjcl"==e){try{this.md=new sjcl.hash.sha256}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=sjcl.codec.hex.toBits(t);this.md.update(e)},this.digest=function(){var t=this.md.finalize();return sjcl.codec.hex.fromBits(t)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},void 0!==t&&void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=lt.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},lt.crypto.MessageDigest.getCanonicalAlgName=function(t){return"string"==typeof t&&(t=(t=t.toLowerCase()).replace(/-/,"")),t},lt.crypto.MessageDigest.getHashLength=function(t){var e=lt.crypto.MessageDigest,i=e.getCanonicalAlgName(t);if(void 0===e.HASHLENGTH[i])throw"not supported algorithm: "+t;return e.HASHLENGTH[i]},lt.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20},lt.crypto.Mac=function(t){this.setAlgAndProvider=function(t,e){if(null==(t=t.toLowerCase())&&(t="hmacsha1"),"hmac"!=(t=t.toLowerCase()).substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+t;void 0===e&&(e=lt.crypto.Util.DEFAULTPROVIDER[t]),this.algProv=t+"/"+e;var i=t.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(i)&&"cryptojs"==e){try{var r=lt.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[i];this.mac=m.algo.HMAC.create(r,this.pass)}catch(t){throw"setAlgAndProvider hash alg set fail hashAlg="+i+"/"+t}this.updateString=function(t){this.mac.update(t)},this.updateHex=function(t){var e=m.enc.Hex.parse(t);this.mac.update(e)},this.doFinal=function(){return this.mac.finalize().toString(m.enc.Hex)},this.doFinalString=function(t){return this.updateString(t),this.doFinal()},this.doFinalHex=function(t){return this.updateHex(t),this.doFinal()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(t){if("string"==typeof t){var e=t;return t.length%2!=1&&t.match(/^[0-9A-Fa-f]+$/)||(e=Ft(t)),void(this.pass=m.enc.Hex.parse(e))}if("object"!=(void 0===t?"undefined":i(t)))throw"KJUR.crypto.Mac unsupported password type: "+t;if(e=null,void 0!==t.hex){if(t.hex.length%2!=0||!t.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+t.hex;e=t.hex}if(void 0!==t.utf8&&(e=wt(t.utf8)),void 0!==t.rstr&&(e=Ft(t.rstr)),void 0!==t.b64&&(e=w(t.b64)),void 0!==t.b64u&&(e=St(t.b64u)),null==e)throw"KJUR.crypto.Mac unsupported password type: "+t;this.pass=m.enc.Hex.parse(e)},void 0!==t&&(void 0!==t.pass&&this.setPassword(t.pass),void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=lt.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},lt.crypto.Signature=function(t){var e=null;if(this._setAlgNames=function(){var t=this.algName.match(/^(.+)with(.+)$/);t&&(this.mdAlgName=t[1].toLowerCase(),this.pubkeyAlgName=t[2].toLowerCase(),"rsaandmgf1"==this.pubkeyAlgName&&"sha"==this.mdAlgName&&(this.mdAlgName="sha1"))},this._zeroPaddingOfSignature=function(t,e){for(var i="",r=e/4-t.length,n=0;n<r;n++)i+="0";return i+t},this.setAlgAndProvider=function(t,e){if(this._setAlgNames(),"cryptojs/jsrsa"!=e)throw new Error("provider not supported: "+e);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)){try{this.md=new lt.crypto.MessageDigest({alg:this.mdAlgName})}catch(t){throw new Error("setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+t)}this.init=function(t,e){var i=null;try{i=void 0===e?Ut.getKey(t):Ut.getKey(t,e)}catch(t){throw"init failed:"+t}if(!0===i.isPrivate)this.prvKey=i,this.state="SIGN";else{if(!0!==i.isPublic)throw"init failed.:"+i;this.pubKey=i,this.state="VERIFY"}},this.updateString=function(t){this.md.updateString(t)},this.updateHex=function(t){this.md.updateHex(t)},this.sign=function(){if(this.sHashHex=this.md.digest(),void 0===this.prvKey&&void 0!==this.ecprvhex&&void 0!==this.eccurvename&&void 0!==lt.crypto.ECDSA&&(this.prvKey=new lt.crypto.ECDSA({curve:this.eccurvename,prv:this.ecprvhex})),this.prvKey instanceof nt&&"rsaandmgf1"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof nt&&"rsa"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof lt.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else{if(!(this.prvKey instanceof lt.crypto.DSA))throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;this.hSign=this.prvKey.signWithMessageHash(this.sHashHex)}return this.hSign},this.signString=function(t){return this.updateString(t),this.sign()},this.signHex=function(t){return this.updateHex(t),this.sign()},this.verify=function(t){if(this.sHashHex=this.md.digest(),void 0===this.pubKey&&void 0!==this.ecpubhex&&void 0!==this.eccurvename&&void 0!==lt.crypto.ECDSA&&(this.pubKey=new lt.crypto.ECDSA({curve:this.eccurvename,pub:this.ecpubhex})),this.pubKey instanceof nt&&"rsaandmgf1"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,t,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof nt&&"rsa"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(void 0!==lt.crypto.ECDSA&&this.pubKey instanceof lt.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(void 0!==lt.crypto.DSA&&this.pubKey instanceof lt.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(t,e){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(t){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(t){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(t){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(t){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=t,void 0!==t&&(void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov?this.provName=lt.crypto.Util.DEFAULTPROVIDER[this.algName]:this.provName=t.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),void 0!==t.psssaltlen&&(this.pssSaltLen=t.psssaltlen),void 0!==t.prvkeypem)){if(void 0!==t.prvkeypas)throw"both prvkeypem and prvkeypas parameters not supported";try{e=Ut.getKey(t.prvkeypem),this.init(e)}catch(t){throw"fatal error to load pem private key: "+t}}},lt.crypto.Cipher=function(t){},lt.crypto.Cipher.encrypt=function(t,e,i){if(e instanceof nt&&e.isPublic){var r=lt.crypto.Cipher.getAlgByKeyAndName(e,i);if("RSA"===r)return e.encrypt(t);if("RSAOAEP"===r)return e.encryptOAEP(t,"sha1");var n=r.match(/^RSAOAEP(\d+)$/);if(null!==n)return e.encryptOAEP(t,"sha"+n[1]);throw"Cipher.encrypt: unsupported algorithm for RSAKey: "+i}throw"Cipher.encrypt: unsupported key or algorithm"},lt.crypto.Cipher.decrypt=function(t,e,i){if(e instanceof nt&&e.isPrivate){var r=lt.crypto.Cipher.getAlgByKeyAndName(e,i);if("RSA"===r)return e.decrypt(t);if("RSAOAEP"===r)return e.decryptOAEP(t,"sha1");var n=r.match(/^RSAOAEP(\d+)$/);if(null!==n)return e.decryptOAEP(t,"sha"+n[1]);throw"Cipher.decrypt: unsupported algorithm for RSAKey: "+i}throw"Cipher.decrypt: unsupported key or algorithm"},lt.crypto.Cipher.getAlgByKeyAndName=function(t,e){if(t instanceof nt){if(-1!=":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(e))return e;if(null==e)return"RSA";throw"getAlgByKeyAndName: not supported algorithm name for RSAKey: "+e}throw"getAlgByKeyAndName: not supported algorithm name: "+e},lt.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040023":"secp521r1","2b81040022":"secp384r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}},void 0!==lt&<||(e.KJUR=lt={}),void 0!==lt.crypto&<.crypto||(lt.crypto={}),lt.crypto.ECDSA=function(t){var e=Error,r=E,n=ot,s=lt.crypto.ECDSA,o=lt.crypto.ECParameterDB,a=s.getName,h=dt,l=h.getVbyListEx,u=h.isASN1HEX,c=new et;this.type="EC",this.isPrivate=!1,this.isPublic=!1,this.getBigRandom=function(t){return new r(t.bitLength(),c).mod(t.subtract(r.ONE)).add(r.ONE)},this.setNamedCurve=function(t){this.ecparams=o.getByName(t),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=t},this.setPrivateKeyHex=function(t){this.isPrivate=!0,this.prvKeyHex=t},this.setPublicKeyHex=function(t){this.isPublic=!0,this.pubKeyHex=t},this.getPublicKeyXYHex=function(){var t=this.pubKeyHex;if("04"!==t.substr(0,2))throw"this method supports uncompressed format(04) only";var e=this.ecparams.keylen/4;if(t.length!==2+2*e)throw"malformed public key hex length";var i={};return i.x=t.substr(2,e),i.y=t.substr(2+e),i},this.getShortNISTPCurveName=function(){var t=this.curveName;return"secp256r1"===t||"NIST P-256"===t||"P-256"===t||"prime256v1"===t?"P-256":"secp384r1"===t||"NIST P-384"===t||"P-384"===t?"P-384":null},this.generateKeyPairHex=function(){var t=this.ecparams.n,e=this.getBigRandom(t),i=this.ecparams.G.multiply(e),r=i.getX().toBigInteger(),n=i.getY().toBigInteger(),s=this.ecparams.keylen/4,o=("0000000000"+e.toString(16)).slice(-s),a="04"+("0000000000"+r.toString(16)).slice(-s)+("0000000000"+n.toString(16)).slice(-s);return this.setPrivateKeyHex(o),this.setPublicKeyHex(a),{ecprvhex:o,ecpubhex:a}},this.signWithMessageHash=function(t){return this.signHex(t,this.prvKeyHex)},this.signHex=function(t,e){var i=new r(e,16),n=this.ecparams.n,o=new r(t.substring(0,this.ecparams.keylen/4),16);do{var a=this.getBigRandom(n),h=this.ecparams.G.multiply(a).getX().toBigInteger().mod(n)}while(h.compareTo(r.ZERO)<=0);var l=a.modInverse(n).multiply(o.add(i.multiply(h))).mod(n);return s.biRSSigToASN1Sig(h,l)},this.sign=function(t,e){var i=e,n=this.ecparams.n,s=r.fromByteArrayUnsigned(t);do{var o=this.getBigRandom(n),a=this.ecparams.G.multiply(o).getX().toBigInteger().mod(n)}while(a.compareTo(E.ZERO)<=0);var h=o.modInverse(n).multiply(s.add(i.multiply(a))).mod(n);return this.serializeSig(a,h)},this.verifyWithMessageHash=function(t,e){return this.verifyHex(t,e,this.pubKeyHex)},this.verifyHex=function(t,e,i){try{var o,a,h=s.parseSigHex(e);o=h.r,a=h.s;var l=n.decodeFromHex(this.ecparams.curve,i),u=new r(t.substring(0,this.ecparams.keylen/4),16);return this.verifyRaw(u,o,a,l)}catch(t){return!1}},this.verify=function(t,e,s){var o,a,h;if(Bitcoin.Util.isArray(e)){var l=this.parseSig(e);o=l.r,a=l.s}else{if("object"!==(void 0===e?"undefined":i(e))||!e.r||!e.s)throw"Invalid value for signature";o=e.r,a=e.s}if(s instanceof ot)h=s;else{if(!Bitcoin.Util.isArray(s))throw"Invalid format for pubkey value, must be byte array or ECPointFp";h=n.decodeFrom(this.ecparams.curve,s)}var u=r.fromByteArrayUnsigned(t);return this.verifyRaw(u,o,a,h)},this.verifyRaw=function(t,e,i,n){var s=this.ecparams.n,o=this.ecparams.G;if(e.compareTo(r.ONE)<0||e.compareTo(s)>=0)return!1;if(i.compareTo(r.ONE)<0||i.compareTo(s)>=0)return!1;var a=i.modInverse(s),h=t.multiply(a).mod(s),l=e.multiply(a).mod(s);return o.multiply(h).add(n.multiply(l)).getX().toBigInteger().mod(s).equals(e)},this.serializeSig=function(t,e){var i=t.toByteArraySigned(),r=e.toByteArraySigned(),n=[];return n.push(2),n.push(i.length),(n=n.concat(i)).push(2),n.push(r.length),(n=n.concat(r)).unshift(n.length),n.unshift(48),n},this.parseSig=function(t){var e;if(48!=t[0])throw new Error("Signature not a valid DERSequence");if(2!=t[e=2])throw new Error("First element in signature must be a DERInteger");var i=t.slice(e+2,e+2+t[e+1]);if(2!=t[e+=2+t[e+1]])throw new Error("Second element in signature must be a DERInteger");var n=t.slice(e+2,e+2+t[e+1]);return e+=2+t[e+1],{r:r.fromByteArrayUnsigned(i),s:r.fromByteArrayUnsigned(n)}},this.parseSigCompact=function(t){if(65!==t.length)throw"Signature has the wrong length";var e=t[0]-27;if(e<0||e>7)throw"Invalid signature type";var i=this.ecparams.n;return{r:r.fromByteArrayUnsigned(t.slice(1,33)).mod(i),s:r.fromByteArrayUnsigned(t.slice(33,65)).mod(i),i:e}},this.readPKCS5PrvKeyHex=function(t){if(!1===u(t))throw new Error("not ASN.1 hex string");var e,i,r;try{e=l(t,0,["[0]",0],"06"),i=l(t,0,[1],"04");try{r=l(t,0,["[1]",0],"03")}catch(t){}}catch(t){throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=a(e),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(r),this.setPrivateKeyHex(i),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(t){if(!1===u(t))throw new e("not ASN.1 hex string");var i,r,n;try{l(t,0,[1,0],"06"),i=l(t,0,[1,1],"06"),r=l(t,0,[2,0,1],"04");try{n=l(t,0,[2,0,"[1]",0],"03")}catch(t){}}catch(t){throw new e("malformed PKCS#8 plain ECC private key")}if(this.curveName=a(i),void 0===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PubKeyHex=function(t){if(!1===u(t))throw new e("not ASN.1 hex string");var i,r;try{l(t,0,[0,0],"06"),i=l(t,0,[0,1],"06"),r=l(t,0,[1],"03")}catch(t){throw new e("malformed PKCS#8 ECC public key")}if(this.curveName=a(i),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(r)},this.readCertPubKeyHex=function(t,i){if(!1===u(t))throw new e("not ASN.1 hex string");var r,n;try{r=l(t,0,[0,5,0,1],"06"),n=l(t,0,[0,5,1],"03")}catch(t){throw new e("malformed X.509 certificate ECC public key")}if(this.curveName=a(r),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},void 0!==t&&void 0!==t.curve&&(this.curveName=t.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==t&&(void 0!==t.prv&&this.setPrivateKeyHex(t.prv),void 0!==t.pub&&this.setPublicKeyHex(t.pub))},lt.crypto.ECDSA.parseSigHex=function(t){var e=lt.crypto.ECDSA.parseSigHexInHexRS(t);return{r:new E(e.r,16),s:new E(e.s,16)}},lt.crypto.ECDSA.parseSigHexInHexRS=function(t){var e=dt,i=e.getChildIdx,r=e.getV;if(e.checkStrictDER(t,0),"30"!=t.substr(0,2))throw new Error("signature is not a ASN.1 sequence");var n=i(t,0);if(2!=n.length)throw new Error("signature shall have two elements");var s=n[0],o=n[1];if("02"!=t.substr(s,2))throw new Error("1st item not ASN.1 integer");if("02"!=t.substr(o,2))throw new Error("2nd item not ASN.1 integer");return{r:r(t,s),s:r(t,o)}},lt.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=lt.crypto.ECDSA.parseSigHexInHexRS(t),i=e.r,r=e.s;if("00"==i.substr(0,2)&&i.length%32==2&&(i=i.substr(2)),"00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),i.length%32==30&&(i="00"+i),r.length%32==30&&(r="00"+r),i.length%32!=0)throw"unknown ECDSA sig r length error";if(r.length%32!=0)throw"unknown ECDSA sig s length error";return i+r},lt.crypto.ECDSA.concatSigToASN1Sig=function(t){if(t.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig length error";var e=t.substr(0,t.length/2),i=t.substr(t.length/2);return lt.crypto.ECDSA.hexRSSigToASN1Sig(e,i)},lt.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var i=new E(t,16),r=new E(e,16);return lt.crypto.ECDSA.biRSSigToASN1Sig(i,r)},lt.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var i=lt.asn1,r=new i.DERInteger({bigint:t}),n=new i.DERInteger({bigint:e});return new i.DERSequence({array:[r,n]}).getEncodedHex()},lt.crypto.ECDSA.getName=function(t){return"2b8104001f"===t?"secp192k1":"2a8648ce3d030107"===t?"secp256r1":"2b8104000a"===t?"secp256k1":"2b81040021"===t?"secp224r1":"2b81040022"===t?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(t)?"secp256r1":-1!=="|secp256k1|".indexOf(t)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(t)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(t)?"secp384r1":null},void 0!==lt&<||(e.KJUR=lt={}),void 0!==lt.crypto&<.crypto||(lt.crypto={}),lt.crypto.ECParameterDB=new function(){var t={},e={};function i(t){return new E(t,16)}this.getByName=function(i){var r=i;if(void 0!==e[r]&&(r=e[i]),void 0!==t[r])return t[r];throw"unregistered EC curve name: "+r},this.regist=function(r,n,s,o,a,h,l,u,c,d,p,f){t[r]={};var g=i(s),v=i(o),m=i(a),y=i(h),_=i(l),S=new at(g,v,m),w=S.decodePointHex("04"+u+c);t[r].name=r,t[r].keylen=n,t[r].curve=S,t[r].G=w,t[r].n=y,t[r].h=_,t[r].oid=p,t[r].info=f;for(var b=0;b<d.length;b++)e[d[b]]=r}},lt.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field"),lt.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field"),lt.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field"),lt.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]),lt.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]),lt.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]),lt.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCB
2BAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]),lt.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]),lt.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]),lt.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]);var Ut=function(){var t=function(t,i,r){return e(m.AES,t,i,r)},e=function(t,e,i,r){var n=m.enc.Hex.parse(e),s=m.enc.Hex.parse(i),o=m.enc.Hex.parse(r),a={};a.key=s,a.iv=o,a.ciphertext=n;var h=t.decrypt(a,s,{iv:o});return m.enc.Hex.stringify(h)},i=function(t,e,i){return r(m.AES,t,e,i)},r=function(t,e,i,r){var n=m.enc.Hex.parse(e),s=m.enc.Hex.parse(i),o=m.enc.Hex.parse(r),a=t.encrypt(n,s,{iv:o}),h=m.enc.Hex.parse(a.toString());return m.enc.Base64.stringify(h)},n={"AES-256-CBC":{proc:t,eproc:i,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:i,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:i,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function(t,i,r){return e(m.TripleDES,t,i,r)},eproc:function(t,e,i){return r(m.TripleDES,t,e,i)},keylen:24,ivlen:8},"DES-CBC":{proc:function(t,i,r){return e(m.DES,t,i,r)},eproc:function(t,e,i){return r(m.DES,t,e,i)},keylen:8,ivlen:8}},s=function(t){var e={},i=t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));i&&(e.cipher=i[1],e.ivsalt=i[2]);var r=t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));r&&(e.type=r[1]);var n=-1,s=0;-1!=t.indexOf("\r\n\r\n")&&(n=t.indexOf("\r\n\r\n"),s=2),-1!=t.indexOf("\n\n")&&(n=t.indexOf("\n\n"),s=1);var o=t.indexOf("-----END");if(-1!=n&&-1!=o){var a=t.substring(n+2*s,o-s);a=a.replace(/\s+/g,""),e.data=a}return e},o=function(t,e,i){for(var r=i.substring(0,16),s=m.enc.Hex.parse(r),o=m.enc.Utf8.parse(e),a=n[t].keylen+n[t].ivlen,h="",l=null;;){var u=m.algo.MD5.create();if(null!=l&&u.update(l),u.update(o),u.update(s),l=u.finalize(),(h+=m.enc.Hex.stringify(l)).length>=2*a)break}var c={};return c.keyhex=h.substr(0,2*n[t].keylen),c.ivhex=h.substr(2*n[t].keylen,2*n[t].ivlen),c},a=function(t,e,i,r){var s=m.enc.Base64.parse(t),o=m.enc.Hex.stringify(s);return(0,n[e].proc)(o,i,r)};return{version:"1.0.0",parsePKCS5PEM:function(t){return s(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,i){return o(t,e,i)},decryptKeyB64:function(t,e,i,r){return a(t,e,i,r)},getDecryptedKeyHex:function(t,e){var i=s(t),r=(i.type,i.cipher),n=i.ivsalt,h=i.data,l=o(r,e,n).keyhex;return a(h,r,l,n)}
vendor: 51,518 bytes, line 2
2,getEncryptedPKCS5PEMFromPrvKeyHex:function(t,e,i,r,s){var a="";if(void 0!==r&&null!=r||(r="AES-256-CBC"),void 0===n[r])throw"KEYUTIL unsupported algorithm: "+r;void 0!==s&&null!=s||(s=function(t){var e=m.lib.WordArray.random(t);return m.enc.Hex.stringify(e)}(n[r].ivlen).toUpperCase());var h=function(t,e,i,r){return(0,n[e].eproc)(t,i,r)}(e,r,o(r,i,s).keyhex,s);return a="-----BEGIN "+t+" PRIVATE KEY-----\r\n",a+="Proc-Type: 4,ENCRYPTED\r\n",a+="DEK-Info: "+r+","+s+"\r\n",a+="\r\n",(a+=h.replace(/(.{64})/g,"$1\r\n"))+"\r\n-----END "+t+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(t){var e=dt,i=e.getChildIdx,r=e.getV,n={},s=i(t,0);if(2!=s.length)throw"malformed format: SEQUENCE(0).items != 2: "+s.length;n.ciphertext=r(t,s[1]);var o=i(t,s[0]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+o.length;if("2a864886f70d01050d"!=r(t,o[0]))throw"this only supports pkcs5PBES2";var a=i(t,o[1]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+a.length;var h=i(t,a[1]);if(2!=h.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+h.length;if("2a864886f70d0307"!=r(t,h[0]))throw"this only supports TripleDES";n.encryptionSchemeAlg="TripleDES",n.encryptionSchemeIV=r(t,h[1]);var l=i(t,a[0]);if(2!=l.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+l.length;if("2a864886f70d01050c"!=r(t,l[0]))throw"this only supports pkcs5PBKDF2";var u=i(t,l[1]);if(u.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+u.length;n.pbkdf2Salt=r(t,u[0]);var c=r(t,u[1]);try{n.pbkdf2Iter=parseInt(c,16)}catch(t){throw"malformed format pbkdf2Iter: "+c}return n},getPBKDF2KeyHexFromParam:function(t,e){var i=m.enc.Hex.parse(t.pbkdf2Salt),r=t.pbkdf2Iter,n=m.PBKDF2(e,i,{keySize:6,iterations:r});return m.enc.Hex.stringify(n)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var i=At(t,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(i),n=Ut.getPBKDF2KeyHexFromParam(r,e),s={};s.ciphertext=m.enc.Hex.parse(r.ciphertext);var o=m.enc.Hex.parse(n),a=m.enc.Hex.parse(r.encryptionSchemeIV),h=m.TripleDES.decrypt(s,o,{iv:a});return m.enc.Hex.stringify(h)},getKeyFromEncryptedPKCS8PEM:function(t,e){var i=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e);return this.getKeyFromPlainPrivatePKCS8Hex(i)},parsePlainPrivatePKCS8Hex:function(t){var e=dt,i=e.getChildIdx,r=e.getV,n={algparam:null};if("30"!=t.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var s=i(t,0);if(3!=s.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=t.substr(s[1],2))throw"malformed PKCS8 private key(code:003)";var o=i(t,s[1]);if(2!=o.length)throw"malformed PKCS8 private key(code:004)";if("06"!=t.substr(o[0],2))throw"malformed PKCS8 private key(code:005)";if(n.algoid=r(t,o[0]),"06"==t.substr(o[1],2)&&(n.algparam=r(t,o[1])),"04"!=t.substr(s[2],2))throw"malformed PKCS8 private key(code:006)";return n.keyidx=e.getVidx(t,s[2]),n},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=At(t,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(e)},getKeyFromPlainPrivatePKCS8Hex:function(t){var e,i=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==i.algoid)e=new nt;else if("2a8648ce380401"==i.algoid)e=new lt.crypto.DSA;else{if("2a8648ce3d0201"!=i.algoid)throw"unsupported private key algorithm";e=new lt.crypto.ECDSA}return e.readPKCS8PrvKeyHex(t),e},_getKeyFromPublicPKCS8Hex:function(t){var e,i=dt.getVbyList(t,0,[0,0],"06");if("2a864886f70d010101"===i)e=new nt;else if("2a8648ce380401"===i)e=new lt.crypto.DSA;else{if("2a8648ce3d0201"!==i)throw"unsupported PKCS#8 public key hex";e=new lt.crypto.ECDSA}return e.readPKCS8PubKeyHex(t),e},parsePublicRawRSAKeyHex:function(t){var e=dt,i=e.getChildIdx,r=e.getV,n={};if("30"!=t.substr(0,2))throw"malformed RSA key(code:001)";var s=i(t,0);if(2!=s.length)throw"malformed RSA key(code:002)";if("02"!=t.substr(s[0],2))throw"malformed RSA key(code:003)";if(n.n=r(t,s[0]),"02"!=t.substr(s[1],2))throw"malformed RSA key(code:004)";return n.e=r(t,s[1]),n},parsePublicPKCS8Hex:function(t){var e=dt,i=e.getChildIdx,r=e.getV,n={algparam:null},s=i(t,0);if(2!=s.length)throw"outer DERSequence shall have 2 elements: "+s.length;var o=s[0];if("30"!=t.substr(o,2))throw"malformed PKCS8 public key(code:001)";var a=i(t,o);if(2!=a.length)throw"malformed PKCS8 public key(code:002)";if("06"!=t.substr(a[0],2))throw"malformed PKCS8 public key(code:003)";if(n.algoid=r(t,a[0]),"06"==t.substr(a[1],2)?n.algparam=r(t,a[1]):"30"==t.substr(a[1],2)&&(n.algparam={},n.algparam.p=e.getVbyList(t,a[1],[0],"02"),n.algparam.q=e.getVbyList(t,a[1],[1],"02"),n.algparam.g=e.getVbyList(t,a[1],[2],"02")),"03"!=t.substr(s[1],2))throw"malformed PKCS8 public key(code:004)";return n.key=r(t,s[1]).substr(2),n}}}();Ut.getKey=function(t,e,i){var r,n=(m=dt).getChildIdx,s=(m.getV,m.getVbyList),o=lt.crypto,a=o.ECDSA,h=o.DSA,l=nt,u=At,c=Ut;if(void 0!==l&&t instanceof l)return t;if(void 0!==a&&t instanceof a)return t;if(void 0!==h&&t instanceof h)return t;if(void 0!==t.curve&&void 0!==t.xy&&void 0===t.d)return new a({pub:t.xy,curve:t.curve});if(void 0!==t.curve&&void 0!==t.d)return new a({prv:t.d,curve:t.curve});if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d)return(A=new l).setPublic(t.n,t.e),A;if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.co&&void 0===t.qi)return(A=new l).setPrivateEx(t.n,t.e,t.d,t.p,t.q,t.dp,t.dq,t.co),A;if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0===t.p)return(A=new l).setPrivate(t.n,t.e,t.d),A;if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0===t.x)return(A=new h).setPublic(t.p,t.q,t.g,t.y),A;if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0!==t.x)return(A=new h).setPrivate(t.p,t.q,t.g,t.y,t.x),A;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d)return(A=new l).setPublic(St(t.n),St(t.e)),A;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.qi)return(A=new l).setPrivateEx(St(t.n),St(t.e),St(t.d),St(t.p),St(t.q),St(t.dp),St(t.dq),St(t.qi)),A;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d)return(A=new l).setPrivate(St(t.n),St(t.e),St(t.d)),A;if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0===t.d){var d=(D=new a({curve:t.crv})).ecparams.keylen/4,p="04"+("0000000000"+St(t.x)).slice(-d)+("0000000000"+St(t.y)).slice(-d);return D.setPublicKeyHex(p),D}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0!==t.d){d=(D=new a({curve:t.crv})).ecparams.keylen/4,p="04"+("0000000000"+St(t.x)).slice(-d)+("0000000000"+St(t.y)).slice(-d);var f=("0000000000"+St(t.d)).slice(-d);return D.setPublicKeyHex(p),D.setPrivateKeyHex(f),D}if("pkcs5prv"===i){var g,v=t,m=dt;if(9===(g=n(v,0)).length)(A=new l).readPKCS5PrvKeyHex(v);else if(6===g.length)(A=new h).readPKCS5PrvKeyHex(v);else{if(!(g.length>2&&"04"===v.substr(g[1],2)))throw"unsupported PKCS#1/5 hexadecimal key";(A=new a).readPKCS5PrvKeyHex(v)}return A}if("pkcs8prv"===i)return c.getKeyFromPlainPrivatePKCS8Hex(t);if("pkcs8pub"===i)return c._getKeyFromPublicPKCS8Hex(t);if("x509pub"===i)return Wt.getPublicKeyFromCertHex(t);if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return Wt.getPublicKeyFromCertPEM(t);if(-1!=t.indexOf("-END PUBLIC KEY-")){var y=At(t,"PUBLIC KEY");return c._getKeyFromPublicPKCS8Hex(y)}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var _=u(t,"RSA PRIVATE KEY");return c.getKey(_,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var S=s(r=u(t,"DSA PRIVATE KEY"),0,[1],"02"),w=s(r,0,[2],"02"),b=s(r,0,[3],"02"),F=s(r,0,[4],"02"),x=s(r,0,[5],"02");return(A=new h).setPrivate(new E(S,16),new E(w,16),new E(b,16),new E(F,16),new E(x,16)),A}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED"))return _=u(t,"EC PRIVATE KEY"),c.getKey(_,null,"pkcs5prv");if(-1!=t.indexOf("-END PRIVATE KEY-"))return c.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var C=c.getDecryptedKeyHex(t,e),k=new nt;return k.readPKCS5PrvKeyHex(C),k}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var D,A=s(r=c.getDecryptedKeyHex(t,e),0,[1],"04"),T=s(r,0,[2,0],"06"),P=s(r,0,[3,0],"03").substr(2);if(void 0===lt.crypto.OID.oidhex2name[T])throw"undefined OID(hex) in KJUR.crypto.OID: "+T;return(D=new a({curve:lt.crypto.OID.oidhex2name[T]})).setPublicKeyHex(P),D.setPrivateKeyHex(A),D.isPublic=!1,D}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED"))return S=s(r=c.getDecryptedKeyHex(t,e),0,[1],"02"),w=s(r,0,[2],"02"),b=s(r,0,[3],"02"),F=s(r,0,[4],"02"),x=s(r,0,[5],"02"),(A=new h).setPrivate(new E(S,16),new E(w,16),new E(b,16),new E(F,16),new E(x,16)),A;if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return c.getKeyFromEncryptedPKCS8PEM(t,e);throw new Error("not supported argument")},Ut.generateKeypair=function(t,e){if("RSA"==t){var i=e;(o=new nt).generate(i,"10001"),o.isPrivate=!0,o.isPublic=!0;var r=new nt,n=o.n.toString(16),s=o.e.toString(16);return r.setPublic(n,s),r.isPrivate=!1,r.isPublic=!0,(a={}).prvKeyObj=o,a.pubKeyObj=r,a}if("EC"==t){var o,a,h=e,l=new lt.crypto.ECDSA({curve:h}).generateKeyPairHex();return(o=new lt.crypto.ECDSA({curve:h})).setPublicKeyHex(l.ecpubhex),o.setPrivateKeyHex(l.ecprvhex),o.isPrivate=!0,o.isPublic=!1,(r=new lt.crypto.ECDSA({curve:h})).setPublicKeyHex(l.ecpubhex),r.isPrivate=!1,r.isPublic=!0,(a={}).prvKeyObj=o,a.pubKeyObj=r,a}throw"unknown algorithm: "+t},Ut.getPEM=function(t,e,i,r,n,s){var o=lt,a=o.asn1,h=a.DERObjectIdentifier,l=a.DERInteger,u=a.ASN1Util.newObject,c=a.x509.SubjectPublicKeyInfo,d=o.crypto,p=d.DSA,f=d.ECDSA,g=nt;function v(t){return u({seq:[{int:0},{int:{bigint:t.n}},{int:t.e},{int:{bigint:t.d}},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.dmp1}},{int:{bigint:t.dmq1}},{int:{bigint:t.coeff}}]})}function y(t){return u({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]})}function _(t){return u({seq:[{int:0},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}},{int:{bigint:t.y}},{int:{bigint:t.x}}]})}if((void 0!==g&&t instanceof g||void 0!==p&&t instanceof p||void 0!==f&&t instanceof f)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e))return Dt(E=new c(t).getEncodedHex(),"PUBLIC KEY");if("PKCS1PRV"==e&&void 0!==g&&t instanceof g&&(void 0===i||null==i)&&1==t.isPrivate)return Dt(E=v(t).getEncodedHex(),"RSA PRIVATE KEY");if("PKCS1PRV"==e&&void 0!==f&&t instanceof f&&(void 0===i||null==i)&&1==t.isPrivate){var S=new h({name:t.curveName}).getEncodedHex(),w=y(t).getEncodedHex(),b="";return(b+=Dt(S,"EC PARAMETERS"))+Dt(w,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&void 0!==p&&t instanceof p&&(void 0===i||null==i)&&1==t.isPrivate)return Dt(E=_(t).getEncodedHex(),"DSA PRIVATE KEY");if("PKCS5PRV"==e&&void 0!==g&&t instanceof g&&void 0!==i&&null!=i&&1==t.isPrivate){var E=v(t).getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",E,i,r,s)}if("PKCS5PRV"==e&&void 0!==f&&t instanceof f&&void 0!==i&&null!=i&&1==t.isPrivate)return E=y(t).getEncodedHex(),void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",E,i,r,s);if("PKCS5PRV"==e&&void 0!==p&&t instanceof p&&void 0!==i&&null!=i&&1==t.isPrivate)return E=_(t).getEncodedHex(),void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",E,i,r,s);var F=function(t,e){var i=x(t,e);return new u({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:i.pbkdf2Salt}},{int:i.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:i.encryptionSchemeIV}}]}]}]},{octstr:{hex:i.ciphertext}}]}).getEncodedHex()},x=function(t,e){var i=m.lib.WordArray.random(8),r=m.lib.WordArray.random(8),n=m.PBKDF2(e,i,{keySize:6,iterations:100}),s=m.enc.Hex.parse(t),o=m.TripleDES.encrypt(s,n,{iv:r})+"",a={};return a.ciphertext=o,a.pbkdf2Salt=m.enc.Hex.stringify(i),a.pbkdf2Iter=100,a.encryptionSchemeAlg="DES-EDE3-CBC",a.encryptionSchemeIV=m.enc.Hex.stringify(r),a};if("PKCS8PRV"==e&&null!=g&&t instanceof g&&1==t.isPrivate){var C=v(t).getEncodedHex();return E=u({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:C}}]}).getEncodedHex(),void 0===i||null==i?Dt(E,"PRIVATE KEY"):Dt(w=F(E,i),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&void 0!==f&&t instanceof f&&1==t.isPrivate)return C=new u({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]}).getEncodedHex(),E=u({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:C}}]}).getEncodedHex(),void 0===i||null==i?Dt(E,"PRIVATE KEY"):Dt(w=F(E,i),"ENCRYPTED PRIVATE KEY");if("PKCS8PRV"==e&&void 0!==p&&t instanceof p&&1==t.isPrivate)return C=new l({bigint:t.x}).getEncodedHex(),E=u({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}]},{octstr:{hex:C}}]}).getEncodedHex(),void 0===i||null==i?Dt(E,"PRIVATE KEY"):Dt(w=F(E,i),"ENCRYPTED PRIVATE KEY");throw new Error("unsupported object nor format")},Ut.getKeyFromCSRPEM=function(t){var e=At(t,"CERTIFICATE REQUEST");return Ut.getKeyFromCSRHex(e)},Ut.getKeyFromCSRHex=function(t){var e=Ut.parseCSRHex(t);return Ut.getKey(e.p8pubkeyhex,null,"pkcs8pub")},Ut.parseCSRHex=function(t){var e=dt,i=e.getChildIdx,r=e.getTLV,n={},s=t;if("30"!=s.substr(0,2))throw"malformed CSR(code:001)";var o=i(s,0);if(o.length<1)throw"malformed CSR(code:002)";if("30"!=s.substr(o[0],2))throw"malformed CSR(code:003)";var a=i(s,o[0]);if(a.length<3)throw"malformed CSR(code:004)";return n.p8pubkeyhex=r(s,a[2]),n},Ut.getKeyID=function(t){var e=Ut,i=dt;"string"==typeof t&&-1!=t.indexOf("BEGIN ")&&(t=e.getKey(t));var r=At(e.getPEM(t)),n=i.getIdxbyList(r,0,[1]),s=i.getV(r,n).substring(2);return lt.crypto.Util.hashHex(s,"sha1")},Ut.getJWKFromKey=function(t){var e={};if(t instanceof nt&&t.isPrivate)return e.kty="RSA",e.n=_t(t.n.toString(16)),e.e=_t(t.e.toString(16)),e.d=_t(t.d.toString(16)),e.p=_t(t.p.toString(16)),e.q=_t(t.q.toString(16)),e.dp=_t(t.dmp1.toString(16)),e.dq=_t(t.dmq1.toString(16)),e.qi=_t(t.coeff.toString(16)),e;if(t instanceof nt&&t.isPublic)return e.kty="RSA",e.n=_t(t.n.toString(16)),e.e=_t(t.e.toString(16)),e;if(t instanceof lt.crypto.ECDSA&&t.isPrivate){if("P-256"!==(r=t.getShortNISTPCurveName())&&"P-384"!==r)throw"unsupported curve name for JWT: "+r;var i=t.getPublicKeyXYHex();return e.kty="EC",e.crv=r,e.x=_t(i.x),e.y=_t(i.y),e.d=_t(t.prvKeyHex),e}if(t instanceof lt.crypto.ECDSA&&t.isPublic){var r;if("P-256"!==(r=t.getShortNISTPCurveName())&&"P-384"!==r)throw"unsupported curve name for JWT: "+r;return i=t.getPublicKeyXYHex(),e.kty="EC",e.crv=r,e.x=_t(i.x),e.y=_t(i.y),e}throw"not supported key object"},nt.getPosArrayOfChildrenFromHex=function(t){return dt.getChildIdx(t,0)},nt.getHexValueArrayOfChildrenFromHex=function(t){var e,i=dt.getV,r=i(t,(e=nt.getPosArrayOfChildrenFromHex(t))[0]),n=i(t,e[1]),s=i(t,e[2]),o=i(t,e[3]),a=i(t,e[4]),h=i(t,e[5]),l=i(t,e[6]),u=i(t,e[7]),c=i(t,e[8]);return(e=new Array).push(r,n,s,o,a,h,l,u,c),e},nt.prototype.readPrivateKeyFromPEMString=function(t){var e=At(t),i=nt.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8])},nt.prototype.readPKCS5PrvKeyHex=function(t){var e=nt.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},nt.prototype.readPKCS8PrvKeyHex=function(t){var e,i,r,n,s,o,a,h,l=dt,u=l.getVbyListEx;if(!1===l.isASN1HEX(t))throw new Error("not ASN.1 hex string");try{e=u(t,0,[2,0,1],"02"),i=u(t,0,[2,0,2],"02"),r=u(t,0,[2,0,3],"02"),n=u(t,0,[2,0,4],"02"),s=u(t,0,[2,0,5],"02"),o=u(t,0,[2,0,6],"02"),a=u(t,0,[2,0,7],"02"),h=u(t,0,[2,0,8],"02")}catch(t){throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(e,i,r,n,s,o,a,h)},nt.prototype.readPKCS5PubKeyHex=function(t){var e=dt,i=e.getV;if(!1===e.isASN1HEX(t))throw new Error("keyHex is not ASN.1 hex string");var r=e.getChildIdx(t,0);if(2!==r.length||"02"!==t.substr(r[0],2)||"02"!==t.substr(r[1],2))throw new Error("wrong hex for PKCS#5 public key");var n=i(t,r[0]),s=i(t,r[1]);this.setPublic(n,s)},nt.prototype.readPKCS8PubKeyHex=function(t){var e=dt;if(!1===e.isASN1HEX(t))throw new Error("not ASN.1 hex string");if("06092a864886f70d010101"!==e.getTLVbyListEx(t,0,[0,0]))throw new Error("not PKCS8 RSA public key");var i=e.getTLVbyListEx(t,0,[1,0]);this.readPKCS5PubKeyHex(i)},nt.prototype.readCertPubKeyHex=function(t,e){var i,r;(i=new Wt).readCertHex(t),r=i.getPublicKeyHex(),this.readPKCS8PubKeyHex(r)};var Vt=new RegExp("[^0-9a-f]","gi");function Kt(t,e){for(var i="",r=e/4-t.length,n=0;n<r;n++)i+="0";return i+t}function zt(t,e,i){for(var r="",n=0;r.length<e;)r+=Et(i(Ft(t+String.fromCharCode.apply(String,[(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n])))),n+=1;return r}function qt(t){for(var e in lt.crypto.Util.DIGESTINFOHEAD){var i=lt.crypto.Util.DIGESTINFOHEAD[e],r=i.length;if(t.substring(0,r)==i)return[e,t.substring(r)]}return[]}function Wt(t){var e,i=dt,r=i.getChildIdx,n=i.getV,s=i.getTLV,o=i.getVbyList,a=i.getVbyListEx,h=i.getTLVbyList,l=i.getTLVbyListEx,u=i.getIdxbyList,c=i.getIdxbyListEx,d=i.getVidx,p=i.oidname,f=i.hextooidstr,g=Wt,v=At;try{e=lt.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(t){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){return null===this.hex||0!==this.version?this.version:"a003020102"!==h(this.hex,0,[0,0])?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return a(this.hex,0,[0,0],"02")},this.getSignatureAlgorithmField=function(){var t=l(this.hex,0,[0,1]);return this.getAlgorithmIdentifierName(t)},this.getAlgorithmIdentifierName=function(t){for(var i in e)if(t===e[i])return i;return p(a(t,0,[0],"06"))},this.getIssuer=function(){return this.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return h(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return g.hex2dn(this.getIssuerHex())},this.getSubject=function(){return this.getX500Name(this.getSubjectHex())},this.getSubjectHex=function(){return h(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return g.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var t=o(this.hex,0,[0,4+this.foffset,0]);return t=t.replace(/(..)/g,"%$1"),decodeURIComponent(t)},this.getNotAfter=function(){var t=o(this.hex,0,[0,4+this.foffset,1]);return t=t.replace(/(..)/g,"%$1"),decodeURIComponent(t)},this.getPublicKeyHex=function(){return i.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return u(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var t=this.getPublicKeyIdx();return u(this.hex,t,[1,0],"30")},this.getPublicKey=function(){return Ut.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){var t=h(this.hex,0,[1],"30");return this.getAlgorithmIdentifierName(t)},this.getSignatureValueHex=function(){return o(this.hex,0,[2],"03",!0)},this.verifySignature=function(t){var e=this.getSignatureAlgorithmField(),i=this.getSignatureValueHex(),r=h(this.hex,0,[0],"30"),n=new lt.crypto.Signature({alg:e});return n.init(t),n.updateHex(r),n.verify(i)},this.parseExt=function(t){var e,s,a;if(void 0===t){if(a=this.hex,3!==this.version)return-1;e=u(a,0,[0,7,0],"30"),s=r(a,e)}else{a=At(t);var h=u(a,0,[0,3,0,0],"06");if("2a864886f70d01090e"!=n(a,h))return void(this.aExtInfo=new Array);e=u(a,0,[0,3,0,1,0],"30"),s=r(a,e),this.hex=a}this.aExtInfo=new Array;for(var l=0;l<s.length;l++){var c={critical:!1},p=0;3===r(a,s[l]).length&&(c.critical=!0,p=1),c.oid=i.hextooidstr(o(a,s[l],[0],"06"));var f=u(a,s[l],[1+p]);c.vidx=d(a,f),this.aExtInfo.push(c)}},this.getExtInfo=function(t){var e=this.aExtInfo,i=t;if(t.match(/^[0-9.]+$/)||(i=lt.asn1.x509.OID.name2oid(t)),""!==i)for(var r=0;r<e.length;r++)if(e[r].oid===i)return e[r]},this.getExtBasicConstraints=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("basicConstraints");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var r={extname:"basicConstraints"};if(e&&(r.critical=!0),"3000"===t)return r;if("30030101ff"===t)return r.cA=!0,r;if("30060101ff02"===t.substr(0,12)){var o=n(t,10),a=parseInt(o,16);return r.cA=!0,r.pathLen=a,r}throw new Error("hExtV parse error: "+t)},this.getExtKeyUsage=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("keyUsage");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var r={extname:"keyUsage"};return e&&(r.critical=!0),r.names=this.getExtKeyUsageString(t).split(","),r},this.getExtKeyUsageBin=function(t){if(void 0===t){var e=this.getExtInfo("keyUsage");if(void 0===e)return"";t=s(this.hex,e.vidx)}if(8!=t.length&&10!=t.length)throw new Error("malformed key usage value: "+t);var i="000000000000000"+parseInt(t.substr(6),16).toString(2);return 8==t.length&&(i=i.slice(-8)),10==t.length&&(i=i.slice(-16)),""==(i=i.replace(/0+$/,""))&&(i="0"),i},this.getExtKeyUsageString=function(t){for(var e=this.getExtKeyUsageBin(t),i=new Array,r=0;r<e.length;r++)"1"==e.substr(r,1)&&i.push(Wt.KEYUSAGE_NAME[r]);return i.join(",")},this.getExtSubjectKeyIdentifier=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("subjectKeyIdentifier");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var r={extname:"subjectKeyIdentifier"};e&&(r.critical=!0);var o=n(t,0);return r.kid={hex:o},r},this.getExtAuthorityKeyIdentifier=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("authorityKeyIdentifier");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var o={extname:"authorityKeyIdentifier"};e&&(o.critical=!0);for(var a=r(t,0),h=0;h<a.length;h++){var l=t.substr(a[h],2);if("80"===l&&(o.kid={hex:n(t,a[h])}),"a1"===l){var u=s(t,a[h]),c=this.getGeneralNames(u);o.issuer=c[0].dn}"82"===l&&(o.sn={hex:n(t,a[h])})}return o},this.getExtExtKeyUsage=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("extKeyUsage");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var o={extname:"extKeyUsage",array:[]};e&&(o.critical=!0);for(var a=r(t,0),h=0;h<a.length;h++)o.array.push(p(n(t,a[h])));return o},this.getExtExtKeyUsageName=function(){var t=this.getExtInfo("extKeyUsage");if(void 0===t)return t;var e=new Array,i=s(this.hex,t.vidx);if(""===i)return e;for(var o=r(i,0),a=0;a<o.length;a++)e.push(p(n(i,o[a])));return e},this.getExtSubjectAltName=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("subjectAltName");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var r={extname:"subjectAltName",array:[]};return e&&(r.critical=!0),r.array=this.getGeneralNames(t),r},this.getExtIssuerAltName=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("issuerAltName");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var r={extname:"issuerAltName",array:[]};return e&&(r.critical=!0),r.array=this.getGeneralNames(t),r},this.getGeneralNames=function(t){for(var e=r(t,0),i=[],n=0;n<e.length;n++){var o=this.getGeneralName(s(t,e[n]));void 0!==o&&i.push(o)}return i},this.getGeneralName=function(t){var e=t.substr(0,2),i=n(t,0),r=Et(i);return"81"==e?{rfc822:r}:"82"==e?{dns:r}:"86"==e?{uri:r}:"87"==e?{ip:Nt(i)}:"a4"==e?{dn:this.getX500Name(i)}:void 0},this.getExtSubjectAltName2=function(){var t,e,i,o=this.getExtInfo("subjectAltName");if(void 0===o)return o;for(var a=new Array,h=s(this.hex,o.vidx),l=r(h,0),u=0;u<l.length;u++)i=h.substr(l[u],2),t=n(h,l[u]),"81"===i&&(e=bt(t),a.push(["MAIL",e])),"82"===i&&(e=bt(t),a.push(["DNS",e])),"84"===i&&(e=Wt.hex2dn(t,0),a.push(["DN",e])),"86"===i&&(e=bt(t),a.push(["URI",e])),"87"===i&&(e=Nt(t),a.push(["IP",e]));return a},this.getExtCRLDistributionPoints=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("cRLDistributionPoints");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var n={extname:"cRLDistributionPoints",array:[]};e&&(n.critical=!0);for(var o=r(t,0),a=0;a<o.length;a++){var h=s(t,o[a]);n.array.push(this.getDistributionPoint(h))}return n},this.getDistributionPoint=function(t){for(var e={},i=r(t,0),n=0;n<i.length;n++){var o=t.substr(i[n],2),a=s(t,i[n]);"a0"==o&&(e.dpname=this.getDistributionPointName(a))}return e},this.getDistributionPointName=function(t){for(var e={},i=r(t,0),n=0;n<i.length;n++){var o=t.substr(i[n],2),a=s(t,i[n]);"a0"==o&&(e.full=this.getGeneralNames(a))}return e},this.getExtCRLDistributionPointsURI=function(){var t=this.getExtInfo("cRLDistributionPoints");if(void 0===t)return t;for(var e=new Array,i=r(this.hex,t.vidx),n=0;n<i.length;n++)try{var s=bt(o(this.hex,i[n],[0,0,0],"86"));e.push(s)}catch(t){}return e},this.getExtAIAInfo=function(){var t=this.getExtInfo("authorityInfoAccess");if(void 0===t)return t;for(var e={ocsp:[],caissuer:[]},i=r(this.hex,t.vidx),n=0;n<i.length;n++){var s=o(this.hex,i[n],[0],"06"),a=o(this.hex,i[n],[1],"86");"2b06010505073001"===s&&e.ocsp.push(bt(a)),"2b06010505073002"===s&&e.caissuer.push(bt(a))}return e},this.getExtAuthorityInfoAccess=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("authorityInfoAccess");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var n={extname:"authorityInfoAccess",array:[]};e&&(n.critical=!0);for(var h=r(t,0),l=0;l<h.length;l++){var u=a(t,h[l],[0],"06"),c=bt(o(t,h[l],[1],"86"));if("2b06010505073001"==u)n.array.push({ocsp:c});else{if("2b06010505073002"!=u)throw new Error("unknown method: "+u);n.array.push({caissuer:c})}}return n},this.getExtCertificatePolicies=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("certificatePolicies");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var n={extname:"certificatePolicies",array:[]};e&&(n.critical=!0);for(var o=r(t,0),a=0;a<o.length;a++){var h=s(t,o[a]),l=this.getPolicyInformation(h);n.array.push(l)}return n},this.getPolicyInformation=function(t){var e={},i=o(t,0,[0],"06");e.policyoid=p(i);var n=c(t,0,[1],"30");if(-1!=n){e.array=[];for(var a=r(t,n),h=0;h<a.length;h++){var l=s(t,a[h]),u=this.getPolicyQualifierInfo(l);e.array.push(u)}}return e},this.getPolicyQualifierInfo=function(t){var e={},i=o(t,0,[0],"06");if("2b06010505070201"===i){var r=a(t,0,[1],"16");e.cps=Et(r)}else if("2b06010505070202"===i){var n=h(t,0,[1],"30");e.unotice=this.getUserNotice(n)}return e},this.getUserNotice=function(t){for(var e={},i=r(t,0),n=0;n<i.length;n++){var o=s(t,i[n]);"30"!=o.substr(0,2)&&(e.exptext=this.getDisplayText(o))}return e},this.getDisplayText=function(t){var e={};return e.type={"0c":"utf8",16:"ia5","1a":"vis","1e":"bmp"}[t.substr(0,2)],e.str=Et(n(t,0)),e},this.getExtCRLNumber=function(t,e){var i={extname:"cRLNumber"};if(e&&(i.critical=!0),"02"==t.substr(0,2))return i.num={hex:n(t,0)},i;throw new Error("hExtV parse error: "+t)},this.getExtCRLReason=function(t,e){var i={extname:"cRLReason"};if(e&&(i.critical=!0),"0a"==t.substr(0,2))return i.code=parseInt(n(t,0),16),i;throw new Error("hExtV parse error: "+t)},this.getExtOcspNonce=function(t,e){var i={extname:"ocspNonce"};e&&(i.critical=!0);var r=n(t,0);return i.hex=r,i},this.getExtOcspNoCheck=function(t,e){var i={extname:"ocspNoCheck"};return e&&(i.critical=!0),i},this.getExtAdobeTimeStamp=function(t,e){if(void 0===t&&void 0===e){var i=this.getExtInfo("adobeTimeStamp");if(void 0===i)return;t=s(this.hex,i.vidx),e=i.critical}var n={extname:"adobeTimeStamp"};e&&(n.critical=!0);var o=r(t,0);if(o.length>1){var a=s(t,o[1]),h=this.getGeneralName(a);null!=h.uri&&(n.uri=h.uri)}if(o.length>2){var l=s(t,o[2]);"0101ff"==l&&(n.reqauth=!0),"010100"==l&&(n.reqauth=!1)}return n},this.getX500NameRule=function(t){for(var e=null,i=[],r=0;r<t.length;r++)for(var n=t[r],s=0;s<n.length;s++)i.push(n[s]);for(r=0;r<i.length;r++){var o=i[r],a=o.ds,h=o.value,l=o.type;if("prn"!=a&&"utf8"!=a&&"ia5"!=a)return"mixed";if("ia5"==a){if("CN"!=l)return"mixed";if(lt.lang.String.isMail(h))continue;return"mixed"}if("C"==l){if("prn"==a)continue;return"mixed"}if(null==e)e=a;else if(e!==a)return"mixed"}return null==e?"prn":e},this.getX500Name=function(t){var e=this.getX500NameArray(t);return{array:e,str:this.dnarraytostr(e)}},this.getX500NameArray=function(t){for(var e=[],i=r(t,0),n=0;n<i.length;n++)e.push(this.getRDN(s(t,i[n])));return e},this.getRDN=function(t){for(var e=[],i=r(t,0),n=0;n<i.length;n++)e.push(this.getAttrTypeAndValue(s(t,i[n])));return e},this.getAttrTypeAndValue=function(t){var e={type:null,value:null,ds:null},i=r(t,0),n=o(t,i[0],[],"06"),s=o(t,i[1],[]),a=lt.asn1.ASN1Util.oidHexToInt(n);return e.type=lt.asn1.x509.OID.oid2atype(a),e.value=Et(s),e.ds=this.HEX2STAG[t.substr(i[1],2)],e},this.readCertPEM=function(t){this.readCertHex(v(t))},this.readCertHex=function(t){this.hex=t,this.getVersion();try{u(this.hex,0,[0,7],"a3"),this.parseExt()}catch(t){}},this.getParam=function(){var t={};return t.version=this.getVersion(),t.serial={hex:this.getSerialNumberHex()},t.sigalg=this.getSignatureAlgorithmField(),t.issuer=this.getIssuer(),t.notbefore=this.getNotBefore(),t.notafter=this.getNotAfter(),t.subject=this.getSubject(),t.sbjpubkey=Dt(this.getPublicKeyHex(),"PUBLIC KEY"),this.aExtInfo.length>0&&(t.ext=this.getExtParamArray()),t.sighex=this.getSignatureValueHex(),t},this.getExtParamArray=function(t){null==t&&-1!=c(this.hex,0,[0,"[3]"])&&(t=l(this.hex,0,[0,"[3]",0],"30"));for(var e=[],i=r(t,0),n=0;n<i.length;n++){var o=s(t,i[n]),a=this.getExtParam(o);null!=a&&e.push(a)}return e},this.getExtParam=function(t){var e=r(t,0).length;if(2!=e&&3!=e)throw new Error("wrong number elements in Extension: "+e+" "+t);var i=f(o(t,0,[0],"06")),n=!1;3==e&&"0101ff"==h(t,0,[1])&&(n=!0);var s=h(t,0,[e-1,0]),a=void 0;if("2.5.29.14"==i?a=this.getExtSubjectKeyIdentifier(s,n):"2.5.29.15"==i?a=this.getExtKeyUsage(s,n):"2.5.29.17"==i?a=this.getExtSubjectAltName(s,n):"2.5.29.18"==i?a=this.getExtIssuerAltName(s,n):"2.5.29.19"==i?a=this.getExtBasicConstraints(s,n):"2.5.29.31"==i?a=this.getExtCRLDistributionPoints(s,n):"2.5.29.32"==i?a=this.getExtCertificatePolicies(s,n):"2.5.29.35"==i?a=this.getExtAuthorityKeyIdentifier(s,n):"2.5.29.37"==i?a=this.getExtExtKeyUsage(s,n):"1.3.6.1.5.5.7.1.1"==i?a=this.getExtAuthorityInfoAccess(s,n):"2.5.29.20"==i?a=this.getExtCRLNumber(s,n):"2.5.29.21"==i?a=this.getExtCRLReason(s,n):"1.3.6.1.5.5.7.48.1.2"==i?a=this.getExtOcspNonce(s,n):"1.3.6.1.5.5.7.48.1.5"==i?a=this.getExtOcspNoCheck(s,n):"1.2.840.113583.1.1.9.1"==i&&(a=this.getExtAdobeTimeStamp(s,n)),null!=a)return a;var l={extname:i,extn:s};return n&&(l.critical=!0),l},this.findExt=function(t,e){for(var i=0;i<t.length;i++)if(t[i].extname==e)return t[i];return null},this.updateExtCDPFullURI=function(t,e){var i=this.findExt(t,"cRLDistributionPoints");if(null!=i&&null!=i.array)for(var r=i.array,n=0;n<r.length;n++)if(null!=r[n].dpname&&null!=r[n].dpname.full)for(var s=r[n].dpname.full,o=0;o<s.length;o++){var a=s[n];null!=a.uri&&(a.uri=e)}},this.updateExtAIAOCSP=function(t,e){var i=this.findExt(t,"authorityInfoAccess");if(null!=i&&null!=i.array)for(var r=i.array,n=0;n<r.length;n++)null!=r[n].ocsp&&(r[n].ocsp=e)},this.updateExtAIACAIssuer=function(t,e){var i=this.findExt(t,"authorityInfoAccess");if(null!=i&&null!=i.array)for(var r=i.array,n=0;n<r.length;n++)null!=r[n].caissuer&&(r[n].caissuer=e)},this.dnarraytostr=function(t){return"/"+t.map(function(t){return function(t){return t.map(function(t){return function(t){return t.type+"="+t.value}(t)}).join("+")}(t)}).join("/")},this.getInfo=function(){var t,e,i,r=function(t){return JSON.stringify(t.array).replace(/[\[\]\{\}\"]/g,"")},n=function(t){for(var e="",i=t.array,r=0;r<i.length;r++){var n=i[r];if(e+=" policy oid: "+n.policyoid+"\n",void 0!==n.array)for(var s=0;s<n.array.length;s++){var o=n.array[s];void 0!==o.cps&&(e+=" cps: "+o.cps+"\n")}}return e},s=function(t){for(var e="",i=t.array,r=0;r<i.length;r++){var n=i[r];try{void 0!==n.dpname.full[0].uri&&(e+=" "+n.dpname.full[0].uri+"\n")}catch(t){}try{void 0!==n.dname.full[0].dn.hex&&(e+=" "+Wt.hex2dn(n.dpname.full[0].dn.hex)+"\n")}catch(t){}}return e},o=function(t){for(var e="",i=t.array,r=0;r<i.length;r++){var n=i[r];void 0!==n.caissuer&&(e+=" caissuer: "+n.caissuer+"\n"),void 0!==n.ocsp&&(e+=" ocsp: "+n.ocsp+"\n")}return e};if(t="Basic Fields\n",t+=" serial number: "+this.getSerialNumberHex()+"\n",t+=" signature algorithm: "+this.getSignatureAlgorithmField()+"\n",t+=" issuer: "+this.getIssuerString()+"\n",t+=" notBefore: "+this.getNotBefore()+"\n",t+=" notAfter: "+this.getNotAfter()+"\n",t+=" subject: "+this.getSubjectString()+"\n",t+=" subject public key info: \n",t+=" key algorithm: "+(e=this.getPublicKey()).type+"\n","RSA"===e.type&&(t+=" n="+Bt(e.n.toString(16)).substr(0,16)+"...\n",t+=" e="+Bt(e.e.toString(16))+"\n"),null!=(i=this.aExtInfo)){t+="X509v3 Extensions:\n";for(var a=0;a<i.length;a++){var h=i[a],l=lt.asn1.x509.OID.oid2name(h.oid);""===l&&(l=h.oid);var u="";if(!0===h.critical&&(u="CRITICAL"),t+=" "+l+" "+u+":\n","basicConstraints"===l){var c=this.getExtBasicConstraints();void 0===c.cA?t+=" {}\n":(t+=" cA=true",void 0!==c.pathLen&&(t+=", pathLen="+c.pathLen),t+="\n")}else if("keyUsage"===l)t+=" "+this.getExtKeyUsageString()+"\n";else if("subjectKeyIdentifier"===l)t+=" "+this.getExtSubjectKeyIdentifier().kid.hex+"\n";else if("authorityKeyIdentifier"===l){var d=this.getExtAuthorityKeyIdentifier();void 0!==d.kid&&(t+=" kid="+d.kid.hex+"\n")}else"extKeyUsage"===l?t+=" "+this.getExtExtKeyUsage().array.join(", ")+"\n":"subjectAltName"===l?t+=" "+r(this.getExtSubjectAltName())+"\n":"cRLDistributionPoints"===l?t+=s(this.getExtCRLDistributionPoints()):"authorityInfoAccess"===l?t+=o(this.getExtAuthorityInfoAccess()):"certificatePolicies"===l&&(t+=n(this.getExtCertificatePolicies()))}}return(t+="signature algorithm: "+this.getSignatureAlgorithmName()+"\n")+"signature: "+this.getSignatureValueHex().substr(0,16)+"...\n"},"string"==typeof t&&(-1!=t.indexOf("-----BEGIN")?this.readCertPEM(t):lt.lang.String.isHex(t)&&this.readCertHex(t))}nt.prototype.sign=function(t,e){var i=function(t){return lt.crypto.Util.hashString(t,e)}(t);return this.signWithMessageHash(i,e)},nt.prototype.signWithMessageHash=function(t,e){var i=it(lt.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),16);return Kt(this.doPrivate(i).toString(16),this.n.bitLength())},nt.prototype.signPSS=function(t,e,i){var r=function(t){return lt.crypto.Util.hashHex(t,e)}(Ft(t));return void 0===i&&(i=-1),this.signWithMessageHashPSS(r,e,i)},nt.prototype.signWithMessageHashPSS=function(t,e,i){var r,n=Et(t),s=n.length,o=this.n.bitLength()-1,a=Math.ceil(o/8),h=function(t){return lt.crypto.Util.hashHex(t,e)};if(-1===i||void 0===i)i=s;else if(-2===i)i=a-s-2;else if(i<-2)throw new Error("invalid salt length");if(a<s+i+2)throw new Error("data too long");var l="";i>0&&(l=new Array(i),(new et).nextBytes(l),l=String.fromCharCode.apply(String,l));var u=Et(h(Ft("\0\0\0\0\0\0\0\0"+n+l))),c=[];for(r=0;r<a-i-s-2;r+=1)c[r]=0;var d=String.fromCharCode.apply(String,c)+"�"+l,p=zt(u,d.length,h),f=[];for(r=0;r<d.length;r+=1)f[r]=d.charCodeAt(r)^p.charCodeAt(r);var g=65280>>8*a-o&255;for(f[0]&=~g,r=0;r<s;r++)f.push(u.charCodeAt(r));return f.push(188),Kt(this.doPrivate(new E(f)).toString(16),this.n.bitLength())},nt.prototype.verify=function(t,e){var i=it(e=(e=e.replace(Vt,"")).replace(/[ \n]+/g,""),16);if(i.bitLength()>this.n.bitLength())return 0;var r=qt(this.doPublic(i).toString(16).replace(/^1f+00/,""));if(0==r.length)return!1;var n=r[0];return r[1]==function(t){return lt.crypto.Util.hashString(t,n)}(t)},nt.prototype.verifyWithMessageHash=function(t,e){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var i=it(e,16);if(i.bitLength()>this.n.bitLength())return 0;var r=qt(this.doPublic(i).toString(16).replace(/^1f+00/,""));return 0!=r.length&&(r[0],r[1]==t)},nt.prototype.verifyPSS=function(t,e,i,r){var n=function(t){return lt.crypto.Util.hashHex(t,i)}(Ft(t));return void 0===r&&(r=-1),this.verifyWithMessageHashPSS(n,e,i,r)},nt.prototype.verifyWithMessageHashPSS=function(t,e,i,r){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var n,s=new E(e,16),o=function(t){return lt.crypto.Util.hashHex(t,i)},a=Et(t),h=a.length,l=this.n.bitLength()-1,u=Math.ceil(l/8);if(-1===r||void 0===r)r=h;else if(-2===r)r=u-h-2;else if(r<-2)throw new Error("invalid salt length");if(u<h+r+2)throw new Error("data too long");var c=this.doPublic(s).toByteArray();for(n=0;n<c.length;n+=1)c[n]&=255;for(;c.length<u;)c.unshift(0);if(188!==c[u-1])throw new Error("encoded message does not end in 0xbc");var d=(c=String.fromCharCode.apply(String,c)).substr(0,u-h-1),p=c.substr(d.length,h),f=65280>>8*u-l&255;if(0!=(d.charCodeAt(0)&f))throw new Error("bits beyond keysize not zero");var g=zt(p,d.length,o),v=[];for(n=0;n<d.length;n+=1)v[n]=d.charCodeAt(n)^g.charCodeAt(n);v[0]&=~f;var m=u-h-r-2;for(n=0;n<m;n+=1)if(0!==v[n])throw new Error("leftmost octets not zero");if(1!==v[m])throw new Error("0x01 marker not found");return p===Et(o(Ft("\0\0\0\0\0\0\0\0"+a+String.fromCharCode.apply(String,v.slice(-r)))))},nt.SALT_LEN_HLEN=-1,nt.SALT_LEN_MAX=-2,nt.SALT_LEN_RECOVER=-2,Wt.hex2dn=function(t,e){if(void 0===e&&(e=0),"30"!==t.substr(e,2))throw new Error("malformed DN");for(var i=new Array,r=dt.getChildIdx(t,e),n=0;n<r.length;n++)i.push(Wt.hex2rdn(t,r[n]));return"/"+(i=i.map(function(t){return t.replace("/","\\/")})).join("/")},Wt.hex2rdn=function(t,e){if(void 0===e&&(e=0),"31"!==t.substr(e,2))throw new Error("malformed RDN");for(var i=new Array,r=dt.getChildIdx(t,e),n=0;n<r.length;n++)i.push(Wt.hex2attrTypeValue(t,r[n]));return(i=i.map(function(t){return t.replace("+","\\+")})).join("+")},Wt.hex2attrTypeValue=function(t,e){var i=dt,r=i.getV;if(void 0===e&&(e=0),"30"!==t.substr(e,2))throw new Error("malformed attribute type and value");var n=i.getChildIdx(t,e);2!==n.length||t.substr(n[0],2);var s=r(t,n[0]),o=lt.asn1.ASN1Util.oidHexToInt(s);return lt.asn1.x509.OID.oid2atype(o)+"="+Et(r(t,n[1]))},Wt.getPublicKeyFromCertHex=function(t){var e=new Wt;return e.readCertHex(t),e.getPublicKey()},Wt.getPublicKeyFromCertPEM=function(t){var e=new Wt;return e.readCertPEM(t),e.getPublicKey()},Wt.getPublicKeyInfoPropOfCertPEM=function(t){var e,i,r=dt.getVbyList,n={algparam:null};return(e=new Wt).readCertPEM(t),i=e.getPublicKeyHex(),n.keyhex=r(i,0,[1],"03").substr(2),n.algoid=r(i,0,[0,0],"06"),"2a8648ce3d0201"===n.algoid&&(n.algparam=r(i,0,[0,1],"06")),n},Wt.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"],void 0!==lt&<||(e.KJUR=lt={}),void 0!==lt.jws&<.jws||(lt.jws={}),lt.jws.JWS=function(){var t=lt.jws.JWS.isSafeJSONString;this.parseJWS=function(e,i){if(void 0===this.parsedJWS||!i&&void 0===this.parsedJWS.sigvalH){var r=e.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(null==r)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var n=r[1],s=r[2],o=r[3],a=n+"."+s;if(this.parsedJWS={},this.parsedJWS.headB64U=n,this.parsedJWS.payloadB64U=s,this.parsedJWS.sigvalB64U=o,this.parsedJWS.si=a,!i){var h=St(o),l=it(h,16);this.parsedJWS.sigvalH=h,this.parsedJWS.sigvalBI=l}var u=ct(n),c=ct(s);if(this.parsedJWS.headS=u,this.parsedJWS.payloadS=c,!t(u,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+u}}},lt.jws.JWS.sign=function(t,e,r,n,s){var o,a,h,l=lt,u=l.jws.JWS,c=u.readSafeJSONString,d=u.isSafeJSONString,p=l.crypto,f=(p.ECDSA,p.Mac),g=p.Signature,v=JSON;if("string"!=typeof e&&"object"!=(void 0===e?"undefined":i(e)))throw"spHeader must be JSON string or object: "+e;if("object"==(void 0===e?"undefined":i(e))&&(a=e,o=v.stringify(a)),"string"==typeof e){if(!d(o=e))throw"JWS Head is not safe JSON string: "+o;a=c(o)}if(h=r,"object"==(void 0===r?"undefined":i(r))&&(h=v.stringify(r)),""!=t&&null!=t||void 0===a.alg||(t=a.alg),""!=t&&null!=t&&void 0===a.alg&&(a.alg=t,o=v.stringify(a)),t!==a.alg)throw"alg and sHeader.alg doesn't match: "+t+"!="+a.alg;var m=null;if(void 0===u.jwsalg2sigalg[t])throw"unsupported alg name: "+t;m=u.jwsalg2sigalg[t];var y=ut(o)+"."+ut(h),_="";if("Hmac"==m.substr(0,4)){if(void 0===n)throw"mac key shall be specified for HS* alg";var S=new f({alg:m,prov:"cryptojs",pass:n});S.updateString(y),_=S.doFinal()}else if(-1!=m.indexOf("withECDSA")){(b=new g({alg:m})).init(n,s),b.updateString(y);var w=b.sign();_=lt.crypto.ECDSA.asn1SigToConcatSig(w)}else{var b;"none"!=m&&((b=new g({alg:m})).init(n,s),b.updateString(y),_=b.sign())}return y+"."+_t(_)},lt.jws.JWS.verify=function(t,e,r){var n,s=lt,o=s.jws.JWS,a=o.readSafeJSONString,h=s.crypto,l=h.ECDSA,u=h.Mac,c=h.Signature;void 0!==i(nt)&&(n=nt);var d=t.split(".");if(3!==d.length)return!1;var p,f=d[0]+"."+d[1],g=St(d[2]),v=a(ct(d[0])),m=null;if(void 0===v.alg)throw"algorithm not specified in header";if(p=(m=v.alg).substr(0,2),null!=r&&"[object Array]"===Object.prototype.toString.call(r)&&r.length>0&&-1==(":"+r.join(":")+":").indexOf(":"+m+":"))throw"algorithm '"+m+"' not accepted in the list";if("none"!=m&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=Ut.getKey(e)),!("RS"!=p&&"PS"!=p||e instanceof n))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==p&&!(e instanceof l))throw"key shall be a ECDSA obj for ES* algs";var y=null;if(void 0===o.jwsalg2sigalg[v.alg])throw"unsupported alg name: "+m;if("none"==(y=o.jwsalg2sigalg[m]))throw"not supported";if("Hmac"==y.substr(0,4)){if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var _=new u({alg:y,pass:e});return _.updateString(f),g==_.doFinal()}if(-1!=y.indexOf("withECDSA")){var S,w=null;try{w=l.concatSigToASN1Sig(g)}catch(t){return!1}return(S=new c({alg:y})).init(e),S.updateString(f),S.verify(w)}return(S=new c({alg:y})).init(e),S.updateString(f),S.verify(g)},lt.jws.JWS.parse=function(t){var e,i,r,n=t.split("."),s={};if(2!=n.length&&3!=n.length)throw"malformed sJWS: wrong number of '.' splitted elements";return e=n[0],i=n[1],3==n.length&&(r=n[2]),s.headerObj=lt.jws.JWS.readSafeJSONString(ct(e)),s.payloadObj=lt.jws.JWS.readSafeJSONString(ct(i)),s.headerPP=JSON.stringify(s.headerObj,null," "),null==s.payloadObj?s.payloadPP=ct(i):s.payloadPP=JSON.stringify(s.payloadObj,null," "),void 0!==r&&(s.sigHex=St(r)),s},lt.jws.JWS.verifyJWT=function(t,e,r){var n=lt.jws,s=n.JWS,o=s.readSafeJSONString,a=s.inArray,h=s.includedArray,l=t.split("."),u=l[0],c=l[1],d=(St(l[2]),o(ct(u))),p=o(ct(c));if(void 0===d.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!a(d.alg,r.alg))return!1;if(void 0!==p.iss&&"object"===i(r.iss)&&!a(p.iss,r.iss))return!1;if(void 0!==p.sub&&"object"===i(r.sub)&&!a(p.sub,r.sub))return!1;if(void 0!==p.aud&&"object"===i(r.aud))if("string"==typeof p.aud){if(!a(p.aud,r.aud))return!1}else if("object"==i(p.aud)&&!h(p.aud,r.aud))return!1;var f=n.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(f=r.verifyAt),void 0!==r.gracePeriod&&"number"==typeof r.gracePeriod||(r.gracePeriod=0),!(void 0!==p.exp&&"number"==typeof p.exp&&p.exp+r.gracePeriod<f||void 0!==p.nbf&&"number"==typeof p.nbf&&f<p.nbf-r.gracePeriod||void 0!==p.iat&&"number"==typeof p.iat&&f<p.iat-r.gracePeriod||void 0!==p.jti&&void 0!==r.jti&&p.jti!==r.jti||!s.verify(t,e,r.alg))},lt.jws.JWS.includedArray=function(t,e){var r=lt.jws.JWS.inArray;if(null===t)return!1;if("object"!==(void 0===t?"undefined":i(t)))return!1;if("number"!=typeof t.length)return!1;for(var n=0;n<t.length;n++)if(!r(t[n],e))return!1;return!0},lt.jws.JWS.inArray=function(t,e){if(null===e)return!1;if("object"!==(void 0===e?"undefined":i(e)))return!1;if("number"!=typeof e.length)return!1;for(var r=0;r<e.length;r++)if(e[r]==t)return!0;return!1},lt.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},lt.jws.JWS.isSafeJSONString=function(t,e,r){var n=null;try{return"object"!=(void 0===(n=ht(t))?"undefined":i(n))||n.constructor===Array?0:(e&&(e[r]=n),1)}catch(t){return 0}},lt.jws.JWS.readSafeJSONString=function(t){var e=null;try{return"object"!=(void 0===(e=ht(t))?"undefined":i(e))||e.constructor===Array?null:e}catch(t){return null}},lt.jws.JWS.getEncodedSignatureValueFromJWS=function(t){var e=t.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(null==e)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return e[1]},lt.jws.JWS.getJWKthumbprint=function(t){if("RSA"!==t.kty&&"EC"!==t.kty&&"oct"!==t.kty)throw"unsupported algorithm for JWK Thumprint";var e="{";if("RSA"===t.kty){if("string"!=typeof t.n||"string"!=typeof t.e)throw"wrong n and e value for RSA key";e+='"e":"'+t.e+'",',e+='"kty":"'+t.kty+'",',e+='"n":"'+t.n+'"}'}else if("EC"===t.kty){if("string"!=typeof t.crv||"string"!=typeof t.x||"string"!=typeof t.y)throw"wrong crv, x and y value for EC key";e+='"crv":"'+t.crv+'",',e+='"kty":"'+t.kty+'",',e+='"x":"'+t.x+'",',e+='"y":"'+t.y+'"}'}else if("oct"===t.kty){if("string"!=typeof t.k)throw"wrong k value for oct(symmetric) key";e+='"kty":"'+t.kty+'",',e+='"k":"'+t.k+'"}'}var i=Ft(e);return _t(lt.crypto.Util.hashHex(i,"sha256"))},lt.jws.IntDate={},lt.jws.IntDate.get=function(t){var e=lt.jws.IntDate,i=e.getNow,r=e.getZulu;if("now"==t)return i();if("now + 1hour"==t)return i()+3600;if("now + 1day"==t)return i()+86400;if("now + 1month"==t)return i()+2592e3;if("now + 1year"==t)return i()+31536e3;if(t.match(/Z$/))return r(t);if(t.match(/^[0-9]+$/))return parseInt(t);throw"unsupported format: "+t},lt.jws.IntDate.getZulu=function(t){return Pt(t)},lt.jws.IntDate.getNow=function(){return~~(new Date/1e3)},lt.jws.IntDate.intDate2UTCString=function(t){return new Date(1e3*t).toUTCString()},lt.jws.IntDate.intDate2Zulu=function(t){var e=new Date(1e3*t);return("0000"+e.getUTCFullYear()).slice(-4)+("00"+(e.getUTCMonth()+1)).slice(-2)+("00"+e.getUTCDate()).slice(-2)+("00"+e.getUTCHours()).slice(-2)+("00"+e.getUTCMinutes()).slice(-2)+("00"+e.getUTCSeconds()).slice(-2)+"Z"},e.SecureRandom=et,e.rng_seed_time=Y,e.BigInteger=E,e.RSAKey=nt;var $t=lt.crypto.EDSA;e.EDSA=$t;var Jt=lt.crypto.DSA;e.DSA=Jt;var Yt=lt.crypto.Signature;e.Signature=Yt;var Gt=lt.crypto.MessageDigest;e.MessageDigest=Gt;var Xt=lt.crypto.Mac;e.Mac=Xt;var Zt=lt.crypto.Cipher;e.Cipher=Zt,e.KEYUTIL=Ut,e.ASN1HEX=dt,e.X509=Wt,e.CryptoJS=m,e.b64tohex=w,e.b64toBA=b,e.stoBA=pt,e.BAtos=ft,e.BAtohex=gt,e.stohex=vt,e.stob64=function(t){return S(vt(t))},e.stob64u=function(t){return mt(S(vt(t)))},e.b64utos=function(t){return ft(b(yt(t)))},e.b64tob64u=mt,e.b64utob64=yt,e.hex2b64=S,e.hextob64u=_t,e.b64utohex=St,e.utf8tob64u=ut,e.b64utoutf8=ct,e.utf8tob64=function(t){return S(It(Ot(t)))},e.b64toutf8=function(t){return decodeURIComponent(Mt(w(t)))},e.utf8tohex=wt,e.hextoutf8=bt,e.hextorstr=Et,e.rstrtohex=Ft,e.hextob64=xt,e.hextob64nl=Ct,e.b64nltohex=kt,e.hextopem=Dt,e.pemtohex=At,e.hextoArrayBuffer=function(t){if(t.length%2!=0)throw"input is not even length";if(null==t.match(/^[0-9A-Fa-f]+$/))throw"input is not hexadecimal";for(var e=new ArrayBuffer(t.length/2),i=new DataView(e),r=0;r<t.length/2;r++)i.setUint8(r,parseInt(t.substr(2*r,2),16));return e},e.ArrayBuffertohex=function(t){for(var e="",i=new DataView(t),r=0;r<t.byteLength;r++)e+=("00"+i.getUint8(r).toString(16)).slice(-2);return e},e.zulutomsec=Tt,e.zulutosec=Pt,e.zulutodate=function(t){return new Date(Tt(t))},e.datetozulu=function(t,e,i){var r,n=t.getUTCFullYear();if(e){if(n<1950||2049<n)throw"not proper year for UTCTime: "+n;r=(""+n).slice(-2)}else r=("000"+n).slice(-4);if(r+=("0"+(t.getUTCMonth()+1)).slice(-2),r+=("0"+t.getUTCDate()).slice(-2),r+=("0"+t.getUTCHours()).slice(-2),r+=("0"+t.getUTCMinutes()).slice(-2),r+=("0"+t.getUTCSeconds()).slice(-2),i){var s=t.getUTCMilliseconds();0!==s&&(r+="."+(s=(s=("00"+s).slice(-3)).replace(/0+$/g,"")))}return r+"Z"},e.uricmptohex=It,e.hextouricmp=Mt,e.ipv6tohex=Rt,e.hextoipv6=Lt,e.hextoip=Nt,e.iptohex=function(t){var e="malformed IP address";if(!(t=t.toLowerCase(t)).match(/^[0-9.]+$/)){if(t.match(/^[0-9a-f:]+$/)&&-1!==t.indexOf(":"))return Rt(t);throw e}var i=t.split(".");if(4!==i.length)throw e;var r="";try{for(var n=0;n<4;n++)r+=("0"+parseInt(i[n]).toString(16)).slice(-2);return r}catch(t){throw e}},e.encodeURIComponentAll=Ot,e.newline_toUnix=function(t){return t.replace(/\r\n/gm,"\n")},e.newline_toDos=function(t){return(t=t.replace(/\r\n/gm,"\n")).replace(/\n/gm,"\r\n")},e.hextoposhex=Bt,e.intarystrtohex=function(t){t=(t=(t=t.replace(/^\s*\[\s*/,"")).replace(/\s*\]\s*$/,"")).replace(/\s*/g,"");try{return t.split(/,/).map(function(t,e,i){var r=parseInt(t);if(r<0||255<r)throw"integer not in range 0-255";return("00"+r.toString(16)).slice(-2)}).join("")}catch(t){throw"malformed integer array string: "+t}},e.strdiffidx=function(t,e){var i=t.length;t.length>e.length&&(i=e.length);for(var r=0;r<i;r++)if(t.charCodeAt(r)!=e.charCodeAt(r))return r;return t.length!=e.length?i:-1},e.KJUR=lt;var Qt=lt.crypto;e.crypto=Qt;var te=lt.asn1;e.asn1=te;var ee=lt.jws;e.jws=ee;var ie=lt.lang;e.lang=ie}).call(this,i(28).Buffer)},function(t,e,i){"use strict";(function(t){var r=i(30),n=i(31),s=i(32);function o(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=h.prototype:(null===t&&(t=new h(e)),t.length=e),t}function h(t,e,i){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(t,e,i);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return l(this,t,e,i)}function l(t,e,i,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,r){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===i&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,i):new Uint8Array(e,i,r),h.TYPED_ARRAY_SUPPORT?(t=e).__proto__=h.prototype:t=d(t,e),t}(t,e,i,r):"string"==typeof e?function(t,e,i){if("string"==typeof i&&""!==i||(i="utf8"),!h.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(e,i),n=(t=a(t,r)).write(e,i);return n!==r&&(t=t.slice(0,n)),t}(t,e,i):function(t,e){if(h.isBuffer(e)){var i=0|p(e.length);return 0===(t=a(t,i)).length||e.copy(t,0,0,i),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?a(t,0):d(t,e);if("Buffer"===e.type&&s(e.data))return d(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(u(e),t=a(t,e<0?0:0|p(e)),!h.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function d(t,e){var i=e.length<0?0:0|p(e.length);t=a(t,i);for(var r=0;r<i;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function f(t,e){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&
vendor: 16,418 bytes, line 2
2(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return V(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,i){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,i);case"utf8":case"utf-8":return C(this,e,i);case"ascii":return D(this,e,i);case"latin1":case"binary":return A(this,e,i);case"base64":return x(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function m(t,e,i,r,n){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=h.from(e,r)),h.isBuffer(e))return 0===e.length?-1:y(t,e,i,r,n);if("number"==typeof e)return e&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,r,n){var s,o=1,a=t.length,h=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,a/=2,h/=2,i/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){var u=-1;for(s=i;s<a;s++)if(l(t,s)===l(e,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===h)return u*o}else-1!==u&&(s-=s-u),u=-1}else for(i+h>a&&(i=a-h),s=i;s>=0;s--){for(var c=!0,d=0;d<h;d++)if(l(t,s+d)!==l(e,d)){c=!1;break}if(c)return s}return-1}function _(t,e,i,r){i=Number(i)||0;var n=t.length-i;r?(r=Number(r))>n&&(r=n):r=n;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[i+o]=a}return o}function S(t,e,i,r){return K(U(e,t.length-i),t,i,r)}function w(t,e,i,r){return K(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,r)}function b(t,e,i,r){return w(t,e,i,r)}function E(t,e,i,r){return K(V(e),t,i,r)}function F(t,e,i,r){return K(function(t,e){for(var i,r,n,s=[],o=0;o<t.length&&!((e-=2)<0);++o)r=(i=t.charCodeAt(o))>>8,n=i%256,s.push(n),s.push(r);return s}(e,t.length-i),t,i,r)}function x(t,e,i){return 0===e&&i===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,i))}function C(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n<i;){var s,o,a,h,l=t[n],u=null,c=l>239?4:l>223?3:l>191?2:1;if(n+c<=i)switch(c){case 1:l<128&&(u=l);break;case 2:128==(192&(s=t[n+1]))&&(h=(31&l)<<6|63&s)>127&&(u=h);break;case 3:s=t[n+1],o=t[n+2],128==(192&s)&&128==(192&o)&&(h=(15&l)<<12|(63&s)<<6|63&o)>2047&&(h<55296||h>57343)&&(u=h);break;case 4:s=t[n+1],o=t[n+2],a=t[n+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(h=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&h<1114112&&(u=h)}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=c}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var i="",r=0;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=k));return i}(r)}e.Buffer=h,e.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},e.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=o(),h.poolSize=8192,h._augment=function(t){return t.__proto__=h.prototype,t},h.from=function(t,e,i){return l(null,t,e,i)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(t,e,i){return function(t,e,i,r){return u(e),e<=0?a(t,e):void 0!==i?"string"==typeof r?a(t,e).fill(i,r):a(t,e).fill(i):a(t,e)}(null,t,e,i)},h.allocUnsafe=function(t){return c(null,t)},h.allocUnsafeSlow=function(t){return c(null,t)},h.isBuffer=function(t){return!(null==t||!t._isBuffer)},h.compare=function(t,e){if(!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,r=e.length,n=0,s=Math.min(i,r);n<s;++n)if(t[n]!==e[n]){i=t[n],r=e[n];break}return i<r?-1:r<i?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var r=h.allocUnsafe(e),n=0;for(i=0;i<t.length;++i){var o=t[i];if(!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},h.byteLength=f,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},h.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):g.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",i=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},h.prototype.compare=function(t,e,i,r,n){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=i)return 0;if(r>=n)return-1;if(e>=i)return 1;if(this===t)return 0;for(var s=(n>>>=0)-(r>>>=0),o=(i>>>=0)-(e>>>=0),a=Math.min(s,o),l=this.slice(r,n),u=t.slice(e,i),c=0;c<a;++c)if(l[c]!==u[c]){s=l[c],o=u[c];break}return s<o?-1:o<s?1:0},h.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},h.prototype.indexOf=function(t,e,i){return m(this,t,e,i,!0)},h.prototype.lastIndexOf=function(t,e,i){return m(this,t,e,i,!1)},h.prototype.write=function(t,e,i,r){if(void 0===e)r="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)r=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-e;if((void 0===i||i>n)&&(i=n),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return _(this,t,e,i);case"utf8":case"utf-8":return S(this,t,e,i);case"ascii":return w(this,t,e,i);case"latin1":case"binary":return b(this,t,e,i);case"base64":return E(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,e,i);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function D(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(127&t[n]);return r}function A(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(t[n]);return r}function T(t,e,i){var r=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>r)&&(i=r);for(var n="",s=e;s<i;++s)n+=j(t[s]);return n}function P(t,e,i){for(var r=t.slice(e,i),n="",s=0;s<r.length;s+=2)n+=String.fromCharCode(r[s]+256*r[s+1]);return n}function I(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,i,r,n,s){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<s)throw new RangeError('"value" argument is out of bounds');if(i+r>t.length)throw new RangeError("Index out of range")}function R(t,e,i,r){e<0&&(e=65535+e+1);for(var n=0,s=Math.min(t.length-i,2);n<s;++n)t[i+n]=(e&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function L(t,e,i,r){e<0&&(e=4294967295+e+1);for(var n=0,s=Math.min(t.length-i,4);n<s;++n)t[i+n]=e>>>8*(r?n:3-n)&255}function N(t,e,i,r,n,s){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function O(t,e,i,r,s){return s||N(t,0,i,4),n.write(t,e,i,r,23,4),i+4}function H(t,e,i,r,s){return s||N(t,0,i,8),n.write(t,e,i,r,52,8),i+8}h.prototype.slice=function(t,e){var i,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),h.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=h.prototype;else{var n=e-t;i=new h(n,void 0);for(var s=0;s<n;++s)i[s]=this[s+t]}return i},h.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||I(t,e,this.length);for(var r=this[t],n=1,s=0;++s<e&&(n*=256);)r+=this[t+s]*n;return r},h.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||I(t,e,this.length);for(var r=this[t+--e],n=1;e>0&&(n*=256);)r+=this[t+--e]*n;return r},h.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||I(t,e,this.length);for(var r=this[t],n=1,s=0;++s<e&&(n*=256);)r+=this[t+s]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*e)),r},h.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||I(t,e,this.length);for(var r=e,n=1,s=this[t+--r];r>0&&(n*=256);)s+=this[t+--r]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*e)),s},h.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,e,i,r){t=+t,e|=0,i|=0,r||M(this,t,e,i,Math.pow(2,8*i)-1,0);var n=1,s=0;for(this[e]=255&t;++s<i&&(n*=256);)this[e+s]=t/n&255;return e+i},h.prototype.writeUIntBE=function(t,e,i,r){t=+t,e|=0,i|=0,r||M(this,t,e,i,Math.pow(2,8*i)-1,0);var n=i-1,s=1;for(this[e+n]=255&t;--n>=0&&(s*=256);)this[e+n]=t/s&255;return e+i},h.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,255,0),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},h.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},h.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},h.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},h.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},h.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);M(this,t,e,i,n-1,-n)}var s=0,o=1,a=0;for(this[e]=255&t;++s<i&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o|0)-a&255;return e+i},h.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);M(this,t,e,i,n-1,-n)}var s=i-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o|0)-a&255;return e+i},h.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,127,-128),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},h.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},h.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},h.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},h.prototype.writeFloatLE=function(t,e,i){return O(this,t,e,!0,i)},h.prototype.writeFloatBE=function(t,e,i){return O(this,t,e,!1,i)},h.prototype.writeDoubleLE=function(t,e,i){return H(this,t,e,!0,i)},h.prototype.writeDoubleBE=function(t,e,i){return H(this,t,e,!1,i)},h.prototype.copy=function(t,e,i,r){if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-i&&(r=t.length-e+i);var n,s=r-i;if(this===t&&i<e&&e<r)for(n=s-1;n>=0;--n)t[n+e]=this[n+i];else if(s<1e3||!h.TYPED_ARRAY_SUPPORT)for(n=0;n<s;++n)t[n+e]=this[n+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+s),e);return s},h.prototype.fill=function(t,e,i,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var s;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(s=e;s<i;++s)this[s]=t;else{var o=h.isBuffer(t)?t:U(new h(t,r).toString()),a=o.length;for(s=0;s<i-e;++s)this[s+e]=o[s%a]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function j(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var i;e=e||1/0;for(var r=t.length,n=null,s=[],o=0;o<r;++o){if((i=t.charCodeAt(o))>
vendor: 4,189 bytes, line 2
255295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&s.push(239,191,189);continue}n=i;continue}if(i<56320){(e-=3)>-1&&s.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,i<128){if((e-=1)<0)break;s.push(i)}else if(i<2048){if((e-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function V(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,i,r){for(var n=0;n<r&&!(n+i>=e.length||n>=t.length);++n)e[n+i]=t[n];return n}}).call(this,i(29))},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";e.byteLength=function(t){var e=h(t),i=e[0],r=e[1];return 3*(i+r)/4-r},e.toByteArray=function(t){var e,i,r=h(t),o=r[0],a=r[1],l=new s(function(t,e,i){return 3*(e+i)/4-i}(0,o,a)),u=0,c=a>0?o-4:o;for(i=0;i<c;i+=4)e=n[t.charCodeAt(i)]<<18|n[t.charCodeAt(i+1)]<<12|n[t.charCodeAt(i+2)]<<6|n[t.charCodeAt(i+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===a&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,l[u++]=255&e),1===a&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,s=[],o=16383,a=0,h=i-n;a<h;a+=o)s.push(l(t,a,a+o>h?h:a+o));return 1===n?(e=t[i-1],s.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],s.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),s.join("")};for(var r=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function h(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function l(t,e,i){for(var n,s,o=[],a=e;a<i;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(r[(s=n)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,i,r,n){var s,o,a=8*n-r-1,h=(1<<a)-1,l=h>>1,u=-7,c=i?n-1:0,d=i?-1:1,p=t[e+c];for(c+=d,s=p&(1<<-u)-1,p>>=-u,u+=a;u>0;s=256*s+t[e+c],c+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+t[e+c],c+=d,u-=8);if(0===s)s=1-l;else{if(s===h)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),s-=l}return(p?-1:1)*o*Math.pow(2,s-r)},e.write=function(t,e,i,r,n,s){var o,a,h,l=8*s-n-1,u=(1<<l)-1,c=u>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,f=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),(e+=o+c>=1?d/h:d*Math.pow(2,1-c))*h>=2&&(o++,h/=2),o+c>=u?(a=0,o=u):o+c>=1?(a=(e*h-1)*Math.pow(2,n),o+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;t[i+p]=255&a,p+=f,a/=256,n-=8);for(o=o<<n|a,l+=n;l>0;t[i+p]=255&o,p+=f,o/=256,l-=8);t[i+p-f]|=128*g}},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.jws,i=t.KeyUtil,n=t.X509,s=t.crypto,o=t.hextob64u,a=t.b64tohex,h=t.AllowedSigningAlgs;return function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.parseJwt=function t(i){r.Log.debug("JoseUtil.parseJwt");try{var n=e.JWS.parse(i);return{header:n.headerObj,payload:n.payloadObj}}catch(t){r.Log.error(t)}},t.validateJwt=function(e,s,o,h,l,u,c){r.Log.debug("JoseUtil.validateJwt");try{if("RSA"===s.kty)if(s.e&&s.n)s=i.getKey(s);else{if(!s.x5c||!s.x5c.length)return r.Log.error("JoseUtil.validateJwt: RSA key missing key material",s),Promise.reject(new Error("RSA key missing key material"));
vendor: 4,071 bytes, line 2
2var d=a(s.x5c[0]);s=n.getPublicKeyFromCertHex(d)}else{if("EC"!==s.kty)return r.Log.error("JoseUtil.validateJwt: Unsupported key type",s&&s.kty),Promise.reject(new Error(s.kty));if(!(s.crv&&s.x&&s.y))return r.Log.error("JoseUtil.validateJwt: EC key missing key material",s),Promise.reject(new Error("EC key missing key material"));s=i.getKey(s)}return t._validateJwt(e,s,o,h,l,u,c)}catch(t){return r.Log.error(t&&t.message||t),Promise.reject("JWT validation failed")}},t.validateJwtAttributes=function(e,i,n,s,o,a){s||(s=0),o||(o=parseInt(Date.now()/1e3));var h=t.parseJwt(e).payload;if(!h.iss)return r.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(h.iss!==i)return r.Log.error("JoseUtil._validateJwt: Invalid issuer in token",h.iss),Promise.reject(new Error("Invalid issuer in token: "+h.iss));if(!h.aud)return r.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(h.aud===n||Array.isArray(h.aud)&&h.aud.indexOf(n)>=0))return r.Log.error("JoseUtil._validateJwt: Invalid audience in token",h.aud),Promise.reject(new Error("Invalid audience in token: "+h.aud));if(h.azp&&h.azp!==n)return r.Log.error("JoseUtil._validateJwt: Invalid azp in token",h.azp),Promise.reject(new Error("Invalid azp in token: "+h.azp));if(!a){var l=o+s,u=o-s;if(!h.iat)return r.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(l<h.iat)return r.Log.error("JoseUtil._validateJwt: iat is in the future",h.iat),Promise.reject(new Error("iat is in the future: "+h.iat));if(h.nbf&&l<h.nbf)return r.Log.error("JoseUtil._validateJwt: nbf is in the future",h.nbf),Promise.reject(new Error("nbf is in the future: "+h.nbf));if(!h.exp)return r.Log.error("JoseUtil._validateJwt: exp was not provided"),Promise.reject(new Error("exp was not provided"));if(h.exp<u)return r.Log.error("JoseUtil._validateJwt: exp is in the past",h.exp),Promise.reject(new Error("exp is in the past:"+h.exp))}return Promise.resolve(h)},t._validateJwt=function(i,n,s,o,a,l,u){return t.validateJwtAttributes(i,s,o,a,l,u).then(function(t){try{return e.JWS.verify(i,n,h)?t:(r.Log.error("JoseUtil._validateJwt: signature validation failed"),Promise.reject(new Error("signature validation failed")))}catch(t){return r.Log.error(t&&t.message||t),Promise.reject(new Error("signature validation failed"))}})},t.hashString=function t(e,i){try{return s.Util.hashString(e,i)}catch(t){r.Log.error(t)}},t.hexToBase64Url=function t(e){try{return o(e)}catch(t){r.Log.error(t)}},t}()};var r=i(0);t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninResponse=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(3);e.SigninResponse=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=n.UrlUtility.parseUrlFragment(e,i);this.error=r.error,this.error_description=r.error_description,this.error_uri=r.error_uri,this.code=r.code,this.state=r.state,this.id_token=r.id_token,this.session_state=r.session_state,this.access_token=r.access_token,this.token_type=r.token_type,this.scope=r.scope,this.profile=void 0,this.expires_in=r.expires_in}return r(t,[{key:"expires_in",get:function(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}},set:function(t){var e=parseInt(t);if("number"==typeof e&&e>0){var i=parseInt(Date.now()/1e3);this.expires_at=i+e}}},{key:"expired",get:function(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),t}()},function(t,e,i){"use strict";
vendor: 6,769 bytes, line 2
2Object.defineProperty(e,"__esModule",{value:!0}),e.SignoutRequest=void 0;var r=i(0),n=i(3),s=i(9);e.SignoutRequest=function t(e){var i=e.url,o=e.id_token_hint,a=e.post_logout_redirect_uri,h=e.data,l=e.extraQueryParams,u=e.request_type;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!i)throw r.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var c in o&&(i=n.UrlUtility.addQueryParam(i,"id_token_hint",o)),a&&(i=n.UrlUtility.addQueryParam(i,"post_logout_redirect_uri",a),h&&(this.state=new s.State({data:h,request_type:u}),i=n.UrlUtility.addQueryParam(i,"state",this.state.id))),l)i=n.UrlUtility.addQueryParam(i,c,l[c]);this.url=i}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignoutResponse=void 0;var r=i(3);e.SignoutResponse=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=r.UrlUtility.parseUrlFragment(e,"?");this.error=i.error,this.error_description=i.error_description,this.error_uri=i.error_uri,this.state=i.state}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryWebStorage=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0);e.InMemoryWebStorage=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._data={}}return t.prototype.getItem=function(t){return n.Log.debug("InMemoryWebStorage.getItem",t),this._data[t]},t.prototype.setItem=function(t,e){n.Log.debug("InMemoryWebStorage.setItem",t),this._data[t]=e},t.prototype.removeItem=function(t){n.Log.debug("InMemoryWebStorage.removeItem",t),delete this._data[t]},t.prototype.key=function(t){return Object.getOwnPropertyNames(this._data)[t]},r(t,[{key:"length",get:function(){return Object.getOwnPropertyNames(this._data).length}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserManager=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=i(10),o=i(39),a=i(15),h=i(45),l=i(47),u=i(18),c=i(8),d=i(20),p=i(11),f=i(4);e.UserManager=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.SilentRenewService,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.SessionMonitor,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d.TokenRevocationClient,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:p.TokenClient,g=arguments.length>5&&void 0!==arguments[5]?arguments[5]:f.JoseUtil;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,e),i instanceof o.UserManagerSettings||(i=new o.UserManagerSettings(i));var v=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,i));return v._events=new h.UserManagerEvents(i),v._silentRenewService=new r(v),v.settings.automaticSilentRenew&&(n.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),v.startSilentRenew()),v.settings.monitorSession&&(n.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),v._sessionMonitor=new s(v)),v._tokenRevocationClient=new a(v._settings),v._tokenClient=new c(v._settings),v._joseUtil=g,v}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getUser=function(){var t=this;return this._loadUser().then(function(e){return e?(n.Log.info("UserManager.getUser: user loaded"),t._events.load(e,!1),e):(n.Log.info("UserManager.getUser: user not found in storage"),null)})},e.prototype.removeUser=function(){var t=this;return this.storeUser(null).then(function(){n.Log.info("UserManager.removeUser: user removed from storage"),t._events.unload()})},e.prototype.signinRedirect=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:r";var e={useReplaceToNavigate:t.useReplaceToNavigate};return this._signinStart(t,this._redirectNavigator,e).then(function(){n.Log.info("UserManager.signinRedirect: successful")})},e.prototype.signinRedirectCallback=function(t){return this._signinEnd(t||this._redirectNavigator.url).then(function(t){return t.profile&&t.profile.sub?n.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",t.profile.sub):n.Log.info("UserManager.signinRedirectCallback: no sub"),t})},e.prototype.signinPopup=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:p";var e=t.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return e?(t.redirect_uri=e,t.display="popup",this._signin(t,this._popupNavigator,{startUrl:e,popupWindowFeatures:t.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:t.popupWindowTarget||this.settings.popupWindowTarget}).then(function(t){return t&&(t.profile&&t.profile.sub?n.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",t.profile.sub):n.Log.info("UserManager.signinPopup: no sub")),t})):(n.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},e.prototype.signinPopupCallback=function(t){return this._signinCallback(t,this._popupNavigator).then(function(t){return t&&(t.profile&&t.profile.sub?n.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",t.profile.sub):n.Log.info("UserManager.signinPopupCallback: no sub")),t}).catch(function(t){n.Log.error(t.message)})},e.prototype.signinSilent=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=Object.assign({},e),this._loadUser().then(function(i){return i&&i.refresh_token?(e.refresh_token=i.refresh_token,t._useRefreshToken(e)):(e.request_type="si:s",e.id_token_hint=e.id_token_hint||t.settings.includeIdTokenInSilentRenew&&i&&i.id_token,i&&t._settings.val
2idateSubOnSilentRenew&&(n.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",i.profile.sub),e.current_sub=i.profile.sub),t._signinSilentIframe(e))})},e.prototype._useRefreshToken=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._tokenClient.exchangeRefreshToken(e).then(function(e){return e?e.access_token?t._loadUser().then(function(i){if(i){var r=Promise.resolve();return e.id_token&&(r=t._validateIdTokenFromTokenRefreshToken(i.profile,e.id_token)),r.then(function(){return n.Log.debug("UserManager._useRefreshToken: refresh token response success"),i.id_token=e.id_token||i.id_token,i.access_token=e.access_token,i.refresh_token=e.refresh_token||i.refresh_token,i.expires_in=e.expires_in,t.storeUser(i).then(function(){return t._events.load(i),i})})}return null}):(n.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"),Promise.reject("No access token returned from token endpoint")):(n.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"),Promise.reject("No response returned from token endpoint"))})},e.prototype._validateIdTokenFromTokenRefreshToken=function(t,e){var i=this;return this._metadataService.getIssuer().then(function(r){return i.settings.getEpochTime().then(function(s){return i._joseUtil.validateJwtAttributes(e,r,i._settings.client_id,i._settings.clockSkew,s).then(function(e){return e?e.sub!==t.sub?(n.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"),Promise.reject(new Error("sub in id_token does not match current sub"))):e.auth_time&&e.auth_time!==t.auth_time?(n.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"),Promise.reject(new Error("auth_time in id_token does not match original auth_time"))):e.azp&&e.azp!==t.azp?(n.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"),Promise.reject(new Error("azp in id_token does not match original azp"))):!e.azp&&t.azp?(n.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"),Promise.reject(new Error("azp not in id_token, but present in original id_token"))):void 0:(n.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"),Promise.reject(new Error("Failed to validate id_token")))})})})},e.prototype._signinSilentIframe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return e?(t.redirect_uri=e,t.prompt=t.prompt||"none",this._signin(t,this._iframeNavigator,{startUrl:e,silentRequestTimeout:t.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(t){return t&&(t.profile&&t.profile.sub?n.Log.info("UserManager.signinSilent: successful, signed in sub: ",t.profile.sub):n.Log.info("UserManager.signinSilent: no sub")),t})):(n.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},e.prototype.signinSilentCallback=function(t){return this._signinCallback(t,this._iframeNavigator).then(function(t){return t&&(t.profile&&t.profile.sub?n.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",t.profile.sub):n.Log.info("UserManager.signinSilentCallback: no sub")),t})},e.prototype.signinCallback=function(t){var e=this;return this.readSigninResponseState(t).then(function(i){var r=i.state;return i.response,"si:r"===r.request_type?e.signinRedirectCallback(t):"si:p"===r.request_type?e.signinPopupCallback(t):"si:s"===r.request_type?e.signinSilentCallback(t):Promise.reject(new Error("invalid response_type in state"))})},e.prototype.signoutCallback=function(t,e){var i=this;return this.readSignoutResponseState(t).then(function(r){var n=r.state,s=r.response;return n?"so:r"===n.request_type?i.signoutRedirectCallback(t):"so:p"===n.request_type?i.signoutPopupCallback(t,e):Promise.reject(new Error("invalid response_type in state")):s})},e.prototype.querySessionStatus=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:s";var i=e.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return i?(e.redirect_uri=i,e.prompt="none",e.response_type=e.response_type||this.settings.query_status_response_type,e.scope=e.scope||"openid",e.skipUserInfo=!0,this._signinStart(e,this._iframeNavigator,{startUrl:i,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(e){return t.processSigninResponse(e.url).then(function(t){if(n.Log.debug("UserManager.querySessionStatus: got signin response"),t.session_state&&t.profile.sub)return n.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",t.profile.sub),{session_state:t.session_state,sub:t.profile.sub,sid:t.profile.sid};n.Log.info("querySessionStatus successful, user not authenticated")}
2).catch(function(e){if(e.session_state&&t.settings.monitorAnonymousSession&&("login_required"==e.message||"consent_required"==e.message||"interaction_required"==e.message||"account_selection_required"==e.message))return n.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:e.session_state};throw e})})):(n.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},e.prototype._signin=function(t,e){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(t,e,r).then(function(e){return i._signinEnd(e.url,t)})},e.prototype._signinStart=function(t,e){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.prepare(r).then(function(e){return n.Log.debug("UserManager._signinStart: got navigator window handle"),i.createSigninRequest(t).then(function(t){return n.Log.debug("UserManager._signinStart: got signin request"),r.url=t.url,r.id=t.state.id,e.navigate(r)}).catch(function(t){throw e.close&&(n.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),e.close()),t})})},e.prototype._signinEnd=function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(t).then(function(t){n.Log.debug("UserManager._signinEnd: got signin response");var r=new a.User(t);if(i.current_sub){if(i.current_sub!==r.profile.sub)return n.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",r.profile.sub),Promise.reject(new Error("login_required"));n.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return e.storeUser(r).then(function(){return n.Log.debug("UserManager._signinEnd: user stored"),e._events.load(r),r})})},e.prototype._signinCallback=function(t,e){n.Log.debug("UserManager._signinCallback");var i="query"===this._settings.response_mode||!this._settings.response_mode&&c.SigninRequest.isCode(this._settings.response_type)?"?":"#";return e.callback(t,void 0,i)},e.prototype.signoutRedirect=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="so:r";var e=t.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;e&&(t.post_logout_redirect_uri=e);var i={useReplaceToNavigate:t.useReplaceToNavigate};return this._signoutStart(t,this._redirectNavigator,i).then(function(){n.Log.info("UserManager.signoutRedirect: successful")})},e.prototype.signoutRedirectCallback=function(t){return this._signoutEnd(t||this._redirectNavigator.url).then(function(t){return n.Log.info("UserManager.signoutRedirectCallback: successful"),t})},e.prototype.signoutPopup=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="so:p";var e=t.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return t.post_logout_redirect_uri=e,t.display="popup",t.post_logout_redirect_uri&&(t.state=t.state||{}),this._signout(t,this._popupNavigator,{startUrl:e,popupWindowFeatures:t.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:t.popupWindowTarget||this.settings.popupWindowTarget}).then(function(){n.Log.info("UserManager.signoutPopup: successful")})},e.prototype.signoutPopupCallback=function(t,e){return void 0===e&&"boolean"==typeof t&&(e=t,t=null),this._popupNavigator.callback(t,e,"?").then(function(){n.Log.info("UserManager.signoutPopupCallback: successful")})},e.prototype._signout=function(t,e){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(t,e,r).then(function(t){return i._signoutEnd(t.url)})},e.prototype._signoutStart=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return arguments[1].prepare(i).then(function(r){return n.Log.debug("UserManager._signoutStart: got navigator window handle"),e._loadUser().then(function(s){return n.Log.debug("UserManager._signoutStart: loaded current user from storage"),(e._settings.revokeAccessTokenOnSignout?e._revokeInternal(s):Promise.resolve()).then(function(){var o=t.id_token_hint||s&&s.id_token;return o&&(n.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),t.id_token_hint=o),e.removeUser().then(function(){return n.Log.debug("UserManager._signoutStart: user removed, creating signout request"),e.createSignoutRequest
2(t).then(function(t){return n.Log.debug("UserManager._signoutStart: got signout request"),i.url=t.url,t.state&&(i.id=t.state.id),r.navigate(i)})})})}).catch(function(t){throw r.close&&(n.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),r.close()),t})})},e.prototype._signoutEnd=function(t){return this.processSignoutResponse(t).then(function(t){return n.Log.debug("UserManager._signoutEnd: got signout response"),t})},e.prototype.revokeAccessToken=function(){var t=this;return this._loadUser().then(function(e){return t._revokeInternal(e,!0).then(function(i){if(i)return n.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),e.access_token=null,e.refresh_token=null,e.expires_at=null,e.token_type=null,t.storeUser(e).then(function(){n.Log.debug("UserManager.revokeAccessToken: user stored"),t._events.load(e)})})}).then(function(){n.Log.info("UserManager.revokeAccessToken: access token revoked successfully")})},e.prototype._revokeInternal=function(t,e){var i=this;if(t){var r=t.access_token,s=t.refresh_token;return this._revokeAccessTokenInternal(r,e).then(function(t){return i._revokeRefreshTokenInternal(s,e).then(function(e){return t||e||n.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"),t||e})})}return Promise.resolve(!1)},e.prototype._revokeAccessTokenInternal=function(t,e){return!t||t.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(t,e).then(function(){return!0})},e.prototype._revokeRefreshTokenInternal=function(t,e){return t?this._tokenRevocationClient.revoke(t,e,"refresh_token").then(function(){return!0}):Promise.resolve(!1)},e.prototype.startSilentRenew=function(){this._silentRenewService.start()},e.prototype.stopSilentRenew=function(){this._silentRenewService.stop()},e.prototype._loadUser=function(){return this._userStore.get(this._userStoreKey).then(function(t){return t?(n.Log.debug("UserManager._loadUser: user storageString loaded"),a.User.fromStorageString(t)):(n.Log.debug("UserManager._loadUser: no user storageString"),null)})},e.prototype.storeUser=function(t){if(t){n.Log.debug("UserManager.storeUser: storing user");var e=t.toStorageString();return this._userStore.set(this._userStoreKey,e)}return n.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},r(e,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),e}(s.OidcClient)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserManagerSettings=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=(i(0),i(5)),s=i(40),o=i(41),a=i(43),h=i(6),l=i(1),u=i(8);e.UserManagerSettings=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.popup_redirect_uri,n=i.popup_post_logout_redirect_uri,c=i.popupWindowFeatures,d=i.popupWindowTarget,p=i.silent_redirect_uri,f=i.silentRequestTimeout,g=i.automaticSilentRenew,v=void 0!==g&&g,m=i.validateSubOnSilentRenew,y=void 0!==m&&m,_=i.includeIdTokenInSilentRenew,S=void 0===_||_,w=i.monitorSession,b=void 0===w||w,E=i.monitorAnonymousSession,F=void 0!==E&&E,x=i.checkSessionInterval,C=void 0===x?2e3:x,k=i.stopCheckSessionOnError,D=void 0===k||k,A=i.query_status_response_type,T=i.revokeAccessTokenOnSignout,P=void 0!==T&&T,I=i.accessTokenExpiringNotificationTime,M=void 0===I?60:I,R=i.redirectNavigator,L=void 0===R?new s.RedirectNavigator:R,N=i.popupNavigator,O=void 0===N?new o.PopupNavigator:N,H=i.iframeNavigator,B=void 0===H?new a.IFrameNavigator:H,j=i.userStore,U=void 0===j?new h.WebStorageStateStore({store:l.Global.sessionStorage}):j;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var V=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,arguments[0]));return V._popup_redirect_uri=r,V._popup_post_logout_redirect_uri=n,V._popupWindowFeatures=c,V._popupWindowTarget=d,V._silent_redirect_uri=p,V._silentRequestTimeout=f,V._automaticSilentRenew=v,V._validateSubOnSilentRenew=y,V._includeIdTokenInSilentRenew=S,V._accessTokenExpiringNotificationTime=M,V._monitorSession=b,V._monitorAnonymousSession=F,V._checkSessionInterval=C,V._stopCheckSessionOnError=D,A?V._query_status_response_type=A:arguments[0]&&arguments[0].response_type?V._query_status_response_type=u.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":V._query_status_response_type="id_token",V._revokeAccessTokenOnSignout=P,V._redirectNavigator=L,V._popupNavigator=O,V._iframeNavigator=B,V._userStore=U,V}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"popup_redirect_uri",get:function(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function(){return this._val
vendor: 4,690 bytes, line 2
2idateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function(){return this._redirectNavigator}},{key:"popupNavigator",get:function(){return this._popupNavigator}},{key:"iframeNavigator",get:function(){return this._iframeNavigator}},{key:"userStore",get:function(){return this._userStore}}]),e}(n.OidcClientSettings)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RedirectNavigator=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0);e.RedirectNavigator=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.prepare=function(){return Promise.resolve(this)},t.prototype.navigate=function(t){return t&&t.url?(t.useReplaceToNavigate?window.location.replace(t.url):window.location=t.url,Promise.resolve()):(n.Log.error("RedirectNavigator.navigate: No url provided"),Promise.reject(new Error("No url provided")))},r(t,[{key:"url",get:function(){return window.location.href}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PopupNavigator=void 0;var r=i(0),n=i(42);e.PopupNavigator=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.prepare=function(t){var e=new n.PopupWindow(t);return Promise.resolve(e)},t.prototype.callback=function t(e,i,s){r.Log.debug("PopupNavigator.callback");try{return n.PopupWindow.notifyOpener(e,i,s),Promise.resolve()}catch(t){return Promise.reject(t)}},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PopupWindow=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=i(3);e.PopupWindow=function(){function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._promise=new Promise(function(t,e){i._resolve=t,i._reject=e});var r=e.popupWindowTarget||"_blank",s=e.popupWindowFeatures||"location=no,toolbar=no,width=500,height=500,left=100,top=100;";this._popup=window.open("",r,s),this._popup&&(n.Log.debug("PopupWindow.ctor: popup successfully created"),this._checkForPopupClosedTimer=window.setInterval(this._checkForPopupClosed.bind(this),500))}return t.prototype.navigate=function(t){return this._popup?t&&t.url?(n.Log.debug("PopupWindow.navigate: Setting URL in popup"),this._id=t.id,this._id&&(window["popupCallback_"+t.id]=this._callback.bind(this)),this._popup.focus(),this._popup.window.location=t.url):(this._error("PopupWindow.navigate: no url provided"),this._error("No url provided")):this._error("PopupWindow.navigate: Error opening popup window"),this.promise},t.prototype._success=function(t){n.Log.debug("PopupWindow.callback: Successful response from popup window"),this._cleanup(),this._resolve(t)},t.prototype._error=function(t){n.Log.error("PopupWindow.error: ",t),this._cleanup(),this._reject(new Error(t))},t.prototype.close=function(){this._cleanup(!1)},t.prototype._cleanup=function(t){n.Log.debug("PopupWindow.cleanup"),window.clearInterval(this._checkForPopupClosedTimer),this._checkForPopupClosedTimer=null,delete window["popupCallback_"+this._id],this._popup&&!t&&this._popup.close(),this._popup=null},t.prototype._checkForPopupClosed=function(){this._popup&&!this._popup.closed||this._error("Popup window closed")},t.prototype._callback=function(t,e){this._cleanup(e),t?(n.Log.debug("PopupWindow.callback success"),this._success({url:t})):(n.Log.debug("PopupWindow.callback: Invalid response from popup"),this._error("Invalid response from popup"))}
vendor: 4,251 bytes, line 2
2,t.notifyOpener=function(t,e,i){if(window.opener){if(t=t||window.location.href){var r=s.UrlUtility.parseUrlFragment(t,i);if(r.state){var o="popupCallback_"+r.state,a=window.opener[o];a?(n.Log.debug("PopupWindow.notifyOpener: passing url message to opener"),a(t,e)):n.Log.warn("PopupWindow.notifyOpener: no matching callback found on opener")}else n.Log.warn("PopupWindow.notifyOpener: no state found in response url")}}else n.Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.")},r(t,[{key:"promise",get:function(){return this._promise}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IFrameNavigator=void 0;var r=i(0),n=i(44);e.IFrameNavigator=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.prepare=function(t){var e=new n.IFrameWindow(t);return Promise.resolve(e)},t.prototype.callback=function t(e){r.Log.debug("IFrameNavigator.callback");try{return n.IFrameWindow.notifyParent(e),Promise.resolve()}catch(t){return Promise.reject(t)}},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IFrameWindow=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0);e.IFrameWindow=function(){function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._promise=new Promise(function(t,e){i._resolve=t,i._reject=e}),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.width=0,this._frame.height=0,window.document.body.appendChild(this._frame)}return t.prototype.navigate=function(t){if(t&&t.url){var e=t.silentRequestTimeout||1e4;n.Log.debug("IFrameWindow.navigate: Using timeout of:",e),this._timer=window.setTimeout(this._timeout.bind(this),e),this._frame.src=t.url}else this._error("No url provided");return this.promise},t.prototype._success=function(t){this._cleanup(),n.Log.debug("IFrameWindow: Successful response from frame window"),this._resolve(t)},t.prototype._error=function(t){this._cleanup(),n.Log.error(t),this._reject(new Error(t))},t.prototype.close=function(){this._cleanup()},t.prototype._cleanup=function(){this._frame&&(n.Log.debug("IFrameWindow: cleanup"),window.removeEventListener("message",this._boundMessageEvent,!1),window.clearTimeout(this._timer),window.document.body.removeChild(this._frame),this._timer=null,this._frame=null,this._boundMessageEvent=null)},t.prototype._timeout=function(){n.Log.debug("IFrameWindow.timeout"),this._error("Frame window timed out")},t.prototype._message=function(t){if(n.Log.debug("IFrameWindow.message"),this._timer&&t.origin===this._origin&&t.source===this._frame.contentWindow&&"string"==typeof t.data&&(t.data.startsWith("http://")||t.data.startsWith("https://"))){var e=t.data;e?this._success({url:e}):this._error("Invalid response from frame")}},t.notifyParent=function(t){n.Log.debug("IFrameWindow.notifyParent"),(t=t||window.location.href)&&(n.Log.debug("IFrameWindow.notifyParent: posting url message to parent"),window.parent.postMessage(t,location.protocol+"//"+location.host))},r(t,[{key:"promise",get:function(){return this._promise}},{key:"_origin",get:function(){return location.protocol+"//"+location.host}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserManagerEvents=void 0;var r=i(0),n=i(16),s=i(17);e.UserManagerEvents=function(t){function e(i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,i));return r._userLoaded=new s.Event("User loaded"),r._userUnloaded=new s.Event("User unloaded"),r._silentRenewError=ne
vendor: 4,378 bytes, line 2
2w s.Event("Silent renew error"),r._userSignedIn=new s.Event("User signed in"),r._userSignedOut=new s.Event("User signed out"),r._userSessionChanged=new s.Event("User session changed"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(e){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r.Log.debug("UserManagerEvents.load"),t.prototype.load.call(this,e),i&&this._userLoaded.raise(e)},e.prototype.unload=function(){r.Log.debug("UserManagerEvents.unload"),t.prototype.unload.call(this),this._userUnloaded.raise()},e.prototype.addUserLoaded=function(t){this._userLoaded.addHandler(t)},e.prototype.removeUserLoaded=function(t){this._userLoaded.removeHandler(t)},e.prototype.addUserUnloaded=function(t){this._userUnloaded.addHandler(t)},e.prototype.removeUserUnloaded=function(t){this._userUnloaded.removeHandler(t)},e.prototype.addSilentRenewError=function(t){this._silentRenewError.addHandler(t)},e.prototype.removeSilentRenewError=function(t){this._silentRenewError.removeHandler(t)},e.prototype._raiseSilentRenewError=function(t){r.Log.debug("UserManagerEvents._raiseSilentRenewError",t.message),this._silentRenewError.raise(t)},e.prototype.addUserSignedIn=function(t){this._userSignedIn.addHandler(t)},e.prototype.removeUserSignedIn=function(t){this._userSignedIn.removeHandler(t)},e.prototype._raiseUserSignedIn=function(){r.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},e.prototype.addUserSignedOut=function(t){this._userSignedOut.addHandler(t)},e.prototype.removeUserSignedOut=function(t){this._userSignedOut.removeHandler(t)},e.prototype._raiseUserSignedOut=function(){r.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},e.prototype.addUserSessionChanged=function(t){this._userSessionChanged.addHandler(t)},e.prototype.removeUserSessionChanged=function(t){this._userSessionChanged.removeHandler(t)},e.prototype._raiseUserSessionChanged=function(){r.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},e}(n.AccessTokenEvents)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timer=void 0;var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),s=i(1),o=i(17);e.Timer=function(t){function e(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Global.timer,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,i));return o._timer=r,o._nowFunc=n||function(){return Date.now()/1e3},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.init=function(t){t<=0&&(t=1),t=parseInt(t);var e=this.now+t;if(this.expiration===e&&this._timerHandle)n.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),n.Log.debug("Timer.init timer "+this._name+" for duration:",t),this._expiration=e;var i=5;t<i&&(i=t),this._timerHandle=this._timer.setInterval(this._callback.bind(this),1e3*i)}},e.prototype.cancel=function(){this._timerHandle&&(n.Log.debug("Timer.cancel: ",this._name),this._timer.clearInterval(this._timerHandle),this._timerHandle=null)},e.prototype._callback=function(){var e=this._expiration-this.now;n.Log.debug("Timer.callback; "+this._name+" timer expires in:",e),this._expiration<=this.now&&(this.cancel(),t.prototype.raise.call(this))}
2,r(e,[{key:"now",get:function(){return parseInt(this._nowFunc())}},{key:"expiration",get:function(){return this._expiration}}]),e}(o.Event)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SilentRenewService=void 0;var r=i(0);e.SilentRenewService=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._userManager=e}return t.prototype.start=function(){this._callback||(this._callback=this._tokenExpiring.bind(this),this._userManager.events.addAccessTokenExpiring(this._callback),this._userManager.getUser().then(function(t){}).catch(function(t){r.Log.error("SilentRenewService.start: Error from getUser:",t.message)}))},t.prototype.stop=function(){this._callback&&(this._userManager.events.removeAccessTokenExpiring(this._callback),delete this._callback)},t.prototype._tokenExpiring=function(){var t=this;this._userManager.signinSilent().then(function(t){r.Log.debug("SilentRenewService._tokenExpiring: Silent token renewal successful")},function(e){r.Log.error("SilentRenewService._tokenExpiring: Error from signinSilent:",e.message),t._userManager.events._raiseSilentRenewError(e)})},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaPopupNavigator=void 0;var r=i(21);e.CordovaPopupNavigator=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.prepare=function(t){var e=new r.CordovaPopupWindow(t);return Promise.resolve(e)},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaIFrameNavigator=void 0;var r=i(21);e.CordovaIFrameNavigator=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.prepare=function(t){t.popupWindowFeatures="hidden=yes";var e=new r.CordovaPopupWindow(t);return Promise.resolve(e)},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Version="1.11.5"}])},t.exports=e()},65871:function(t,e,i){"use strict";i.d(e,{Ay:function(){return o}});var r=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,n=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4}
2)?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,s=/[^-+\dA-Z]/g;function o(t,e,i,n){if(1!==arguments.length||"string"!=typeof t||/\d/.test(t)||(e=t,t=void 0),(t=t||0===t?t:new Date)instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");var s=(e=String(a[e]||e||a.default)).slice(0,4);"UTC:"!==s&&"GMT:"!==s||(e=e.slice(4),i=!0,"GMT:"===s&&(n=!0));var o=function(){return i?"getUTC":"get"},f=function(){return t[o()+"Date"]()},g=function(){return t[o()+"Day"]()},v=function(){return t[o()+"Month"]()},m=function(){return t[o()+"FullYear"]()},y=function(){return t[o()+"Hours"]()},_=function(){return t[o()+"Minutes"]()},S=function(){return t[o()+"Seconds"]()},w=function(){return t[o()+"Milliseconds"]()},b=function(){return i?0:t.getTimezoneOffset()},E=function(){return c(t)},F={d:function(){return f()},dd:function(){return l(f())},ddd:function(){return h.dayNames[g()]},DDD:function(){return u({y:m(),m:v(),d:f(),_:o(),dayName:h.dayNames[g()],short:!0})},dddd:function(){return h.dayNames[g()+7]},DDDD:function(){return u({y:m(),m:v(),d:f(),_:o(),dayName:h.dayNames[g()+7]})},m:function(){return v()+1},mm:function(){return l(v()+1)},mmm:function(){return h.monthNames[v()]},mmmm:function(){return h.monthNames[v()+12]},yy:function(){return String(m()).slice(2)},yyyy:function(){return l(m(),4)},h:function(){return y()%12||12},hh:function(){return l(y()%12||12)},H:function(){return y()},HH:function(){return l(y())},M:function(){return _()},MM:function(){return l(_())},s:function(){return S()},ss:function(){return l(S())},l:function(){return l(w(),3)},L:function(){return l(Math.floor(w()/10))},t:function(){return y()<12?h.timeNames[0]:h.timeNames[1]},tt:function(){return y()<12?h.timeNames[2]:h.timeNames[3]},T:function(){return y()<12?h.timeNames[4]:h.timeNames[5]},TT:function(){return y()<12?h.timeNames[6]:h.timeNames[7]},Z:function(){return n?"GMT":i?"UTC":p(t)},o:function(){return(b()>0?"-":"+")+l(100*Math.floor(Math.abs(b())/60)+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+l(Math.floor(Math.abs(b())/60),2)+":"+l(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][f()%10>3?0:(f()%100-f()%10!=10)*f()%10]},W:function(){return E()},WW:function(){return l(E())},N:function(){return d(t)}};return e.replace(r,function(t){return t in F?F[t]():t.slice(1,t.length-1)})}var a={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},h={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return String(t).padStart(e,"0")},u=function(t){var e=t.y,i=t.m,r=t.d,n=t._,s=t.dayName,o=t.short,a=void 0!==o&&o,h=new Date,l=new Date;l.setDate(l[n+"Date"]()-1);var u=new Date;u.setDate(u[n+"Date"]()+1);return h[n+"FullYear"]()===e&&h[n+"Month"]()===i&&h[n+"Date"]()===r?a?"Tdy":"Today":l[n+"FullYear"]()===e&&l[n+"Month"]()===i&&l[n+"Date"]()===r?a?"Ysd":"Yesterday":u[n+"FullYear"]()===e&&u[n+"Month"]()===i&&u[n+"Date"]()===r?a?"Tmw":"Tomorrow":s},c=function(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate());e.setDate(e.getDate()-(e.getDay()+6)%7+3);var i=new Date(e.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var r=e.getTimezoneOffset()-i.getTimezoneOffset();e.setHours(e.getHours()-r);var n=(e-i)/6048e5;return 1+Math.floor(n)},d=function(t){var e=t.getDay();return 0===e&&(e=7),e},p=function(t){return(String(t).match(n)||[""]).pop().replace(s,"").replace(/GMT\+0000/g,"UTC")}}
2,47421:function(t,e,i){"use strict";i.d(e,{W:function(){return r}});const r={version:"1.6.0",init(t=document.body){for(let e of t.querySelectorAll(".swiffy-slider"))this.initSlider(e)},initSlider(t){for(let e of t.querySelectorAll(".slider-nav")){let i=e.classList.contains("slider-nav-next");e.addEventListener("click",()=>this.slide(t,i),{passive:!0})}for(let e of t.querySelectorAll(".slider-indicators"))e.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(t,()=>this.handleIndicators(t),60);if(t.classList.contains("slider-nav-autoplay")){const e=t.getAttribute("data-slider-nav-autoplay-interval")?t.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(t,e,t.classList.contains("slider-nav-autopause"))}if(["slider-nav-autohide","slider-nav-animation"].some(e=>t.classList.contains(e))){const e=t.getAttribute("data-slider-nav-animation-threshold")?t.getAttribute("data-slider-nav-animation-threshold"):.3;this.setVisibleSlides(t,e)}},setVisibleSlides(t,e=.3){let i=new IntersectionObserver(e=>{e.forEach(t=>{t.isIntersecting?t.target.classList.add("slide-visible"):t.target.classList.remove("slide-visible")}),t.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?t.classList.add("slider-item-first-visible"):t.classList.remove("slider-item-first-visible"),t.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?t.classList.add("slider-item-last-visible"):t.classList.remove("slider-item-last-visible")},{root:t.querySelector(".slider-container"),threshold:e});for(let e of t.querySelectorAll(".slider-container>*"))i.observe(e)},slide(t,e=!0){const i=t.querySelector(".slider-container"),r=t.classList.contains("slider-nav-page"),n=t.classList.contains("slider-nav-noloop"),s=t.classList.contains("slider-nav-nodelay"),o=i.children,a=parseInt(window.getComputedStyle(i).columnGap),h=o[0].offsetWidth+a;let l=e?i.scrollLeft+h:i.scrollLeft-h;r&&(l=e?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft<1&&!e&&!n&&(l=i.scrollWidth-i.offsetWidth),i.scrollLeft>=i.scrollWidth-i.offsetWidth&&e&&!n&&(l=0),i.scroll({left:l,behavior:s?"auto":"smooth"})},slideToByIndicator(){const t=window.event.target,e=Array.from(t.parentElement.children).indexOf(t),i=t.parentElement.children.length,r=t.closest(".swiffy-slider"),n=r.querySelector(".slider-container").children.length/i*e;this.slideTo(r,n)},slideTo(t,e){const i=t.querySelector(".slider-container"),r=parseInt(window.getComputedStyle(i).columnGap),n=i.children[0].offsetWidth+r,s=t.classList.contains("slider-nav-nodelay");i.scroll({left:n*e,behavior:s?"auto":"smooth"})},onSlideEnd(t,e,i=125){let r;t.querySelector(".slider-container").addEventListener("scroll",function(){window.clearTimeout(r),r=setTimeout(e,i)},{capture:!1,passive:!0})},autoPlay(t,e,i){e=e<750?750:e;let r=setInterval(()=>this.slide(t),e);const n=()=>this.autoPlay(t,e,i);return i&&(["mouseover","touchstart"].forEach(function(e){t.addEventListener(e,function(){window.clearTimeout(r)},{once:!0,passive:!0})}),["mouseout","touchend"].forEach(function(e){t.addEventListener(e,function(){n()},{once:!0,passive:!0})})),r},handleIndicators(t){if(!t)return;const e=t.querySelector(".slider-container"),i=e.scrollWidth-e.offsetWidth,r=e.scrollLeft/i;for(let e of t.querySelectorAll(".slider-indicators")){let t=e.children,i=Math.abs(Math.round((t.length-1)*r));for(let e of t)e.classList.remove("active");t[i].classList.add("active")}}}}}]); 3//# sourceMappingURL=vendor.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.