(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";var r=n(1),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=r.createContext&&r.createContext(i),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=t.left&&e.left=t.top&&e.top");document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return d(e),t}()),C}function A(e){return e=Math.max(0,e),e=Math.round(e)}function M(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=A(e.offsetWidth-e.clientWidth-r-i),l={borderLeft:r,borderRight:i,borderTop:o,borderBottom:a,scrollbarBottom:A(e.offsetHeight-e.clientHeight-o-a),scrollbarLeft:0,scrollbarRight:0};return P()&&"rtl"===n.direction?l.scrollbarLeft=s:l.scrollbarRight=s,t&&(l.paddingLeft=parseInt(n.paddingLeft,10)||0,l.paddingRight=parseInt(n.paddingRight,10)||0,l.paddingTop=parseInt(n.paddingTop,10)||0,l.paddingBottom=parseInt(n.paddingBottom,10)||0),l}function I(e,t){void 0===t&&(t=!1);var n=j(e),r=M(e,t),i={left:n.left+r.borderLeft+r.scrollbarLeft,right:n.right-r.borderRight-r.scrollbarRight,top:n.top+r.borderTop,bottom:n.bottom-r.borderBottom-r.scrollbarBottom};return t&&(i.left+=r.paddingLeft,i.right-=r.paddingRight,i.top+=r.paddingTop,i.bottom-=r.paddingBottom),i}function j(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function D(e){return e.getBoundingClientRect().height+R(e)}function R(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}function L(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function N(e){return L(e).map(function(e){return I(e)}).concat({left:window.pageXOffset,right:window.pageXOffset+document.documentElement.clientWidth,top:window.pageYOffset,bottom:window.pageYOffset+document.documentElement.clientHeight}).reduce(function(e,t){return E(e,t)||t})}function z(e){e.preventDefault()}function B(e,t,n,r){function i(e){var t=v(e.target,n);t&&r.call(t,e,t)}return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var F=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function U(e,t){var n=function n(r){t(r),F.forEach(function(t){e.removeEventListener(t,n)})};F.forEach(function(t){e.addEventListener(t,n)})}var V=["sun","mon","tue","wed","thu","fri","sat"];function H(e,t){var n=ee(e);return n[2]+=7*t,te(n)}function q(e,t){var n=ee(e);return n[2]+=t,te(n)}function G(e,t){var n=ee(e);return n[6]+=t,te(n)}function W(e,t){return K(e,t)/7}function K(e,t){return(t.valueOf()-e.valueOf())/864e5}function Z(e,t){return re(e)===re(t)?Math.round(K(e,t)):null}function Y(e){return te([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function X(e,t,n,r){var i=te([t,0,1+J(t,n,r)]),o=Y(e),a=Math.round(K(i,o));return Math.floor(a/7)+1}function J(e,t,n){var r=7+t-n;return-((7+te([e,0,r]).getUTCDay()-t)%7)+r-1}function $(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Q(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function ee(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function te(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function ne(e){return!isNaN(e.valueOf())}function re(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}var ie=["years","months","days","milliseconds"],oe=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ae(e,t){var n;return"string"===typeof e?function(e){var t=oe.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"===typeof e&&e?se(e):"number"===typeof e?se(((n={})[t||"milliseconds"]=e,n)):null}function se(e){return{years:e.years||e.year||0,months:e.months||e.month||0,days:(e.days||e.day||0)+7*le(e),milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)}}function le(e){return e.weeks||e.week||0}function ue(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function ce(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function pe(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function fe(e){return de(e)/864e5}function de(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function he(e,t){for(var n=null,r=0;rt&&(t=r)}}),t++,e.forEach(function(e){e.style.width=t+"px"}),t}function Se(e,t){var n={position:"relative",left:-1};x(e,n),x(t,n);var r=e.getBoundingClientRect().height-t.getBoundingClientRect().height,i={position:"",left:""};return x(e,i),x(t,i),r}function Ee(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",z)}function ke(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",z)}function Oe(e){e.addEventListener("contextmenu",z)}function Te(e){e.removeEventListener("contextmenu",z)}function Ce(e,t,n){var r,i;for(r=0;r=de(t)&&(r=q(r,1))}return e.start&&(n=Y(e.start),r&&r<=n&&(r=q(n,1))),{start:n,end:r}}function Fe(e){var t=Be(e);return K(t.start,t.end)>1}function Ue(e,t,n,r){return"year"===r?ae(n.diffWholeYears(e,t),"year"):"month"===r?ae(n.diffWholeMonths(e,t),"month"):function(e,t){var n=Y(e),r=Y(t);return{years:0,months:0,days:Math.round(K(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}var Ve=function(e,t){return(Ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function He(e,t){function n(){this.constructor=e}Ve(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var qe=function(){return(qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;o--)if("object"===typeof(a=e[o][r])&&a)i.unshift(a);else if(void 0!==a){l[r]=a;break}i.length&&(l[r]=Ke(i))}for(n=e.length-1;n>=0;n--)for(r in s=e[n])r in l||(l[r]=s[r]);return l}function Ze(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Ye(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Xe(e){for(var t={},n=0,r=e;no&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return ot.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function dt(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t1)||"numeric"!==r.year&&"2-digit"!==r.year||"numeric"!==r.month&&"2-digit"!==r.month||"numeric"!==r.day&&"2-digit"!==r.day||(a=1);var s=this.format(e,n),l=this.format(t,n);if(s===l)return s;var u=Et(function(e,t){var n={};for(var r in e)r in gt&&!(gt[r]<=t)||(n[r]=e[r]);return n}(r,a),i,n),c=u(e),p=u(t),f=function(e,t,n,r){var i=0;for(;i/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function an(e){var t=[];for(var n in e){var r=e[n];null!=r&&""!==r&&t.push(n+":"+r)}return t.join(";")}function sn(e){return Array.isArray(e)?e:"string"===typeof e?e.split(/\s+/):[]}var ln={editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:null,overlap:null,allow:null,className:sn,classNames:sn,color:String,backgroundColor:String,borderColor:String,textColor:String};function un(e,t,n){var r=Ne(e,ln,{},n),i=function(e,t){return Array.isArray(e)?Qe(e,"",t,!0):"object"===typeof e&&e?Qe([e],"",t,!0):null!=e?String(e):null}(r.constraint,t);return{startEditable:null!=r.startEditable?r.startEditable:r.editable,durationEditable:null!=r.durationEditable?r.durationEditable:r.editable,constraints:null!=i?[i]:[],overlap:r.overlap,allows:null!=r.allow?[r.allow]:[],backgroundColor:r.backgroundColor||r.color,borderColor:r.borderColor||r.color,textColor:r.textColor,classNames:r.classNames.concat(r.className)}}function cn(e,t,n,r){var i={},o={};for(var a in ln){var s=e+Ae(a);i[a]=t[s],o[s]=!0}if("event"===e&&(i.editable=t.editable),r)for(var a in t)o[a]||(r[a]=t[a]);return un(i,n)}var pn={startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function fn(e){return e.reduce(dn,pn)}function dn(e,t){return{startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"===typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var hn={id:String,groupId:String,title:String,url:String,rendering:String,extendedProps:null},mn={start:null,date:null,end:null,allDay:null},vn=0;function gn(e,t,n,r){var i=function(e,t){var n=null;if(e){var r=t.state.eventSources[e];n=r.allDayDefault}null==n&&(n=t.opt("allDayDefault"));return n}(t,n),o={},a=function(e,t,n,r,i){for(var o=0;o'+i+"":""+i+""}function Tn(e){return e.allDayHtml||on(e.allDayText)}function Cn(e,t,n,r){var i,o,a=n.calendar,s=n.options,l=n.theme,u=n.dateEnv,c=[];return dt(t.activeRange,e)?(c.push("fc-"+V[e.getUTCDay()]),s.monthMode&&u.getMonth(e)!==u.getMonth(t.currentRange.start)&&c.push("fc-other-month"),o=q(i=Y(a.getNow()),1),e=o?c.push("fc-future"):(c.push("fc-today"),!0!==r&&c.push(l.getClass("today")))):c.push("fc-disabled-day"),c}var Pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return He(t,e),t.prototype.on=function(e,t){return An(this._handlers||(this._handlers={}),e,t),this},t.prototype.one=function(e,t){return An(this._oneHandlers||(this._oneHandlers={}),e,t),this},t.prototype.off=function(e,t){return this._handlers&&Mn(this._handlers,e,t),this._oneHandlers&&Mn(this._oneHandlers,e,t),this},t.prototype.trigger=function(e){for(var t=[],n=1;n=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=200&&a.status<400)try{var e=JSON.parse(a.responseText);r(e,a)}catch(t){i("Failure parsing JSON",a)}else i("Request failed",a)},a.onerror=function(){i("Request failed",a)},a.send(o)}function Zn(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var Yn=Hn({eventSourceDefs:[{parseMeta:function(e){if("string"===typeof e)e={url:e};else if(!e||"object"!==typeof e||!e.url)return null;return{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}},fetch:function(e,t,n){var r=e.eventSource.meta,i=function(e,t,n){var r,i,o,a,s=n.dateEnv,l={};null==(r=e.startParam)&&(r=n.opt("startParam"));null==(i=e.endParam)&&(i=n.opt("endParam"));null==(o=e.timeZoneParam)&&(o=n.opt("timeZoneParam"));a="function"===typeof e.extraParams?e.extraParams():e.extraParams||{};qe(l,a),l[r]=s.formatIso(t.start),l[i]=s.formatIso(t.end),"local"!==s.timeZone&&(l[o]=s.timeZone);return l}(r,e.range,e.calendar);Kn(r.method,r.url,i,function(e,n){t({rawEvents:e,xhr:n})},function(e,t){n({message:e,xhr:t})})}}]});var Xn=Hn({recurringTypes:[{parse:function(e,t,n){var r,i,o=n.createMarker.bind(n),a=Ne(e,{daysOfWeek:null,startTime:ae,endTime:ae,startRecur:o,endRecur:o},{},t),s=!1;for(var l in a)if(null!=a[l]){s=!0;break}if(s){var u=null;return"duration"in t&&(u=ae(t.duration),delete t.duration),!u&&a.startTime&&a.endTime&&(r=a.endTime,i=a.startTime,u={years:r.years-i.years,months:r.months-i.months,days:r.days-i.days,milliseconds:r.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!a.startTime&&!a.endTime),duration:u,typeData:a}}return null},expand:function(e,t,n){var r=ut(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var i=e?Xe(e):null,o=Y(n.start),a=n.end,s=[];for(;o0?e[0].code:"en",n=window.FullCalendarLocalesAll||[],r=window.FullCalendarLocales||{},i=n.concat(Je(r),e),o={en:ir},a=0,s=i;a0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||ir;return sr(e,n,r)}(e,t):sr(e.code,[e.code],e)}function sr(e,t,n){var r=Ke([ir,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var lr=function(){function e(e){this.overrides=qe({},e),this.dynamicOverrides={},this.compute()}return e.prototype.mutate=function(e,t,n){if(Object.keys(e).length||t.length){var r=n?this.dynamicOverrides:this.overrides;qe(r,e);for(var i=0,o=t;i=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=G(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Pt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?te($(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?te(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Q(ee(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ee(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Q(ee(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(ee(e))*60):new Date(e.valueOf()-(t||0))},e}(),hr={id:String,allDayDefault:Boolean,eventDataTransform:Function,success:Function,failure:Function},mr=0;function vr(e,t){return!t.pluginSystem.hooks.eventSourceDefs[e.sourceDefId].ignoreRange}function gr(e,t){for(var n=t.pluginSystem.hooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i){var o=yr("object"===typeof e?e:{},i,r,t);return o._raw=e,o}}return null}function yr(e,t,n,r){var i={},o=Ne(e,hr,{},i),a={},s=un(i,r,a);return o.isFetching=!1,o.latestFetchId="",o.fetchRange=null,o.publicId=String(e.id||""),o.sourceId=String(mr++),o.sourceDefId=n,o.meta=t,o.ui=s,o.extendedProps=a,o}function br(e,t,n,r){switch(t.type){case"ADD_EVENT_SOURCES":return function(e,t,n,r){for(var i={},o=0,a=t;oe.fetchRange.end:!e.latestFetchId}(e,t,n)}),t,n)}function wr(e,t,n,r){var i={};for(var o in e){var a=e[o];t[o]?i[o]=Sr(a,n,r):i[o]=a}return i}function Sr(e,t,n){var r=n.pluginSystem.hooks.eventSourceDefs[e.sourceDefId],i=String(_r++);return r.fetch({eventSource:e,calendar:n,range:t},function(r){var o,a,s=r.rawEvents,l=n.opt("eventSourceSuccess");e.success&&(a=e.success(s,r.xhr)),l&&(o=l(s,r.xhr)),s=a||o||s,n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:i,fetchRange:t,rawEvents:s})},function(r){var o=n.opt("eventSourceFailure");console.warn(r.message,r),e.failure&&e.failure(r),o&&o(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:i,fetchRange:t,error:r})}),qe({},e,{isFetching:!0,latestFetchId:i})}var Er=function(){function e(e,t){this.viewSpec=e,this.options=e.options,this.dateEnv=t.dateEnv,this.calendar=t,this.initHiddenDays()}return e.prototype.buildPrev=function(e,t){var n=this.dateEnv,r=n.subtract(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(r,-1)},e.prototype.buildNext=function(e,t){var n=this.dateEnv,r=n.add(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(r,1)},e.prototype.build=function(e,t,n){var r;void 0===n&&(n=!1);var i,o,a,s,l,u,c,p,f;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(p=e,e=null!=(f=r).start&&p=f.end?new Date(f.end.valueOf()-1):p),a=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(a.unit),l=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,s),u=l=this.trimHiddenDays(l),this.options.showNonCurrentDates||(u=ut(u,a.range)),i=ae(this.options.minTime),o=ae(this.options.maxTime),u=ut(u=this.adjustActiveRange(u,i,o),r),c=pt(a.range,r),{validRange:r,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:s,activeRange:u,renderRange:l,minTime:i,maxTime:o,isValid:c,dateIncrement:this.buildDateIncrement(a.duration)}},e.prototype.buildValidRange=function(){return this.getRangeOption("validRange",this.calendar.getNow())||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.viewSpec,i=this.dateEnv,o=null,a=null,s=null;return r.duration?(o=r.duration,a=r.durationUnit,s=this.buildRangeFromDuration(e,t,o,a)):(n=this.options.dayCount)?(a="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?a=i.greatestWholeUnit(s.start,s.end).unit:(a=me(o=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,o,a)),{duration:o,unit:a,range:s}},e.prototype.getFallbackDuration=function(){return ae({day:1})},e.prototype.adjustActiveRange=function(e,t,n){var r=this.dateEnv,i=e.start,o=e.end;return this.viewSpec.class.prototype.usesMinMaxTime&&(fe(t)<0&&(i=Y(i),i=r.add(i,t)),fe(n)>1&&(o=q(o=Y(o),-1),o=r.add(o,n))),{start:i,end:o}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,a,s,l,u=this.dateEnv,c=this.options.dateAlignment;function p(){a=u.startOf(e,c),s=u.add(a,n),l={start:a,end:s}}return c||((i=this.options.dateIncrement)?(o=ae(i),c=de(o) ")),l=!1):((r=f[e])?(p=function(e){r.click&&r.click.call(b,e)},(m=i.getCustomButtonIconClass(r))||(m=i.getIconClass(e))||(v=r.text)):(u=c[e])?(n.viewsWithButtons.push(e),p=function(){s.changeView(e)},(v=u.buttonTextOverride)||(m=i.getIconClass(e))||(v=u.buttonTextDefault)):s[e]&&(p=function(){s[e]()},(v=d[e])||(m=i.getIconClass(e))||(v=h[e])),p&&(y=["fc-"+e+"-button",i.getClass("button")],v?(g=on(v),_=""):m&&(g="",_=' aria-label="'+e+'"'),(b=a('")).addEventListener("click",p),o.push(b)))}),o.length>1){r=document.createElement("div");var m=i.getClass("buttonGroup");l&&m&&r.classList.add(m),u(r,o),p.appendChild(r)}else u(p,o)}),p},t.prototype.updateToday=function(e){this.toggleButtonEnabled("today",e)},t.prototype.updatePrev=function(e){this.toggleButtonEnabled("prev",e)},t.prototype.updateNext=function(e){this.toggleButtonEnabled("next",e)},t.prototype.updateTitle=function(e){y(this.el,"h2").forEach(function(t){t.innerText=e})},t.prototype.updateActiveButton=function(e){var t=this.context.theme.getClass("buttonActive");y(this.el,"button").forEach(function(n){e&&n.classList.contains("fc-"+e+"-button")?n.classList.add(t):n.classList.remove(t)})},t.prototype.toggleButtonEnabled=function(e,t){y(this.el,".fc-"+e+"-button").forEach(function(e){e.disabled=!t})},t}(Fn),Vr=function(e){function t(t){var n=e.call(this)||this;return n.elClassNames=[],n.renderSkeleton=wn(n._renderSkeleton,n._unrenderSkeleton),n.renderToolbars=wn(n._renderToolbars,n._unrenderToolbars,[n.renderSkeleton]),n.buildComponentContext=mt(qr),n.buildViewPropTransformers=mt(Gr),n.el=t,n.computeTitle=mt(Hr),n.parseBusinessHours=mt(function(e){return xn(e,n.context.calendar)}),n}return He(t,e),t.prototype.render=function(e,t){this.freezeHeight();var n=this.computeTitle(e.dateProfile,e.viewSpec.options);this.renderSkeleton(t),this.renderToolbars(e.viewSpec,e.dateProfile,e.currentDate,n),this.renderView(e,n),this.updateSize(),this.thawHeight()},t.prototype.destroy=function(){this.header&&this.header.destroy(),this.footer&&this.footer.destroy(),this.renderSkeleton.unrender(),e.prototype.destroy.call(this)},t.prototype._renderSkeleton=function(e){this.updateElClassNames(e),c(this.el,this.contentEl=o("div",{className:"fc-view-container"}));for(var t=e.calendar,n=0,r=t.pluginSystem.hooks.viewContainerModifiers;n1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e),t.titleRangeSeparator),{isEndExclusive:e.isRangeAllDay})}function qr(e,t,n){return e.extend(t.options,n)}function Gr(e){return e.map(function(e){return new e})}var Wr=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Kr(e){var t;return(t={})[e.component.uid]=e,t}var Zr={},Yr=function(e){function t(t){var n=e.call(this,t)||this;n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=i.calendar,a=i.view,s=zt(t);if(s&&r.isValidSegDownEl(e.target)){var l=v(e.target,".fc-has-url"),u=l?l.querySelector("a[href]").href:"";o.publiclyTrigger("eventClick",[{el:t,event:new jt(r.context.calendar,s.eventRange.def,s.eventRange.instance),jsEvent:e,view:a}]),u&&!e.defaultPrevented&&(window.location.href=u)}};var r=t.component;return n.destroy=B(r.el,"click",r.fgSegSelector+","+r.bgSegSelector,n.handleSegClick),n}return He(t,e),t}(Wr),Xr=function(e){function t(t){var n=e.call(this,t)||this;n.handleEventElRemove=function(e){e===n.currentSegEl&&n.handleSegLeave(null,n.currentSegEl)},n.handleSegEnter=function(e,t){zt(t)&&(t.classList.add("fc-allow-mouse-resize"),n.currentSegEl=t,n.triggerEvent("eventMouseEnter",e,t))},n.handleSegLeave=function(e,t){n.currentSegEl&&(t.classList.remove("fc-allow-mouse-resize"),n.currentSegEl=null,n.triggerEvent("eventMouseLeave",e,t))};var r=t.component;return n.removeHoverListeners=function(e,t,n,r){var i;return B(e,"mouseover",t,function(e,t){t!==i&&(i=t,n(e,t),t.addEventListener("mouseleave",function e(n){i=null,r(n,t),t.removeEventListener("mouseleave",e)}))})}(r.el,r.fgSegSelector+","+r.bgSegSelector,n.handleSegEnter,n.handleSegLeave),r.context.calendar.on("eventElRemove",n.handleEventElRemove),n}return He(t,e),t.prototype.destroy=function(){this.removeHoverListeners(),this.component.context.calendar.off("eventElRemove",this.handleEventElRemove)},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=i.calendar,a=i.view,s=zt(n);t&&!r.isValidSegDownEl(t.target)||o.publiclyTrigger(e,[{el:n,event:new jt(o,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:a}])},t}(Wr),Jr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return He(t,e),t}(Nn);Jr.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},Jr.prototype.baseIconClass="fc-icon",Jr.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},Jr.prototype.iconOverrideOption="buttonIcons",Jr.prototype.iconOverrideCustomButtonOption="icon",Jr.prototype.iconOverridePrefix="fc-icon-";var $r=function(){function e(e,t){var n=this;this.buildComponentContext=mt(Qr),this.parseRawLocales=mt(or),this.buildLocale=mt(ar),this.buildDateEnv=mt(ei),this.buildTheme=mt(ti),this.buildEventUiSingleBase=mt(this._buildEventUiSingleBase),this.buildSelectionConfig=mt(this._buildSelectionConfig),this.buildEventUiBySource=function(e,t){var n=null;return function(){var r=e.apply(this,arguments);return(null===n||n!==r&&!t(n,r))&&(n=r),n}}(ri,$e),this.buildEventUiBases=mt(ii),this.interactionsStore={},this.actionQueue=[],this.isReducing=!1,this.needsRerender=!1,this.isRendering=!1,this.renderingPauseDepth=0,this.buildDelayedRerender=mt(ni),this.afterSizingTriggers={},this.isViewUpdated=!1,this.isDatesUpdated=!1,this.isEventsUpdated=!1,this.el=e,this.optionsManager=new lr(t||{}),this.pluginSystem=new qn,this.addPluginInputs(this.optionsManager.computed.plugins||[]),this.handleOptions(this.optionsManager.computed),this.publiclyTrigger("_init"),this.hydrate(),this.calendarInteractions=this.pluginSystem.hooks.calendarInteractions.map(function(e){return new e(n)})}return e.prototype.addPluginInputs=function(e){for(var t=function(e){for(var t=[],n=0,r=e;n"},e.prototype.detachSegs=function(e,t){var n=this.containerElsByType[e];n&&(n.forEach(d),delete this.containerElsByType[e])},e.prototype.computeSizes=function(e){for(var t in this.segsByType)(e||this.dirtySizeFlags[t])&&this.computeSegSizes(this.segsByType[t])},e.prototype.assignSizes=function(e){for(var t in this.segsByType)(e||this.dirtySizeFlags[t])&&this.assignSegSizes(this.segsByType[t]);this.dirtySizeFlags={}},e.prototype.computeSegSizes=function(e){},e.prototype.assignSegSizes=function(e){},e}(),ui=(function(){}(),function(){function e(e){this.emitter=new Pn}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}());var ci={startTime:ae,duration:ae,create:Boolean,sourceId:String},pi={create:!0};function fi(e){var t={},n=Ne(e,ci,pi,t);return n.leftoverProps=t,n}function di(e,t,n,r,i,o,a,s){var l,u=o.dateEnv,c=o.theme,p=o.options,f=dt(t.activeRange,e),d=["fc-day-header",c.getClass("widgetHeader")];return l="function"===typeof p.columnHeaderHtml?p.columnHeaderHtml(u.toDate(e)):"function"===typeof p.columnHeaderText?on(p.columnHeaderText(u.toDate(e))):on(u.format(e,i)),n?d=d.concat(Cn(e,t,o,!0)):d.push("fc-"+V[e.getUTCDay()]),'1?' colspan="'+a+'"':"")+(s?" "+s:"")+">"+(f?On(p,u,{date:e,forceOff:!n||1===r},l):l)+""}var hi=function(e){function t(t){var n=e.call(this)||this;return n.renderSkeleton=wn(n._renderSkeleton,n._unrenderSkeleton),n.parentEl=t,n}return He(t,e),t.prototype.render=function(e,t){var n=e.dates,r=e.datesRepDistinctDays,i=[];this.renderSkeleton(t),e.renderIntroHtml&&i.push(e.renderIntroHtml());for(var o=Tt(t.options.columnHeaderFormat||function(e,t){return!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"}}(r,n.length)),a=0,s=n;a"+i.join("")+""},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderSkeleton.unrender()},t.prototype._renderSkeleton=function(e){var t=e.theme,n=this.parentEl;n.innerHTML="",n.appendChild(this.el=a('
')),this.thead=this.el.querySelector("thead")},t.prototype._unrenderSkeleton=function(){d(this.el)},t}(Fn),mi=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],a=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),vi=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";var r=n(1),i=n.n(r),o=(n(5),i.a.createContext(null));var a=function(e){e()},s=function(){return a},l={notify:function(){}};var u=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=s(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var e=t;e;)e.callback(),e=e.next})},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}();var c=function(e){var t=e.store,n=e.context,a=e.children,s=Object(r.useMemo)(function(){var e=new u(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}},[t]),l=Object(r.useMemo)(function(){return t.getState()},[t]);Object(r.useEffect)(function(){var e=s.subscription;return e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[s,l]);var c=n||o;return i.a.createElement(c.Provider,{value:s},a)},p=(n(3),n(32),n(74),n(62),"undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect);n(64);function f(){return Object(r.useContext)(o)}function d(e){void 0===e&&(e=o);var t=e===o?f:function(){return Object(r.useContext)(e)};return function(){return t().store}}var h=d();function m(e){void 0===e&&(e=o);var t=e===o?h:d(e);return function(){return t().dispatch}}var v=m(),g=function(e,t){return e===t};function y(e){void 0===e&&(e=o);var t=e===o?f:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=g);var i=t();return function(e,t,n,i){var o,a=Object(r.useReducer)(function(e){return e+1},0)[1],s=Object(r.useMemo)(function(){return new u(n,i)},[n,i]),l=Object(r.useRef)(),c=Object(r.useRef)(),f=Object(r.useRef)();try{o=e!==c.current||l.current?e(n.getState()):f.current}catch(d){throw l.current&&(d.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),d}return p(function(){c.current=e,f.current=o,l.current=void 0}),p(function(){function e(){try{var e=c.current(n.getState());if(t(e,f.current))return;f.current=e}catch(d){l.current=d}a({})}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}},[n,s]),o}(e,n,i.store,i.subscription)}}var b,_=y(),x=n(29);n.d(t,"a",function(){return c}),n.d(t,"b",function(){return v}),n.d(t,"c",function(){return _}),b=x.unstable_batchedUpdates,a=b},function(e,t,n){"use strict";n(31),n(85);var r=n(22),i=n(14),o=(n(112),function(e){return{done:!0,value:e}}),a={};function s(e){return Object(r.b)(e)?"channel":Object(r.l)(e)?String(e):Object(r.d)(e)?e.name:String(e)}function l(e,t,n){var r,s,l,u=t;function c(t,n){if(u===a)return o(t);if(n&&!s)throw u=a,n;r&&r(t);var i=n?e[s](n):e[u]();return u=i.nextState,l=i.effect,r=i.stateUpdater,s=i.errorState,u===a?o(t):l}return Object(i.M)(c,function(e){return c(null,e)},n)}function u(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o=0&&e.splice(n,1)}function h(e){var t=!1;return function(){t||(t=!0,e())}}var m=function(e){throw e},v=function(e){return{value:e,done:!0}};function g(e,t,n){void 0===t&&(t=m),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:v,isSagaIterator:!0};return"undefined"!==typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function y(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var b=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},_=function(e){return Array.apply(null,new Array(e))},x=function(e){return function(t){return e(Object.defineProperty(t,r.f,{value:!0}))}},w=function(e){return e===r.k},S=function(e){return e===r.j},E=function(e){return w(e)||S(e)};function k(e,t){var n=Object.keys(e),r=n.length;var i,a=0,s=Object(o.a)(e)?_(r):{},u={};return n.forEach(function(e){var n=function(n,o){i||(o||E(n)?(t.cancel(),t(n,o)):(s[e]=n,++a===r&&(i=!0,t(s))))};n.cancel=l,u[e]=n}),t.cancel=function(){i||(i=!0,n.forEach(function(e){return u[e].cancel()}))},u}function O(e){return{name:e.name||"anonymous",location:T(e)}}function T(e){return e[r.g]}var C="Channel's Buffer overflow!",P=1,A=3,M=4,I={isEmpty:s,put:l,take:l};function j(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,i=0,o=0,a=function(t){n[i]=t,i=(i+1)%e,r++},s=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},l=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var u;if(r1?t-1:0),r=1;r1?t-1:0),r=1;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},x=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},w=function(e){return"object"===("undefined"===typeof e?"undefined":m(e))&&e.constructor===Object},S=Object.freeze([]),E=Object.freeze({});function k(e){return"function"===typeof e}function O(e){return e.displayName||e.name||"Component"}function T(e){return e&&"string"===typeof e.styledComponentId}var C="undefined"!==typeof e&&(Object({NODE_ENV:"production",PUBLIC_URL:"http://languagetogether.s3-website.ap-northeast-2.amazonaws.com",REACT_APP_GOOGLEID:"106115899408-k6r15oksnfcb73ndjcr462q640csffq5.apps.googleusercontent.com",REACT_APP_MAPBOX:"pk.eyJ1IjoiZG9uZ2h3YW55ZW9tIiwiYSI6ImNrYjliZjJrZjA4ODEzMXQzcGh6emw5b2YifQ._dOuoE4tUDr6LkZukE7RdA",REACT_APP_RECAPCHAR:"6Lds1KkZAAAAAN7rnjMk5v2JrQKewzrw4XCka5IL"}).REACT_APP_SC_ATTR||Object({NODE_ENV:"production",PUBLIC_URL:"http://languagetogether.s3-website.ap-northeast-2.amazonaws.com",REACT_APP_GOOGLEID:"106115899408-k6r15oksnfcb73ndjcr462q640csffq5.apps.googleusercontent.com",REACT_APP_MAPBOX:"pk.eyJ1IjoiZG9uZ2h3YW55ZW9tIiwiYSI6ImNrYjliZjJrZjA4ODEzMXQzcGh6emw5b2YifQ._dOuoE4tUDr6LkZukE7RdA",REACT_APP_RECAPCHAR:"6Lds1KkZAAAAAN7rnjMk5v2JrQKewzrw4XCka5IL"}).SC_ATTR)||"data-styled",P="undefined"!==typeof window&&"HTMLElement"in window,A="boolean"===typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||"undefined"!==typeof e&&(Object({NODE_ENV:"production",PUBLIC_URL:"http://languagetogether.s3-website.ap-northeast-2.amazonaws.com",REACT_APP_GOOGLEID:"106115899408-k6r15oksnfcb73ndjcr462q640csffq5.apps.googleusercontent.com",REACT_APP_MAPBOX:"pk.eyJ1IjoiZG9uZ2h3YW55ZW9tIiwiYSI6ImNrYjliZjJrZjA4ODEzMXQzcGh6emw5b2YifQ._dOuoE4tUDr6LkZukE7RdA",REACT_APP_RECAPCHAR:"6Lds1KkZAAAAAN7rnjMk5v2JrQKewzrw4XCka5IL"}).REACT_APP_SC_DISABLE_SPEEDY||Object({NODE_ENV:"production",PUBLIC_URL:"http://languagetogether.s3-website.ap-northeast-2.amazonaws.com",REACT_APP_GOOGLEID:"106115899408-k6r15oksnfcb73ndjcr462q640csffq5.apps.googleusercontent.com",REACT_APP_MAPBOX:"pk.eyJ1IjoiZG9uZ2h3YW55ZW9tIiwiYSI6ImNrYjliZjJrZjA4ODEzMXQzcGh6emw5b2YifQ._dOuoE4tUDr6LkZukE7RdA",REACT_APP_RECAPCHAR:"6Lds1KkZAAAAAN7rnjMk5v2JrQKewzrw4XCka5IL"}).SC_DISABLE_SPEEDY)||!1;var M=function(e){function t(n){v(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o0?" Additional arguments: "+i.join(", "):"")));return x(a)}return b(t,e),t}(Error),I=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,j=function(e){var t=""+(e||""),n=[];return t.replace(I,function(e,t,r){return n.push({componentId:t,matchIndex:r}),e}),n.map(function(e,r){var i=e.componentId,o=e.matchIndex,a=n[r+1];return{componentId:i,cssFromDOM:a?t.slice(o,a.matchIndex):t.slice(o)}})},D=/^\s*\/\/.*$/gm,R=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),L=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),N=[],z=function(e){if(-2===e){var t=N;return N=[],t}},B=a()(function(e){N.push(e)}),F=void 0,U=void 0,V=void 0,H=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(U)&&n.slice(t-U.length,t)!==U?"."+F:e};L.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(U)>0&&(n[0]=n[0].replace(V,H))},B,z]),R.use([B,z]);function q(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",i=e.join("").replace(D,""),o=t&&n?n+" "+t+" { "+i+" }":i;return F=r,U=t,V=new RegExp("\\"+U+"\\b","g"),L(n||!t?"":t,o)}var G=function(){return n.nc},W=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},K=function(e,t){e[t]=Object.create(null)},Z=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},Y=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},X=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,n=0;n"+e()+""}},te=function(e,t){return function(){var n,r=((n={})[C]=Y(t),n["data-styled-version"]="4.4.1",n),i=G();return i&&(r.nonce=i),l.a.createElement("style",y({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},ne=function(e){return function(){return Object.keys(e)}},re=function(e,t){return e.createTextNode($(t))},ie=function e(t,n){var r=void 0===t?Object.create(null):t,i=void 0===n?Object.create(null):n,o=function(e){var t=i[e];return void 0!==t?t:i[e]=[""]},a=function(){var e="";for(var t in i){var n=i[t][0];n&&(e+=$(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=y({},e[n]);return t}(r),n=Object.create(null);for(var o in i)n[o]=[i[o][0]];return e(t,n)},css:a,getIds:ne(i),hasNameForId:Z(r),insertMarker:o,insertRules:function(e,t,n){o(e)[0]+=t.join(" "),W(r,e,n)},removeRules:function(e){var t=i[e];void 0!==t&&(t[0]="",K(r,e))},sealed:!1,styleTag:null,toElement:te(a,r),toHTML:ee(a,r)}},oe=function(e,t,n,r,i){if(P&&!n){var o=function(e,t,n){var r=document;e?r=e.ownerDocument:t&&(r=t.ownerDocument);var i=r.createElement("style");i.setAttribute(C,""),i.setAttribute("data-styled-version","4.4.1");var o=G();if(o&&i.setAttribute("nonce",o),i.appendChild(r.createTextNode("")),e&&!t)e.appendChild(i);else{if(!t||!e||!t.parentNode)throw new M(6);t.parentNode.insertBefore(i,n?t:t.nextSibling)}return i}(e,t,r);return A?function(e,t){var n=Object.create(null),r=Object.create(null),i=void 0!==t,o=!1,a=function(t){var i=r[t];return void 0!==i?i:(r[t]=re(e.ownerDocument,t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new M(5)},css:s,getIds:ne(r),hasNameForId:Z(n),insertMarker:a,insertRules:function(e,r,s){for(var l=a(e),u=[],c=r.length,p=0;p0&&(o=!0,t().insertRules(e+"-import",u))},removeRules:function(a){var s=r[a];if(void 0!==s){var l=re(e.ownerDocument,a);e.replaceChild(l,s),r[a]=l,K(n,a),i&&o&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:te(s,n),toHTML:ee(s,n)}}(o,i):function(e,t){var n=Object.create(null),r=Object.create(null),i=[],o=void 0!==t,a=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=i.length,i.push(0),K(n,e),r[e])},l=function(){var t=X(e).cssRules,n="";for(var o in r){n+=$(o);for(var a=r[o],s=Q(i,a),l=s-i[a];l0&&(a=!0,t().insertRules(r+"-import",h)),i[c]+=d,W(n,r,u)},removeRules:function(s){var l=r[s];if(void 0!==l&&!1!==e.isConnected){var u=i[l];!function(e,t,n){for(var r=t-n,i=t;i>r;i-=1)e.deleteRule(i)}(X(e),Q(i,l)-1,u),i[l]=0,K(n,s),o&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:te(l,n),toHTML:ee(l,n)}}(o,i)}return ie()},ae=/\s+/,se=void 0;se=P?A?40:1e3:-1;var le=0,ue=void 0,ce=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];v(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=oe(t.target,n?n.styleTag:null,t.forceServer,!0)},le+=1,this.id=le,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!P||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+C+'][data-styled-version="4.4.1"]'),i=r.length;if(!i)return this;for(var o=0;o0&&void 0!==arguments[0]&&arguments[0];ue=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var n=e.getIds(),r=e.clone(),i=0;i1?t-1:0),r=1;r=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var _e=52,xe=function(e){return String.fromCharCode(e+(e>25?39:97))};function we(e){var t="",n=void 0;for(n=e;n>_e;n=Math.floor(n/_e))t=xe(n%_e)+t;return xe(n%_e)+t}function Se(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:E,r=!!n&&e.theme===n.theme;return e.theme&&!r?e.theme:t||n.theme},Ce=/[[\].#*$><+~=|^:(),"'`-]+/g,Pe=/(^-|-$)/g;function Ae(e){return e.replace(Ce,"-").replace(Pe,"")}function Me(e){return"string"===typeof e&&!0}var Ie={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},je={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De=((Ee={})[c.ForwardRef]={$$typeof:!0,render:!0},Ee),Re=Object.defineProperty,Le=Object.getOwnPropertyNames,Ne=Object.getOwnPropertySymbols,ze=void 0===Ne?function(){return[]}:Ne,Be=Object.getOwnPropertyDescriptor,Fe=Object.getPrototypeOf,Ue=Object.prototype,Ve=Array.prototype;function He(e,t,n){if("string"!==typeof t){var r=Fe(t);r&&r!==Ue&&He(e,r,n);for(var i=Ve.concat(Le(t),ze(t)),o=De[e.$$typeof]||Ie,a=De[t.$$typeof]||Ie,s=i.length,l=void 0,u=void 0;s--;)if(u=i[s],!je[u]&&(!n||!n[u])&&(!a||!a[u])&&(!o||!o[u])&&(l=Be(t,u)))try{Re(e,u,l)}catch(c){}return e}return e}var qe=Object(s.createContext)(),Ge=qe.Consumer,We=(function(e){function t(n){v(this,t);var r=x(this,e.call(this,n));return r.getContext=Object(p.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}b(t,e),t.prototype.render=function(){return this.props.children?l.a.createElement(qe.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return l.a.createElement(qe.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(k(e))return e(t);if(null===e||Array.isArray(e)||"object"!==("undefined"===typeof e?"undefined":m(e)))throw new M(8);return y({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)}}(s.Component),function(){function e(){v(this,e),this.masterSheet=ce.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new M(2);return l.a.createElement(Ze,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new M(3)}}(),Object(s.createContext)()),Ke=We.Consumer,Ze=function(e){function t(n){v(this,t);var r=x(this,e.call(this,n));return r.getContext=Object(p.a)(r.getContext),r}return b(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new ce(t);throw new M(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return l.a.createElement(We.Provider,{value:this.getContext(n,r)},t)},t}(s.Component),Ye={};var Xe=function(e){function t(){v(this,t);var n=x(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return b(t,e),t.prototype.render=function(){return l.a.createElement(Ke,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():l.a.createElement(Ge,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,i=(t.displayName,t.foldedComponentIds),o=t.styledComponentId,a=t.target,l=void 0;l=n.isStatic?this.generateAndInjectStyles(E,this.props):this.generateAndInjectStyles(Te(this.props,e,r)||E,this.props);var u=this.props.as||this.attrs.as||a,c=Me(u),p={},d=y({},this.props,this.attrs),h=void 0;for(h in d)"forwardedComponent"!==h&&"as"!==h&&("forwardedRef"===h?p.ref=d[h]:"forwardedAs"===h?p.as=d[h]:c&&!Object(f.a)(h)||(p[h]=d[h]));return this.props.style&&this.attrs.style&&(p.style=y({},this.attrs.style,this.props.style)),p.className=Array.prototype.concat(i,o,l!==o?l:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(s.createElement)(u,p)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,i=y({},t,{theme:e});return n.length?(this.attrs={},n.forEach(function(e){var t,n=e,o=!1,a=void 0,s=void 0;for(s in k(n)&&(n=n(i),o=!0),n)a=n[s],o||!k(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||T(a)||(a=a(i)),r.attrs[s]=a,i[s]=a}),i):i},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,i=n.componentStyle;n.warnTooManyClasses;return i.isStatic&&!r.length?i.generateAndInjectStyles(E,this.styleSheet):i.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(s.Component);function Je(e,t,n){var r=T(e),i=!Me(e),o=t.displayName,a=void 0===o?function(e){return Me(e)?"styled."+e:"Styled("+O(e)+")"}(e):o,s=t.componentId,u=void 0===s?function(e,t,n){var r="string"!==typeof t?"sc":Ae(t),i=(Ye[r]||0)+1;Ye[r]=i;var o=r+"-"+e.generateName(r+i);return n?n+"-"+o:o}(Oe,t.displayName,t.parentComponentId):s,c=t.ParentComponent,p=void 0===c?Xe:c,f=t.attrs,h=void 0===f?S:f,m=t.displayName&&t.componentId?Ae(t.displayName)+"-"+t.componentId:t.componentId||u,v=r&&e.attrs?Array.prototype.concat(e.attrs,h).filter(Boolean):h,g=new Oe(r?e.componentStyle.rules.concat(n):n,v,m),b=void 0,x=function(e,t){return l.a.createElement(p,y({},e,{forwardedComponent:b,forwardedRef:t}))};return x.displayName=a,(b=l.a.forwardRef(x)).displayName=a,b.attrs=v,b.componentStyle=g,b.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):S,b.styledComponentId=m,b.target=r?e.target:e,b.withComponent=function(e){var r=t.componentId,i=_(t,["componentId"]),o=r&&r+"-"+(Me(e)?e:Ae(O(e)));return Je(e,y({},i,{attrs:v,componentId:o,ParentComponent:p}),n)},Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(d.a)(e.defaultProps,t):t}}),b.toString=function(){return"."+b.styledComponentId},i&&He(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),b}var $e=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;if(!Object(c.isValidElementType)(n))throw new M(1,String(n));var i=function(){return t(n,r,ye.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,y({},r,i))},i.attrs=function(i){return e(t,n,y({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Je,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){$e[e]=$e(e)});!function(){function e(t,n){v(this,e),this.rules=t,this.componentId=n,this.isStatic=Se(t,S),ce.master.hasId(n)||ce.master.deferredInject(n,[])}e.prototype.createStyles=function(e,t){var n=q(ge(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)}}();P&&(window.scCGSHMRCache={});t.a=$e}).call(this,n(71))},function(e,t,n){"use strict";n.d(t,"a",function(){return p}),n.d(t,"b",function(){return g});var r=n(38),i=n(40),o=n(1),a=n.n(o),s=n(60),l=(n(5),n(3)),u=n(32),c=n(55),p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=t.defaultTheme,s=t.withTheme,f=void 0!==s&&s,d=t.name,h=Object(i.a)(t,["defaultTheme","withTheme","name"]),m=d,v=Object(u.a)(e,Object(r.a)({defaultTheme:o,Component:n,name:d||n.displayName,classNamePrefix:m},h)),g=a.a.forwardRef(function(e,t){e.classes;var s,l=e.innerRef,u=Object(i.a)(e,["classes","innerRef"]),h=v(Object(r.a)(Object(r.a)({},n.defaultProps),e)),m=u;return("string"===typeof d||f)&&(s=Object(p.a)()||o,d&&(m=Object(c.a)({theme:s,name:d,props:u})),f&&!m.theme&&(m.theme=s)),a.a.createElement(n,Object(r.a)({ref:l||t,classes:h},m))});return l()(g,n),g}},d=n(75);t.a=function(e,t){return f(e,Object(r.a)({defaultTheme:d.a},t))}},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,l,"next",e)}function l(e){r(a,i,o,s,l,"throw",e)}s(void 0)})}}n.d(t,"a",function(){return i})},function(e,t,n){e.exports=n(253)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t2?n-2:0),o=2;o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(l,["css","className"]);return u?s.default.createElement(g,{css:u,render:function(t){var n=c?t?c+" "+t:c:t;return a.createElement.apply(void 0,[e,n?r({},p,{className:n}):p].concat(i))}}):a.createElement.apply(void 0,[e,t].concat(i))},t.hydrate=function(e,t,n){m=!0,(0,l.hydrate)(e,t,function(){m=!1,n&&n()})};var o=f(n(5)),a=n(1),s=f(a),l=n(29),u=f(n(279)),c=f(n(305)),p=f(n(173));function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var h="undefined"!==typeof window,m=!1,v=(0,c.default)({}).className,g=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,o=Array(i),a=0;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(function(e){return e+e})),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map(function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3}).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: Unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map(function(e){return parseFloat(e)})}}function o(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map(function(e,t){return t<3?parseInt(e,10):e}):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function a(e,t){var n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function s(e){var t="hsl"===(e=i(e)).type?i(function(e){var t=(e=i(e)).values,n=t[0],r=t[1]/100,a=t[2]/100,s=r*Math.min(a,1-a),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return a-s*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",c=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),o({type:u,values:c})}(e)).values:e.values;return t=t.map(function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return s(e)>.5?c(e,t):p(e,t)}function u(e,t){return e=i(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,o(e)}function c(e,t){if(e=i(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function p(e,t){if(e=i(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return o(e)}n.d(t,"d",function(){return a}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return c}),n.d(t,"e",function(){return p})},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return a}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return h}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return p}),n.d(t,"j",function(){return f}),n.d(t,"k",function(){return d});var r=function(e){return"@@redux-saga/"+e},i=r("CANCEL_PROMISE"),o=r("CHANNEL_END"),a=r("IO"),s=r("MATCH"),l=r("MULTICAST"),u=r("SAGA_ACTION"),c=r("SELF_CANCELLATION"),p=r("TASK"),f=r("TASK_CANCEL"),d=r("TERMINATE"),h=r("LOCATION")},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",function(){return r})},,,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(100);var i=n(114),o=n(87);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.d(t,"a",function(){return a})},function(e,t,n){"use strict";var r=n(99);var i=n(86);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=Object(i.a)(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){return(p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e){return function(){var t,n,r,i=c(e);if(function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var o=c(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return n=this,!(r=t)||"object"!==p(r)&&"function"!==typeof r?s(n):r}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n1?t-1:0),r=1;r=f.startTime+l.duration;else if(l.decay)m=d+g/(1-.998)*(1-Math.exp(-(1-.998)*(n-f.startTime))),(u=Math.abs(f.lastPosition-m)<.1)&&(h=m);else{c=void 0!==f.lastTime?f.lastTime:n,g=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,n>c+64&&(c=n);for(var y=Math.floor(n-c),b=0;bh:m=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,l){var u=l?l(e):e;if(un){if("identity"===s)return u;"clamp"===s&&(u=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t);u=o(u),r===-1/0?u=-u:i===1/0?u+=r:u=u*(i-r)+r;return u}(e,o[t],o[t+1],i[t],i[t+1],l,a,s,r.map)}}var Z=function(e){u(n,A);var t=f(n);function n(e,r,i,o){var a;return d(this,n),(a=t.call(this)).calc=void 0,a.payload=e instanceof A&&!(e instanceof n)?e.getPayload():Array.isArray(e)?e:[e],a.calc=K(r,i,o),a}return m(n,[{key:"getValue",value:function(){return this.calc.apply(this,o(this.payload.map(function(e){return e.getValue()})))}},{key:"updateConfig",value:function(e,t,n){this.calc=K(e,t,n)}},{key:"interpolate",value:function(e,t,r){return new n(this,e,t,r)}}]),n}(),Y={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};var X=function(e){u(n,P);var t=f(n);function n(e){var r,i;return d(this,n),r=t.call(this),i=s(r),r.animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),i.value=e,t&&i.flush()},r.value=e,r.startPosition=e,r.lastPosition=e,r}return m(n,[{key:"flush",value:function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach(function(t){return e(t,n)})}(this,this.animatedStyles),this.animatedStyles.forEach(function(e){return e.update()})}},{key:"clearStyles",value:function(){this.animatedStyles.clear()}},{key:"getValue",value:function(){return this.value}},{key:"interpolate",value:function(e,t,n){return new Z(this,e,t,n)}}]),n}(),J=function(e){u(n,A);var t=f(n);function n(e){var r;return d(this,n),(r=t.call(this)).payload=e.map(function(e){return new X(e)}),r}return m(n,[{key:"setValue",value:function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(function(e,r){return n.payload[r].setValue(e,t)}):this.payload.forEach(function(n){return n.setValue(e,t)})}},{key:"getValue",value:function(){return this.payload.map(function(e){return e.getValue()})}},{key:"interpolate",value:function(e,t){return new Z(this,e,t)}}]),n}(),$=0,Q=function(){function e(){var t=this;d(this,e),this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return t.interpolations},this.id=$++}return m(e,[{key:"update",value:function(e){if(!e)return this;var t=O(e),n=t.delay,r=void 0===n?0:n,i=t.to,o=Object(y.a)(t,["delay","to"]);if(x.arr(i)||x.fun(i))this.queue.push(Object(g.a)({},o,{delay:r,to:i}));else if(i){var a={};Object.entries(i).forEach(function(e){var t=e[0],n=e[1],i=Object(g.a)({to:Object(v.a)({},t,n),delay:k(r,t)},o),s=a[i.delay]&&a[i.delay].to;a[i.delay]=Object(g.a)({},a[i.delay],i,{to:Object(g.a)({},s,i.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort(function(e,t){return e.delay-t.delay}),this.diff(o),this}},{key:"start",value:function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(function(e){var t=e.from,r=void 0===t?{}:t,i=e.to,o=void 0===i?{}:i;x.obj(r)&&(n.merged=Object(g.a)({},r,n.merged)),x.obj(o)&&(n.merged=Object(g.a)({},n.merged,o))});var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach(function(t,o){var a=t.delay,s=Object(y.a)(t,["delay"]),l=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},u=x.arr(s.to)||x.fun(s.to);a?setTimeout(function(){r===n.guid&&(u?n.runAsync(s,l):n.diff(s).start(l))},a):u?n.runAsync(s,l):n.diff(s).start(l)})}else x.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,G.has(t)||G.add(t),q||(q=!0,R(F||W));return this}},{key:"stop",value:function(e){return this.listeners.forEach(function(t){return t(e)}),this.listeners=[],this}},{key:"pause",value:function(e){var t;return this.stop(!0),e&&(t=this,G.has(t)&&G.delete(t)),this}},{key:"runAsync",value:function(e,t){var n=this,r=this,i=(e.delay,Object(y.a)(e,["delay"])),o=this.local,a=Promise.resolve(void 0);if(x.arr(i.to))for(var s=function(e){var t=e,r=Object(g.a)({},i,O(i.to[t]));x.arr(r.config)&&(r.config=r.config[t]),a=a.then(function(){if(o===n.guid)return new Promise(function(e){return n.diff(r).start(e)})})},l=0;l1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ve(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=me(i,r,e+1/3),a=me(i,r,e),s=me(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function ge(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function ye(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function _e(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function xe(e){var t=function(e){var t;return"number"===typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=de.exec(e))?parseInt(t[1]+"ff",16)>>>0:re.hasOwnProperty(e)?re[e]:(t=se.exec(e))?(ge(t[1])<<24|ge(t[2])<<16|ge(t[3])<<8|255)>>>0:(t=le.exec(e))?(ge(t[1])<<24|ge(t[2])<<16|ge(t[3])<<8|be(t[4]))>>>0:(t=pe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=he.exec(e))?parseInt(t[1],16)>>>0:(t=fe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ue.exec(e))?(255|ve(ye(t[1]),_e(t[2]),_e(t[3])))>>>0:(t=ce.exec(e))?(ve(ye(t[1]),_e(t[2]),_e(t[3]))|be(t[4]))>>>0:null}(e);if(null===t)return e;var n=(16711680&(t=t||0))>>>16,r=(65280&t)>>>8,i=(255&t)/255;return"rgba(".concat((4278190080&t)>>>24,", ").concat(n,", ").concat(r,", ").concat(i,")")}var we=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Se=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ee=new RegExp("(".concat(Object.keys(re).join("|"),")"),"g"),ke={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oe=["Webkit","Ms","Moz","O"];function Te(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||ke.hasOwnProperty(e)&&ke[e]?(""+t).trim():t+"px"}ke=Object.keys(ke).reduce(function(e,t){return Oe.forEach(function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]}),e},ke);var Ce={};V(function(e){return new ne(e)}),z("div"),L(function(e){var t=e.output.map(function(e){return e.replace(Se,xe)}).map(function(e){return e.replace(Ee,xe)}),n=t[0].match(we).map(function(){return[]});t.forEach(function(e){e.match(we).forEach(function(e,t){return n[t].push(+e)})});var r=t[0].match(we).map(function(t,r){return K(Object(g.a)({},e,{output:n[r]}))});return function(e){var n=0;return t[0].replace(we,function(){return r[n++](e)}).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,function(e,t,n,r,i){return"rgba(".concat(Math.round(t),", ").concat(Math.round(n),", ").concat(Math.round(r),", ").concat(i,")")})}}),j(re),I(function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,i=t.scrollTop,o=t.scrollLeft,a=Object(y.a)(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==i&&(e.scrollTop=i),void 0!==o&&(e.scrollLeft=o),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(l)){var u=0===l.indexOf("--"),c=Te(l,n[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,c):e.style[l]=c}for(var p in a){var f=s?p:Ce[p]||(Ce[p]=p.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}));"undefined"!==typeof e.getAttribute(f)&&e.setAttribute(f,a[p])}},function(e){return e});var Pe,Ae,Me=(Pe=function(e){return Object(b.forwardRef)(function(t,n){var r=w(),i=Object(b.useRef)(!0),o=Object(b.useRef)(null),a=Object(b.useRef)(null),s=Object(b.useCallback)(function(e){var t=o.current;o.current=new H(e,function(){var e=!1;a.current&&(e=T.fn(a.current,o.current.getAnimatedValue())),a.current&&!1!==e||r()}),t&&t.detach()},[]);Object(b.useEffect)(function(){return function(){i.current=!1,o.current&&o.current.detach()}},[]),Object(b.useImperativeHandle)(n,function(){return U(a,i,r)}),s(t);var l,u=o.current.getValue(),c=(u.scrollTop,u.scrollLeft,Object(y.a)(u,["scrollTop","scrollLeft"])),p=(l=e,!x.fun(l)||l.prototype instanceof _.a.Component?function(e){return a.current=function(e,t){return t&&(x.fun(t)?t(e):x.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return _.a.createElement(e,Object(g.a)({},c,{ref:p}))})},void 0===(Ae=!1)&&(Ae=!0),function(e){return(x.arr(e)?e:Object.keys(e)).reduce(function(e,t){var n=Ae?t[0].toLowerCase()+t.substring(1):t;return e[n]=Pe(n),e},Pe)})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"])},function(e,t,n){"use strict";n.d(t,"a",function(){return w}),n.d(t,"b",function(){return g}),n.d(t,"c",function(){return v}),n.d(t,"d",function(){return x}),n.d(t,"e",function(){return C});var r=n(40),i=n(1),o=n.n(i),a=(n(5),n(60)),s=n(148),l=n(55),u=n(3),c=n(149),p=n.n(c),f=(n(62),n(32)),d=n(74),h=n.n(d),m=function(e){var t=Object(s.a)();return t.displayName=e,t}("Router-History"),v=function(e){var t=Object(s.a)();return t.displayName=e,t}("Router"),g=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen(function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e})),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(v.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(m.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;o.a.Component;var y={},b=1e4,_=0;function x(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,l=n.sensitive,u=void 0!==l&&l;return[].concat(r).reduce(function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=y[n]||(y[n]={});if(r[e])return r[e];var i=[],o={regexp:p()(e,i,t),keys:i};return _0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?o.standard:n,l=t.easing,u=void 0===l?i.easeInOut:l,c=t.delay,p=void 0===c?0:c;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map(function(e){return"".concat(e," ").concat("string"===typeof s?s:a(s)," ").concat(u," ").concat("string"===typeof p?p:a(p))}).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){"use strict";var r=!0,i="Invariant failed";t.a=function(e,t){if(!e){if(r)throw new Error(i);throw new Error(i+": "+(t||""))}}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i});var r="undefined"!==typeof window?window:e,i=("undefined"!==typeof e||window,"undefined"!==typeof document?document:{})}).call(this,n(63))},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(1),i=n(80);function o(){return r.useContext(i.a)}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return a}),n.d(t,"d",function(){return s});var r=n(0),i=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"}}]})(e)};i.displayName="FiFacebook";var o=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}},{tag:"path",attr:{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"}},{tag:"line",attr:{x1:"17.5",y1:"6.5",x2:"17.5",y2:"6.5"}}]})(e)};o.displayName="FiInstagram";var a=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"}},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}}]})(e)};a.displayName="FiSearch";var s=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"}}]})(e)};s.displayName="FiTwitter"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(3);function i(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,i=e.length;r=0;f--){var d=a[f];"."===d?o(a,f):".."===d?(o(a,f),p++):p&&(o(a,f),p--)}if(!u)for(;p--;p)a.unshift("..");!u||""===a[0]||a[0]&&i(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(function(t,r){return e(t,n[r])});if("object"===typeof t||"object"===typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every(function(r){return e(t[r],n[r])})}return!1},u=n(55);function c(e){return"/"===e.charAt(0)?e:"/"+e}function p(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function m(e,t,n,i){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function g(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),p({action:"PUSH",location:r,index:t,entries:n})}})},replace:function(e,t){var r=m(e,t,f(),_.location);c.confirmTransitionTo(r,"REPLACE",n,function(e){e&&(_.entries[_.index]=r,p({action:"REPLACE",location:r}))})},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return _}},,function(e,t,n){"use strict";e.exports=n(250)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"__DO_NOT_USE__ActionTypes",function(){return o}),n.d(t,"applyMiddleware",function(){return m}),n.d(t,"bindActionCreators",function(){return p}),n.d(t,"combineReducers",function(){return u}),n.d(t,"compose",function(){return h}),n.d(t,"createStore",function(){return s});var r=n(147),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function a(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var i;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!==typeof e)throw new Error("Expected the reducer to be a function.");var l=e,u=t,c=[],p=c,f=!1;function d(){p===c&&(p=c.slice())}function h(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function m(e){if("function"!==typeof e)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return d(),p.push(e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,d();var n=p.indexOf(e);p.splice(n,1),c=null}}}function v(e){if(!a(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,u=l(u,e)}finally{f=!1}for(var t=c=p,n=0;n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=-90&&r<=90,"invalid latitude");var i=r*q;return[W*(n*q+V)/(2*V),W*(V+Math.log(Math.tan(H+.5*i)))/(2*V)]}function $(e){var t=P(e,2),n=t[0],r=t[1],i=n/W*(2*V)-V,o=2*(Math.atan(Math.exp(r/W*(2*V)-V))-H);return[i*G,o*G]}function Q(e){var t=e.latitude,n=e.longitude,r=e.highPrecision,i=void 0!==r&&r;U(Number.isFinite(t)&&Number.isFinite(n));var o={},a=W,s=Math.cos(t*q),l=a/360,u=l/s,c=a/K/s;if(o.unitsPerMeter=[c,c,c],o.metersPerUnit=[1/c,1/c,1/c],o.unitsPerDegree=[l,u,c],o.degreesPerUnit=[1/l,1/u,1/c],i){var p=q*Math.tan(t*q)/s,f=l*p/2,d=a/K*p,h=d/u*c;o.unitsPerDegree2=[0,f,d],o.unitsPerMeter2=[h,0,h]}return o}function ee(e){var t,n,r=e.height,i=e.pitch,o=e.bearing,a=e.altitude,s=e.scale,l=e.center,u=void 0===l?null:l,c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return R(c,c,[0,0,-a]),function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],p=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+u*r,e[5]=a*i+c*r,e[6]=s*i+p*r,e[7]=l*i+f*r,e[8]=u*i-o*r,e[9]=c*i-a*r,e[10]=p*i-s*r,e[11]=f*i-l*r}(c,c,-i*q),function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],p=t[6],f=t[7];t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+u*r,e[1]=a*i+c*r,e[2]=s*i+p*r,e[3]=l*i+f*r,e[4]=u*i-o*r,e[5]=c*i-a*r,e[6]=p*i-s*r,e[7]=f*i-l*r}(c,c,o*q),L(c,c,[s/=r,s,s]),u&&R(c,c,((t=[])[0]=-(n=u)[0],t[1]=-n[1],t[2]=-n[2],t)),c}function te(e){var t=e.width,n=e.height,r=e.pitch,i=function(e){var t=e.width,n=e.height,r=e.altitude,i=void 0===r?Z:r,o=e.pitch,a=void 0===o?0:o,s=e.nearZMultiplier,l=void 0===s?1:s,u=e.farZMultiplier,c=void 0===u?1:u,p=a*q,f=Math.atan(.5/i),d=Math.sin(f)*i/Math.sin(Math.min(Math.max(Math.PI/2-p-f,.01),Math.PI-.01));return{fov:2*f,aspect:t/n,focalDistance:i,near:l,far:(Math.sin(p)*d+i)*c}}({width:t,height:n,altitude:e.altitude,pitch:r,nearZMultiplier:e.nearZMultiplier,farZMultiplier:e.farZMultiplier});return function(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e}([],i.fov,i.aspect,i.near,i.far)}function ne(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=P(e,3),i=r[0],o=r[1],a=r[2];if(U(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a))return I(t,[i,o,a,1]);var s=I(t,[i,o,0,1]),l=I(t,[i,o,1,1]),u=s[2],c=l[2];return function(e,t,n,r){var i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}([],s,l,u===c?0:((n||0)-u)/(c-u))}var re=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],ie=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width,r=t.height,i=t.scale,o=t.viewMatrix,a=void 0===o?re:o,s=t.projectionMatrix,l=void 0===s?re:s;w(this,e),this.width=n||1,this.height=r||1,this.scale=i,this.unitsPerMeter=1,this.viewMatrix=a,this.projectionMatrix=l;var u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];D(u,u,this.projectionMatrix),D(u,u,this.viewMatrix),this.viewProjectionMatrix=u;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];L(c,c,[this.width/2,-this.height/2,1]),R(c,c,[1,-1,0]),D(c,c,this.viewProjectionMatrix);var p=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],p=t[9],f=t[10],d=t[11],h=t[12],m=t[13],v=t[14],g=t[15],y=n*s-r*a,b=n*l-i*a,_=n*u-o*a,x=r*l-i*s,w=r*u-o*s,S=i*u-o*l,E=c*m-p*h,k=c*v-f*h,O=c*g-d*h,T=p*v-f*m,C=p*g-d*m,P=f*g-d*v,A=y*P-b*C+_*T+x*O-w*k+S*E;return A?(A=1/A,e[0]=(s*P-l*C+u*T)*A,e[1]=(i*C-r*P-o*T)*A,e[2]=(m*S-v*w+g*x)*A,e[3]=(f*w-p*S-d*x)*A,e[4]=(l*O-a*P-u*k)*A,e[5]=(n*P-i*O+o*k)*A,e[6]=(v*_-h*S-g*b)*A,e[7]=(c*S-f*_+d*b)*A,e[8]=(a*C-s*O+u*E)*A,e[9]=(r*O-n*C-o*E)*A,e[10]=(h*w-m*_+g*y)*A,e[11]=(p*_-c*w-d*y)*A,e[12]=(s*k-a*T-l*E)*A,e[13]=(n*T-r*k+i*E)*A,e[14]=(m*b-h*x-v*y)*A,e[15]=(c*x-p*b+f*y)*A,e):null}([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c);if(!p)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=c,this.pixelUnprojectionMatrix=p,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return E(e,[{key:"equals",value:function(t){return t instanceof e&&(t.width===this.width&&t.height===this.height&&N(t.projectionMatrix,this.projectionMatrix)&&N(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).topLeft,n=void 0===t||t,r=function(e,t){var n=P(e,3),r=n[0],i=n[1],o=n[2],a=void 0===o?0:o;return U(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)),I(t,[r,i,a,1])}(this.projectPosition(e),this.pixelProjectionMatrix),i=P(r,2),o=i[0],a=i[1],s=n?a:this.height-a;return 2===e.length?[o,s]:[o,s,r[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,i=t.targetZ,o=P(e,3),a=o[0],s=o[1],l=o[2],u=r?s:this.height-s,c=i&&i*this.unitsPerMeter,p=ne([a,u,l],this.pixelUnprojectionMatrix,c),f=P(this.unprojectPosition(p),3),d=f[0],h=f[1],m=f[2];return Number.isFinite(l)?[d,h,m]:Number.isFinite(i)?[d,h,i]:[d,h]}},{key:"projectPosition",value:function(e){var t=P(this.projectFlat(e),2);return[t[0],t[1],(e[2]||0)*this.unitsPerMeter]}},{key:"unprojectPosition",value:function(e){var t=P(this.unprojectFlat(e),2);return[t[0],t[1],(e[2]||0)/this.unitsPerMeter]}},{key:"projectFlat",value:function(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return e}},{key:"unprojectFlat",value:function(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return e}}]),e}();var oe=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.width,i=n.height,o=n.latitude,a=void 0===o?0:o,s=n.longitude,l=void 0===s?0:s,u=n.zoom,c=void 0===u?0:u,p=n.pitch,f=void 0===p?0:p,d=n.bearing,h=void 0===d?0:d,m=n.altitude,v=void 0===m?1.5:m,g=n.nearZMultiplier,y=void 0===g?.02:g,b=n.farZMultiplier,_=void 0===b?1.01:b;w(this,t),r=r||1,i=i||1;var x=Y(c);v=Math.max(.75,v);var S=J([l,a]);S[2]=0;var E,C,P=te({width:r,height:i,pitch:f,bearing:h,altitude:v,nearZMultiplier:y,farZMultiplier:_}),A=ee({height:i,scale:x,center:S,pitch:f,bearing:h,altitude:v});return E=this,(e=!(C=T(t).call(this,{width:r,height:i,scale:x,viewMatrix:A,projectionMatrix:P}))||"object"!==k(C)&&"function"!==typeof C?O(E):C).latitude=a,e.longitude=l,e.zoom=c,e.pitch=f,e.bearing=h,e.altitude=v,e.center=S,e.unitsPerMeter=Q(O(e)).unitsPerMeter[2],Object.freeze(O(e)),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(t,ie),E(t,[{key:"projectFlat",value:function(e){return J(e)}},{key:"unprojectFlat",value:function(e){return $(e)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t,n,r=e.lngLat,i=ne(e.pos,this.pixelUnprojectionMatrix),o=z([],J(r),((t=[])[0]=-(n=i)[0],t[1]=-n[1],t));return $(z([],this.center,o),this.scale)}},{key:"getLocationAtPoint",value:function(e){var t=e.lngLat,n=e.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}},{key:"fitBounds",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,o=function(e){var t=e.width,n=e.height,r=e.bounds,i=e.minExtent,o=void 0===i?0:i,a=e.maxZoom,s=void 0===a?24:a,l=e.padding,u=void 0===l?0:l,c=e.offset,p=void 0===c?[0,0]:c,f=P(r,2),d=P(f[0],2),h=d[0],m=d[1],v=P(f[1],2),g=v[0],y=v[1];Number.isFinite(u)?u={top:u,bottom:u,left:u,right:u}:U(Number.isFinite(u.top)&&Number.isFinite(u.bottom)&&Number.isFinite(u.left)&&Number.isFinite(u.right));var b=new oe({width:t,height:n,longitude:0,latitude:0,zoom:0}),_=b.project([h,y]),x=b.project([g,m]),w=[Math.max(Math.abs(x[0]-_[0]),o),Math.max(Math.abs(x[1]-_[1]),o)],S=[t-u.left-u.right-2*Math.abs(p[0]),n-u.top-u.bottom-2*Math.abs(p[1])];U(S[0]>0&&S[1]>0);var E=S[0]/w[0],k=S[1]/w[1],O=(u.right-u.left)/2/E,T=(u.bottom-u.top)/2/k,C=[(x[0]+_[0])/2+O,(x[1]+_[1])/2+T],A=b.unproject(C),M=Math.min(s,b.zoom+Math.log2(Math.abs(Math.min(E,k))));return U(Number.isFinite(M)),{longitude:A[0],latitude:A[1],zoom:M}}(Object.assign({width:r,height:i,bounds:e},n));return new t({width:r,height:i,longitude:o.longitude,latitude:o.latitude,zoom:o.zoom})}}]),t}(),ae=85.05113,se=-85.05113;var le=.01,ue=["longitude","latitude","zoom"],ce={curve:1.414,speed:1.2};function pe(e,t,n){var r=(n=Object.assign({},ce,n)).curve,i=e.zoom,o=[e.longitude,e.latitude],a=Y(i),s=t.zoom,l=[t.longitude,t.latitude],u=Y(s-i),c=J(o),p=J(l),f=F([],p,c),d=Math.max(e.width,e.height),h=d/u,m=B(f)*a,v=Math.max(m,le),g=r*r,y=(h*h-d*d+g*g*v*v)/(2*d*g*v),b=(h*h-d*d-g*g*v*v)/(2*h*g*v),_=Math.log(Math.sqrt(y*y+1)-y),x=Math.log(Math.sqrt(b*b+1)-b);return{startZoom:i,startCenterXY:c,uDelta:f,w0:d,u1:m,S:(x-_)/r,rho:r,rho2:g,r0:_,r1:x}}var fe=n(213),de=n(134),he=n(187),me=n.n(he);function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ge=1e-7;function ye(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function be(e,t){if(e===t)return!0;if(ye(e)&&ye(t)){if(e.length!==t.length)return!1;for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n180&&(n=n<0?n+360:n-360),n}function Pe(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"===typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ae(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};return Object(i.a)(this,n),e=t.call(this),Object(f.a)(o(e),"speed",void 0),Object(f.a)(o(e),"propNames",Ie),Object(f.a)(o(e),"props",void 0),e.props=Object.assign({},Re,r),e}return Object(a.a)(n,[{key:"initializeProps",value:function(e,t){var n,r={},i={},o=Pe(je);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=e[a],l=t[a];we(Te(s)&&Te(l),"".concat(a," must be supplied for transition")),r[a]=s,i[a]=Ce(a,s,l)}}catch(h){o.e(h)}finally{o.f()}var u,c=Pe(De);try{for(c.s();!(u=c.n()).done;){var p=u.value,f=e[p]||0,d=t[p]||0;r[p]=f,i[p]=Ce(p,f,d)}}catch(h){c.e(h)}finally{c.f()}return{start:r,end:i}}},{key:"interpolateProps",value:function(e,t,n){var r,i=function(e,t,n){var r,i={},o=pe(e,t,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),a=o.startZoom,s=o.startCenterXY,l=o.uDelta,u=o.w0,c=o.u1,p=o.S,f=o.rho,d=o.rho2,h=o.r0;if(c2&&void 0!==arguments[2]?arguments[2]:{},i=r=Object.assign({},ce,r),o=i.screenSpeed,a=i.speed,s=i.maxDuration,l=pe(e,t,r),u=l.S,c=l.rho,p=1e3*u;return n=Number.isFinite(o)?p/(o/c):p/a,Number.isFinite(s)&&n>s?0:n}(e,t,this.props)),n}}]),n}();function Ne(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"===typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ze(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};return Object(i.a)(this,n),e=t.call(this),Object(f.a)(o(e),"around",void 0),Array.isArray(r)&&(r={transitionProps:r}),e.propNames=r.transitionProps||Fe,r.around&&(e.around=r.around),e}return Object(a.a)(n,[{key:"initializeProps",value:function(e,t){var n={},r={};if(this.around){n.around=this.around;var i=new oe(e).unproject(this.around);Object.assign(r,t,{around:new oe(t).project(i),aroundLngLat:i})}var o,a=Ne(this.propNames);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=e[s],u=t[s];we(Te(l)&&Te(u),"".concat(s," must be supplied for transition")),n[s]=l,r[s]=Ce(s,l,u)}}catch(c){a.e(c)}finally{a.f()}return{start:n,end:r}}},{key:"interpolateProps",value:function(e,t,n){var r,i={},o=Ne(this.propNames);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=xe(e[a],t[a],n)}}catch(c){o.e(c)}finally{o.f()}if(t.around){var s=ve(new oe(Object.assign({},t,i)).getMapCenterByLngLatPosition({lngLat:t.aroundLngLat,pos:xe(e.around,t.around,n)}),2),l=s[0],u=s[1];i.longitude=l,i.latitude=u}return i}}]),n}(),Ve={minZoom:0,maxZoom:24,minPitch:0,maxPitch:60},He={pitch:0,bearing:0,altitude:1.5},qe=function(){function e(t){var n=t.width,r=t.height,o=t.latitude,a=t.longitude,s=t.zoom,l=t.bearing,u=void 0===l?He.bearing:l,c=t.pitch,p=void 0===c?He.pitch:c,d=t.altitude,h=void 0===d?He.altitude:d,m=t.maxZoom,v=void 0===m?Ve.maxZoom:m,g=t.minZoom,y=void 0===g?Ve.minZoom:g,b=t.maxPitch,_=void 0===b?Ve.maxPitch:b,x=t.minPitch,w=void 0===x?Ve.minPitch:x,S=t.transitionDuration,E=t.transitionEasing,k=t.transitionInterpolator,O=t.transitionInterruption,T=t.startPanLngLat,C=t.startZoomLngLat,P=t.startBearing,A=t.startPitch,M=t.startZoom;Object(i.a)(this,e),Object(f.a)(this,"_viewportProps",void 0),Object(f.a)(this,"_interactiveState",void 0),we(Number.isFinite(n),"`width` must be supplied"),we(Number.isFinite(r),"`height` must be supplied"),we(Number.isFinite(a),"`longitude` must be supplied"),we(Number.isFinite(o),"`latitude` must be supplied"),we(Number.isFinite(s),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:o,longitude:a,zoom:s,bearing:u,pitch:p,altitude:h,maxZoom:v,minZoom:y,maxPitch:_,minPitch:w,transitionDuration:S,transitionEasing:E,transitionInterpolator:k,transitionInterruption:O}),this._interactiveState={startPanLngLat:T,startZoomLngLat:C,startBearing:P,startPitch:A,startZoom:M}}return Object(a.a)(e,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(e){var t=e.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(t)})}},{key:"pan",value:function(e){var t=e.pos,n=e.startPos,r=this._interactiveState.startPanLngLat||this._unproject(n);if(!r)return this;var i=ve(this._calculateNewLngLat({startPanLngLat:r,pos:t}),2),o=i[0],a=i[1];return this._getUpdatedMapState({longitude:o,latitude:a})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(e){e.pos;return this._getUpdatedMapState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(e){var t=e.deltaScaleX,n=void 0===t?0:t,r=e.deltaScaleY,i=void 0===r?0:r,o=this._interactiveState,a=o.startBearing,s=o.startPitch;if(!Number.isFinite(a)||!Number.isFinite(s))return this;var l=this._calculateNewPitchAndBearing({deltaScaleX:n,deltaScaleY:i,startBearing:a||0,startPitch:s||0}),u=l.pitch,c=l.bearing;return this._getUpdatedMapState({bearing:c,pitch:u})}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(e){var t=e.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(t),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(e){var t=e.pos,n=e.startPos,r=e.scale;we(r>0,"`scale` must be a positive number");var i=this._interactiveState,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(n)||this._unproject(t)),we(a,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var s=this._calculateNewZoom({scale:r,startZoom:o||0}),l=ve(new oe(Object.assign({},this._viewportProps,{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:t}),2),u=l[0],c=l[1];return this._getUpdatedMapState({zoom:s,longitude:u,latitude:c})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(t){return new e(Object.assign({},this._viewportProps,this._interactiveState,t))}},{key:"_applyConstraints",value:function(e){var t=e.maxZoom,n=e.minZoom,r=e.zoom;e.zoom=_e(r,n,t);var i=e.maxPitch,o=e.minPitch,a=e.pitch;return e.pitch=_e(a,o,i),Object.assign(e,function(e){var t=e.width,n=e.height,r=e.longitude,i=e.latitude,o=e.zoom,a=e.pitch,s=void 0===a?0:a,l=e.bearing,u=void 0===l?0:l;(r<-180||r>180)&&(r=j(r+180,360)-180),(u<-180||u>180)&&(u=j(u+180,360)-180);var c=new oe({width:t,height:n,longitude:r,latitude:i,zoom:o}),p=c.project([r,ae])[1],f=c.project([r,se])[1],d=0;return f-p0?d=p:f0?l=i+n*(s-i):n<0&&(l=i-n*(a-i)),{pitch:l,bearing:r+180*t}}}]),e}();var Ge=Object(d.createContext)({viewport:null,map:null,mapContainer:null,onViewportChange:null,onViewStateChange:null,eventManager:null,isDragging:!1});function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return e._map.queryRenderedFeatures(t,n)}),Object(f.a)(o(e),"_mapboxMapError",function(t){(t.error&&t.error.status||t.status)!==Xe||e.state.accessTokenInvalid||(console.error(Ye),e.setState({accessTokenInvalid:!0})),e.props.onError(t)}),e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){if(n.supported()){var e=this.props.mapStyle;this._mapbox=new de.a(Object.assign({},this.props,{mapboxgl:me.a,width:this._width,height:this._height,container:this._mapboxMapRef.current,onError:this._mapboxMapError,mapStyle:x(e)})),this._map=this._mapbox.getMap()}}},{key:"componentDidUpdate",value:function(e){this._mapbox&&(this._updateMapStyle(e,this.props),this._updateMapProps(this.props))}},{key:"componentWillUnmount",value:function(){this._mapbox&&(this._mapbox.finalize(),this._mapbox=null,this._map=null)}},{key:"_updateMapSize",value:function(e,t){this._width===e&&this._height===t||(this._width=e,this._height=t,this._updateMapProps(this.props))}},{key:"_updateMapStyle",value:function(e,t){var n=t.mapStyle;n!==e.mapStyle&&n&&this._map.setStyle(x(n),{diff:!this.props.preventStyleDiffing})}},{key:"_updateMapProps",value:function(e){this._mapbox&&this._mapbox.setProps(Object.assign({},e,{width:this._width,height:this._height}))}},{key:"_renderNoTokenWarning",value:function(){if(this.state.accessTokenInvalid&&!this.props.disableTokenWarning){return d.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},d.createElement("h3",{key:"header"},"NO_TOKEN_WARNING"),d.createElement("div",{key:"text"},"For information on setting up your basemap, read"),d.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}return null}},{key:"_renderOverlays",value:function(e){var t=this,n=e.width,r=void 0===n?Number(this.props.width):n,i=e.height,o=void 0===i?Number(this.props.height):i;return this._updateMapSize(r,o),d.createElement(Ge.Consumer,null,function(e){var n=Ke(Ke({},e),{},{viewport:new oe(Ke(Ke(Ke({},t.props),t.props.viewState),{},{width:r,height:o})),map:t._map,mapContainer:e.mapContainer||t._mapContainerRef.current});return d.createElement(Ge.Provider,{value:n},d.createElement("div",{key:"map-overlays",className:"overlays",style:Je},t.props.children))})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.width,r=e.height,i=e.style,o=e.visibilityConstraints,a=Object.assign({position:"relative"},i,{width:n,height:r}),s=this.props.visible&&function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve;for(var r in n){var i=r.slice(0,3),o=(t=r.slice(3))[0].toLowerCase()+t.slice(1);if("min"===i&&e[o]n[r])return!1}return!0}(this.props.viewState||this.props,o),l=Object.assign({},Je,{visibility:s?"inherit":"hidden"});return d.createElement("div",{key:"map-container",style:a,ref:this._mapContainerRef},d.createElement("div",{key:"map-mapbox",ref:this._mapboxMapRef,style:l,className:t}),d.createElement(fe.a,{key:"autosizer",disableWidth:Number.isFinite(n),disableHeight:Number.isFinite(r),onResize:this.props.onResize},this._renderOverlays.bind(this)),this._renderNoTokenWarning())}}],[{key:"supported",value:function(){return me.a&&me.a.supported()}}]),n}();Object(f.a)(et,"propTypes",$e),Object(f.a)(et,"defaultProps",Qe);var tt=function(){};var nt=1,rt=2,it=3,ot=4,at={transitionDuration:0,transitionEasing:function(e){return e},transitionInterpolator:new Ue,transitionInterruption:nt,onTransitionStart:tt,onTransitionInterrupt:tt,onTransitionEnd:tt,onViewportChange:tt,onStateChange:tt},st=function(){function e(t,n){var r=this;Object(i.a)(this,e),Object(f.a)(this,"props",void 0),Object(f.a)(this,"state",void 0),Object(f.a)(this,"time",void 0),Object(f.a)(this,"_animationFrame",null),Object(f.a)(this,"_onTransitionFrame",function(){r._animationFrame=requestAnimationFrame(r._onTransitionFrame),r._updateViewport()}),t&&(this.props=t),this.time=n||Date.now}return Object(a.a)(e,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(e){var t=this.props;if(this.props=e,this._shouldIgnoreViewportChange(t,e))return!1;if(this._isTransitionEnabled(e)){var n=Object.assign({},t),r=Object.assign({},e);if(this._isTransitionInProgress()&&(t.onTransitionInterrupt(),this.state.interruption===rt?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===ot)){var i=this.time(),o=(i-this.state.startTime)/this.state.duration;r.transitionDuration=this.state.duration-(i-this.state.startTime),r.transitionEasing=function(e,t){var n=e(t);return function(r){return 1/(1-n)*(e(r*(1-t)+t)-n)}}(this.state.easing,o),r.transitionInterpolator=n.transitionInterpolator}return r.onTransitionStart(),this._triggerTransition(n,r),!0}return this._isTransitionInProgress()&&(t.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(e){var t=e.transitionDuration,n=e.transitionInterpolator;return(t>0||"auto"===t)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(e){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(e,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(e,t){return!e||(this._isTransitionInProgress()?this.state.interruption===it||this._isUpdateDueToCurrentTransition(t):!this._isTransitionEnabled(t)||t.transitionInterpolator.arePropsEqual(e,t))}},{key:"_triggerTransition",value:function(e,t){we(this._isTransitionEnabled(t)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=t.transitionInterpolator,r=n.getDuration?n.getDuration(e,t):t.transitionDuration;if(0!==r){var i=t.transitionInterpolator.initializeProps(e,t),o={inTransition:!0,isZooming:e.zoom!==t.zoom,isPanning:e.longitude!==t.longitude||e.latitude!==t.latitude,isRotating:e.bearing!==t.bearing||e.pitch!==t.pitch};this.state={duration:r,easing:t.transitionEasing,interpolator:t.transitionInterpolator,interruption:t.transitionInterruption,startTime:this.time(),startProps:i.start,endProps:i.end,animation:null,propsInTransition:{},interactionState:o},this._onTransitionFrame(),this.props.onStateChange(o)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.props.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var e=this.time(),t=this.state,n=t.startTime,r=t.duration,i=t.easing,o=t.interpolator,a=t.startProps,s=t.endProps,l=!1,u=(e-n)/r;u>=1&&(u=1,l=!0),u=i(u);var c=o.interpolateProps(a,s,u),p=new qe(Object.assign({},this.props,c));this.state.propsInTransition=p.getViewportProps(),this.props.onViewportChange(this.state.propsInTransition,this.state.interactionState,this.props),l&&(this._endTransition(),this.props.onTransitionEnd())}}]),e}();function lt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ct(e,t){for(var n=0;n0&&(function(e,t){for(var n=0;n=0&&(this.pressed=!0),t&mt&&0===e.which&&(t=vt),this.pressed&&(t&vt&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))};var yt=dt.a.Manager,bt=dt.a,_t=bt?[[bt.Rotate,{enable:!1}],[bt.Pinch,{enable:!1}],[bt.Swipe,{enable:!1}],[bt.Pan,{threshold:0,enable:!1}],[bt.Press,{enable:!1}],[bt.Tap,{event:"doubletap",taps:2,enable:!1}],[bt.Tap,{event:"anytap",enable:!1}],[bt.Tap,{enable:!1}]]:null,xt={rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},wt={doubletap:["tap"]},St={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},Et=["keydown","keyup"],kt=["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],Ot=["wheel","mousewheel","DOMMouseScroll"],Tt={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},Ct={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},Pt=n(83),At=-1!==Pt.b.indexOf("firefox"),Mt=Ot,It=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ut(this,e),this.element=t,this.callback=n,this.options=Object.assign({enable:!0},i),this.events=Mt.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(function(e){return t.addEventListener(e,r.handleEvent,!!Pt.a&&{passive:!1})})}return pt(e,[{key:"destroy",value:function(){var e=this;this.events.forEach(function(t){return e.element.removeEventListener(t,e.handleEvent)})}},{key:"enableEventType",value:function(e,t){"wheel"===e&&(this.options.enable=t)}},{key:"handleEvent",value:function(e){if(this.options.enable){var t=e.deltaY;Pt.c.WheelEvent&&(At&&e.deltaMode===Pt.c.WheelEvent.DOM_DELTA_PIXEL&&(t/=Pt.c.devicePixelRatio),e.deltaMode===Pt.c.WheelEvent.DOM_DELTA_LINE&&(t*=40));var n={x:e.clientX,y:e.clientY};0!==t&&t%4.000244140625===0&&(t=Math.floor(t/4.000244140625)),e.shiftKey&&t&&(t*=.25),this._onWheel(e,-t,n)}}},{key:"_onWheel",value:function(e,t,n){this.callback({type:"wheel",center:n,delta:t,srcEvent:e,pointerType:"mouse",target:e.target})}}]),e}(),jt=kt,Dt=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ut(this,e),this.element=t,this.callback=n,this.pressed=!1,this.options=Object.assign({enable:!0},i),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=jt.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(function(e){return t.addEventListener(e,r.handleEvent)})}return pt(e,[{key:"destroy",value:function(){var e=this;this.events.forEach(function(t){return e.element.removeEventListener(t,e.handleEvent)})}},{key:"enableEventType",value:function(e,t){"pointermove"===e&&(this.enableMoveEvent=t),"pointerover"===e&&(this.enableOverEvent=t),"pointerout"===e&&(this.enableOutEvent=t),"pointerleave"===e&&(this.enableLeaveEvent=t)}},{key:"handleEvent",value:function(e){this.handleOverEvent(e),this.handleOutEvent(e),this.handleLeaveEvent(e),this.handleMoveEvent(e)}},{key:"handleOverEvent",value:function(e){this.enableOverEvent&&"mouseover"===e.type&&this.callback({type:"pointerover",srcEvent:e,pointerType:"mouse",target:e.target})}},{key:"handleOutEvent",value:function(e){this.enableOutEvent&&"mouseout"===e.type&&this.callback({type:"pointerout",srcEvent:e,pointerType:"mouse",target:e.target})}},{key:"handleLeaveEvent",value:function(e){this.enableLeaveEvent&&"mouseleave"===e.type&&this.callback({type:"pointerleave",srcEvent:e,pointerType:"mouse",target:e.target})}},{key:"handleMoveEvent",value:function(e){if(this.enableMoveEvent)switch(e.type){case"mousedown":e.button>=0&&(this.pressed=!0);break;case"mousemove":0===e.which&&(this.pressed=!1),this.pressed||this.callback({type:"pointermove",srcEvent:e,pointerType:"mouse",target:e.target});break;case"mouseup":this.pressed=!1}}}]),e}(),Rt=Et,Lt=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ut(this,e),this.element=t,this.callback=n,this.options=Object.assign({enable:!0},i),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=Rt.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),t.tabIndex=i.tabIndex||0,t.style.outline="none",this.events.forEach(function(e){return t.addEventListener(e,r.handleEvent)})}return pt(e,[{key:"destroy",value:function(){var e=this;this.events.forEach(function(t){return e.element.removeEventListener(t,e.handleEvent)})}},{key:"enableEventType",value:function(e,t){"keydown"===e&&(this.enableDownEvent=t),"keyup"===e&&(this.enableUpEvent=t)}},{key:"handleEvent",value:function(e){var t=e.target||e.srcElement;"INPUT"===t.tagName&&"text"===t.type||"TEXTAREA"===t.tagName||(this.enableDownEvent&&"keydown"===e.type&&this.callback({type:"keydown",srcEvent:e,key:e.key,target:e.target}),this.enableUpEvent&&"keyup"===e.type&&this.callback({type:"keyup",srcEvent:e,key:e.key,target:e.target}))}}]),e}(),Nt=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ut(this,e),this.element=t,this.callback=n,this.options=Object.assign({enable:!0},r),this.handleEvent=this.handleEvent.bind(this),t.addEventListener("contextmenu",this.handleEvent)}return pt(e,[{key:"destroy",value:function(){this.element.removeEventListener("contextmenu",this.handleEvent)}},{key:"enableEventType",value:function(e,t){"contextmenu"===e&&(this.options.enable=t)}},{key:"handleEvent",value:function(e){this.options.enable&&this.callback({type:"contextmenu",center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})}}]),e}();function zt(e){return(zt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Bt=1,Ft=2,Ut=4,Vt={pointerdown:Bt,pointermove:Ft,pointerup:Ut,mousedown:Bt,mousemove:Ft,mouseup:Ut},Ht=1,qt=2,Gt=3,Wt=0,Kt=1,Zt=2,Yt=1,Xt=2,Jt=4;var $t={srcElement:"root",priority:0},Qt=function(){function e(t){ut(this,e),this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}return pt(e,[{key:"isEmpty",value:function(){return!this._active}},{key:"add",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.handlers,a=this.handlersByElement;n&&("object"!==zt(n)||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},$t,n):$t;var s=a.get(n.srcElement);s||(s=[],a.set(n.srcElement,s));var l={type:e,handler:t,srcElement:n.srcElement,priority:n.priority};r&&(l.once=!0),i&&(l.passive=!0),o.push(l),this._active=this._active||!l.passive;for(var u=s.length-1;u>=0&&!(s[u].priority>=l.priority);)u--;s.splice(u+1,0,l)}},{key:"remove",value:function(e,t){for(var n=this.handlers,r=this.handlersByElement,i=n.length-1;i>=0;i--){var o=n[i];if(o.type===e&&o.handler===t){n.splice(i,1);var a=r.get(o.srcElement);a.splice(a.indexOf(o),1),0===a.length&&r.delete(o.srcElement)}}this._active=n.some(function(e){return!e.passive})}},{key:"handleEvent",value:function(e){if(!this.isEmpty()){for(var t=this._normalizeEvent(e),n=e.srcEvent.target;n&&n!==t.rootElement;){if(this._emit(t,n),t.handled)return;n=n.parentNode}this._emit(t,"root")}}},{key:"_emit",value:function(e,t){var n=this.handlersByElement.get(t);if(n){for(var r=!1,i=function(){e.handled=!0},o=function(){e.handled=!0,r=!0},a=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ut(this,e),this.options=Object.assign({},en,n),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(t);var r=n.events;r&&this.on(r)}return pt(e,[{key:"setElement",value:function(e){var t=this;if(this.element&&this.destroy(),this.element=e,e){var n=this.options,r=n.Manager;for(var i in this.manager=new r(e,{touchAction:n.touchAction,recognizers:n.recognizers||_t}).on("hammer.input",this._onBasicInput),n.recognizers||Object.keys(xt).forEach(function(e){var n=t.manager.get(e);n&&xt[e].forEach(function(e){n.recognizeWith(e)})}),n.recognizerOptions){var o=this.manager.get(i);if(o){var a=n.recognizerOptions[i];delete a.enable,o.set(a)}}this.wheelInput=new It(e,this._onOtherEvent,{enable:!1}),this.moveInput=new Dt(e,this._onOtherEvent,{enable:!1}),this.keyInput=new Lt(e,this._onOtherEvent,{enable:!1,tabIndex:n.tabIndex}),this.contextmenuInput=new Nt(e,this._onOtherEvent,{enable:!1});var s=!0,l=!1,u=void 0;try{for(var c,p=this.events[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var f=lt(c.value,2),d=f[0],h=f[1];h.isEmpty()||(this._toggleRecognizer(h.recognizerName,!0),this.manager.on(d,h.handleEvent))}}catch(m){l=!0,u=m}finally{try{s||null==p.return||p.return()}finally{if(l)throw u}}}}},{key:"destroy",value:function(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}},{key:"on",value:function(e,t,n){this._addEventHandler(e,t,n,!1)}},{key:"once",value:function(e,t,n){this._addEventHandler(e,t,n,!0)}},{key:"watch",value:function(e,t,n){this._addEventHandler(e,t,n,!1,!0)}},{key:"off",value:function(e,t){this._removeEventHandler(e,t)}},{key:"_toggleRecognizer",value:function(e,t){var n=this.manager;if(n){var r=n.get(e);if(r&&r.options.enable!==t){r.set({enable:t});var i=wt[e];i&&!this.options.recognizers&&i.forEach(function(i){var o=n.get(i);t?(o.requireFailure(e),r.dropRequireFailure(i)):o.dropRequireFailure(e)})}this.wheelInput.enableEventType(e,t),this.moveInput.enableEventType(e,t),this.keyInput.enableEventType(e,t),this.contextmenuInput.enableEventType(e,t)}}},{key:"_addEventHandler",value:function(e,t,n,r,i){if("string"===typeof e){var o=this.manager,a=this.events,s=Ct[e]||e,l=a.get(s);l||(l=new Qt(this),a.set(s,l),l.recognizerName=Tt[s]||s,o&&o.on(s,l.handleEvent)),l.add(e,t,n,r,i),l.isEmpty()||this._toggleRecognizer(l.recognizerName,!0)}else for(var u in n=t,e)this._addEventHandler(u,e[u],n,r,i)}},{key:"_removeEventHandler",value:function(e,t){if("string"===typeof e){var n=this.events,r=Ct[e]||e,i=n.get(r);if(i&&(i.remove(e,t),i.isEmpty())){var o=i.recognizerName,a=!1,s=!0,l=!1,u=void 0;try{for(var c,p=n.values()[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var f=c.value;if(f.recognizerName===o&&!f.isEmpty()){a=!0;break}}}catch(h){l=!0,u=h}finally{try{s||null==p.return||p.return()}finally{if(l)throw u}}a||this._toggleRecognizer(o,!1)}}else for(var d in e)this._removeEventHandler(d,e[d])}},{key:"_onBasicInput",value:function(e){var t=e.srcEvent,n=St[t.type];n&&this.manager.emit(n,e)}},{key:"_onOtherEvent",value:function(e){this.manager.emit(e.type,e)}}]),e}();var nn={transitionDuration:0},rn={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new Ue,transitionInterruption:nt},on=["wheel"],an=["panstart","panmove","panend"],sn=["pinchstart","pinchmove","pinchend","pinchcancel"],ln=["doubletap"],un=["keydown"],cn=function(){function e(){var t=this;Object(i.a)(this,e),Object(f.a)(this,"events",[]),Object(f.a)(this,"mapState",void 0),Object(f.a)(this,"onViewportChange",void 0),Object(f.a)(this,"onStateChange",void 0),Object(f.a)(this,"mapStateProps",void 0),Object(f.a)(this,"eventManager",void 0),Object(f.a)(this,"scrollZoom",!0),Object(f.a)(this,"dragPan",!0),Object(f.a)(this,"dragRotate",!0),Object(f.a)(this,"doubleClickZoom",!0),Object(f.a)(this,"touchZoom",!0),Object(f.a)(this,"touchRotate",!1),Object(f.a)(this,"keyboard",!0),Object(f.a)(this,"_state",{isDragging:!1}),Object(f.a)(this,"_events",{}),Object(f.a)(this,"_transitionManager",new st),Object(f.a)(this,"setState",function(e){Object.assign(t._state,e),t.onStateChange&&t.onStateChange(t._state)}),this.handleEvent=this.handleEvent.bind(this),this._onWheelEnd=function(e,t){var n,r,i,o=function(){return i=null,e.apply(n,r)};return function(){n=this,r=arguments,i&&clearTimeout(i),i=setTimeout(o,t)}}(this._onWheelEnd,100)}return Object(a.a)(e,[{key:"handleEvent",value:function(e){switch(this.mapState=this.getMapState(),e.type){case"panstart":return this._onPanStart(e);case"panmove":return this._onPan(e);case"panend":return this._onPanEnd(e);case"pinchstart":return this._onPinchStart(e);case"pinchmove":return this._onPinch(e);case"pinchcancel":case"pinchend":return this._onPinchEnd(e);case"doubletap":return this._onDoubleTap(e);case"wheel":return this._onWheel(e);case"keydown":return this._onKeyDown(e);default:return!1}}},{key:"getCenter",value:function(e){var t=e.offsetCenter;return[t.x,t.y]}},{key:"isFunctionKeyPressed",value:function(e){var t=e.srcEvent;return Boolean(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}},{key:"updateViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.mapState?this.mapState.getViewportProps():{},i=Object.assign({},e.getViewportProps(),t);Object.keys(i).some(function(e){return r[e]!==i[e]})&&this.onViewportChange(i,n,r),this.setState(Object.assign({},e.getInteractiveState(),n))}},{key:"getMapState",value:function(e){return new qe(Object.assign({},this.mapStateProps,this._state,e))}},{key:"setOptions",value:function(e){var t=e.onViewportChange,n=e.onStateChange,r=e.eventManager,i=void 0===r?this.eventManager:r,o=e.isInteractive,a=void 0===o||o,s=e.scrollZoom,l=void 0===s?this.scrollZoom:s,u=e.dragPan,c=void 0===u?this.dragPan:u,p=e.dragRotate,f=void 0===p?this.dragRotate:p,d=e.doubleClickZoom,h=void 0===d?this.doubleClickZoom:d,m=e.touchZoom,v=void 0===m?this.touchZoom:m,g=e.touchRotate,y=void 0===g?this.touchRotate:g,b=e.keyboard,_=void 0===b?this.keyboard:b;this.onViewportChange=t,this.onStateChange=n;var x=!this.mapStateProps||this.mapStateProps.height!==e.height;this.mapStateProps=e,x&&this.updateViewport(new qe(e)),this._transitionManager.processViewportChange(Object.assign({},e,{onStateChange:this.setState})),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(on,a&&l),this.toggleEvents(an,a&&(c||f)),this.toggleEvents(sn,a&&(v||y)),this.toggleEvents(ln,a&&h),this.toggleEvents(un,a&&_),this.scrollZoom=l,this.dragPan=c,this.dragRotate=f,this.doubleClickZoom=h,this.touchZoom=v,this.touchRotate=y,this.keyboard=_}},{key:"toggleEvents",value:function(e,t){var n=this;this.eventManager&&e.forEach(function(e){n._events[e]!==t&&(n._events[e]=t,t?n.eventManager.on(e,n.handleEvent):n.eventManager.off(e,n.handleEvent))})}},{key:"_onPanStart",value:function(e){var t=this.getCenter(e),n=this.mapState.panStart({pos:t}).rotateStart({pos:t});return this.updateViewport(n,nn,{isDragging:!0}),!0}},{key:"_onPan",value:function(e){return this.isFunctionKeyPressed(e)||e.rightButton?this._onPanRotate(e):this._onPanMove(e)}},{key:"_onPanEnd",value:function(e){var t=this.mapState.panEnd().rotateEnd();return this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isRotating:!1}),!0}},{key:"_onPanMove",value:function(e){if(!this.dragPan)return!1;var t=this.getCenter(e),n=this.mapState.pan({pos:t});return this.updateViewport(n,nn,{isPanning:!0}),!0}},{key:"_onPanRotate",value:function(e){if(!this.dragRotate)return!1;var t=e.deltaX,n=e.deltaY,r=ve(this.getCenter(e),2)[1],i=r-n,o=this.mapState.getViewportProps(),a=o.width,s=o.height,l=t/a,u=0;n>0?Math.abs(s-i)>5&&(u=n/(i-s)*1.2):n<0&&i>5&&(u=1-r/i),u=Math.min(1,Math.max(-1,u));var c=this.mapState.rotate({deltaScaleX:l,deltaScaleY:u});return this.updateViewport(c,nn,{isRotating:!0}),!0}},{key:"_onWheel",value:function(e){if(!this.scrollZoom)return!1;e.preventDefault();var t=this.getCenter(e),n=e.delta,r=2/(1+Math.exp(-Math.abs(.01*n)));n<0&&0!==r&&(r=1/r);var i=this.mapState.zoom({pos:t,scale:r});return this.updateViewport(i,nn,{isZooming:!0}),this._onWheelEnd(),!0}},{key:"_onWheelEnd",value:function(){this.setState({isZooming:!1})}},{key:"_onPinchStart",value:function(e){var t=this.getCenter(e),n=this.mapState.zoomStart({pos:t}).rotateStart({pos:t});return this._state.startPinchRotation=e.rotation,this.updateViewport(n,nn,{isDragging:!0}),!0}},{key:"_onPinch",value:function(e){if(!this.touchZoom&&!this.touchRotate)return!1;var t=this.mapState;if(this.touchZoom){var n=e.scale,r=this.getCenter(e);t=t.zoom({pos:r,scale:n})}if(this.touchRotate){var i=e.rotation,o=this._state.startPinchRotation;t=t.rotate({deltaScaleX:-(i-o)/180})}return this.updateViewport(t,nn,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),!0}},{key:"_onPinchEnd",value:function(e){var t=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(e){if(!this.doubleClickZoom)return!1;var t=this.getCenter(e),n=this.isFunctionKeyPressed(e),r=this.mapState.zoom({pos:t,scale:n?.5:2});return this.updateViewport(r,Object.assign({},rn,{transitionInterpolator:new Ue({around:t})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(e){if(!this.keyboard)return!1;var t,n=this.isFunctionKeyPressed(e),r=this.mapStateProps;switch(e.srcEvent.keyCode){case 189:t=n?this.getMapState({zoom:r.zoom-2}):this.getMapState({zoom:r.zoom-1});break;case 187:t=n?this.getMapState({zoom:r.zoom+2}):this.getMapState({zoom:r.zoom+1});break;case 37:t=n?this.getMapState({bearing:r.bearing-15}):this.mapState.pan({pos:[100,0],startPos:[0,0]});break;case 39:t=n?this.getMapState({bearing:r.bearing+15}):this.mapState.pan({pos:[-100,0],startPos:[0,0]});break;case 38:t=n?this.getMapState({pitch:r.pitch+10}):this.mapState.pan({pos:[0,100],startPos:[0,0]});break;case 40:t=n?this.getMapState({pitch:r.pitch-10}):this.mapState.pan({pos:[0,-100],startPos:[0,0]});break;default:return!1}return this.updateViewport(t,rn)}}]),e}(),pn=[{old:"onChangeViewport",new:"onViewportChange"},{old:"perspectiveEnabled",new:"dragRotate"},{old:"onHoverFeatures",new:"onHover"},{old:"onClickFeatures",new:"onClick"},{old:"touchZoomRotate",new:"touchZoom, touchRotate"},{old:"mapControls",new:"controller"}];function fn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};pn.forEach(function(t){if(e.hasOwnProperty(t.old)){var n=(r=t.old,"react-map-gl: `".concat(r,"` is removed."));t.new&&(n="".concat(n," ").concat(function(e){return"Use `".concat(e,"` instead.")}(t.new))),console.warn(n)}var r})}function dn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var hn=Object.assign({},et.propTypes,{maxZoom:m.a.number,minZoom:m.a.number,maxPitch:m.a.number,minPitch:m.a.number,onViewStateChange:m.a.func,onViewportChange:m.a.func,onInteractionStateChange:m.a.func,transitionDuration:m.a.oneOfType([m.a.number,m.a.string]),transitionInterpolator:m.a.object,transitionInterruption:m.a.number,transitionEasing:m.a.func,onTransitionStart:m.a.func,onTransitionInterrupt:m.a.func,onTransitionEnd:m.a.func,scrollZoom:m.a.bool,dragPan:m.a.bool,dragRotate:m.a.bool,doubleClickZoom:m.a.bool,touchZoom:m.a.bool,touchRotate:m.a.bool,keyboard:m.a.bool,onHover:m.a.func,onClick:m.a.func,onDblClick:m.a.func,onContextMenu:m.a.func,onMouseDown:m.a.func,onMouseMove:m.a.func,onMouseUp:m.a.func,onTouchStart:m.a.func,onTouchMove:m.a.func,onTouchEnd:m.a.func,onMouseEnter:m.a.func,onMouseLeave:m.a.func,onMouseOut:m.a.func,onWheel:m.a.func,touchAction:m.a.string,clickRadius:m.a.number,interactiveLayerIds:m.a.array,getCursor:m.a.func,controller:m.a.instanceOf(cn)}),mn=Object.assign({},et.defaultProps,Ve,st.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(e){return e.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",clickRadius:0,getCursor:function(e){var t=e.isDragging,n=e.isHovering;return t?"grabbing":n?"pointer":"grab"}}),vn=function(e){l(n,d["PureComponent"]);var t=dn(n);function n(e){var r;return Object(i.a)(this,n),r=t.call(this,e),Object(f.a)(o(r),"state",{isLoaded:!1,isDragging:!1,isHovering:!1}),Object(f.a)(o(r),"_controller",void 0),Object(f.a)(o(r),"_eventManager",void 0),Object(f.a)(o(r),"_interactiveContext",void 0),Object(f.a)(o(r),"_width",0),Object(f.a)(o(r),"_height",0),Object(f.a)(o(r),"_eventCanvasRef",Object(d.createRef)()),Object(f.a)(o(r),"_staticMapRef",Object(d.createRef)()),Object(f.a)(o(r),"getMap",function(){return r._staticMapRef.current?r._staticMapRef.current.getMap():null}),Object(f.a)(o(r),"queryRenderedFeatures",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.getMap();return n&&n.queryRenderedFeatures(e,t)}),Object(f.a)(o(r),"_onInteractionStateChange",function(e){var t=e.isDragging,n=void 0!==t&&t;n!==r.state.isDragging&&(r._updateInteractiveContext({isDragging:n}),r.setState({isDragging:n}));var i=r.props.onInteractionStateChange;i&&i(e)}),Object(f.a)(o(r),"_onResize",function(e){var t=e.width,n=e.height;r._width=t,r._height=n,r._setControllerProps(r.props),r.props.onResize({width:t,height:n})}),Object(f.a)(o(r),"_onViewportChange",function(e,t,n){var i=r.props,o=i.onViewStateChange,a=i.onViewportChange;o&&o({viewState:e,interactionState:t,oldViewState:n}),a&&a(e,t,n)}),Object(f.a)(o(r),"_onLoad",function(e){r.setState({isLoaded:!0}),r.props.onLoad(e)}),Object(f.a)(o(r),"_onEvent",function(e,t){var n=r.props[e];n&&n(r._normalizeEvent(t))}),Object(f.a)(o(r),"_onPointerDown",function(e){switch(e.pointerType){case"touch":r._onEvent("onTouchStart",e);break;default:r._onEvent("onMouseDown",e)}}),Object(f.a)(o(r),"_onPointerUp",function(e){switch(e.pointerType){case"touch":r._onEvent("onTouchEnd",e);break;default:r._onEvent("onMouseUp",e)}}),Object(f.a)(o(r),"_onPointerMove",function(e){switch(e.pointerType){case"touch":r._onEvent("onTouchMove",e);break;default:r._onEvent("onMouseMove",e)}if(!r.state.isDragging){var t,n=r.props,i=n.onHover,o=n.interactiveLayerIds;e=r._normalizeEvent(e),r.state.isLoaded&&(o||i)&&(t=r._getFeatures({pos:e.point,radius:r.props.clickRadius})),i&&(e.features=t,i(e));var a=Boolean(o&&t&&t.length>0),s=a&&!r.state.isHovering,l=!a&&r.state.isHovering;s&&r._onEvent("onMouseEnter",e),l&&r._onEvent("onMouseLeave",e),(s||l)&&r.setState({isHovering:a})}}),Object(f.a)(o(r),"_onClick",function(e){var t=r.props,n=t.onClick,i=t.onNativeClick,o=t.onDblClick,a=t.doubleClickZoom,s=[],l=o||a;switch(e.type){case"anyclick":s.push(i),l||s.push(n);break;case"click":l&&s.push(n)}(s=s.filter(Boolean)).length&&((e=r._normalizeEvent(e)).features=r._getFeatures({pos:e.point,radius:r.props.clickRadius}),s.forEach(function(t){return t(e)}))}),fn(e),r._controller=e.controller||new cn,r._eventManager=new tn(null,{touchAction:e.touchAction}),r._updateInteractiveContext({isDragging:!1,eventManager:r._eventManager}),r}return Object(a.a)(n,null,[{key:"supported",value:function(){return et.supported()}}]),Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this._eventManager,t=this._eventCanvasRef.current;e.setElement(t),e.on({pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerup:this._onPointerUp,pointerleave:this._onEvent.bind(this,"onMouseOut"),click:this._onClick,anyclick:this._onClick,dblclick:this._onEvent.bind(this,"onDblClick"),wheel:this._onEvent.bind(this,"onWheel"),contextmenu:this._onEvent.bind(this,"onContextMenu")}),this._setControllerProps(this.props),this._updateInteractiveContext({mapContainer:t})}},{key:"componentDidUpdate",value:function(){this._setControllerProps(this.props)}},{key:"componentWillUnmount",value:function(){this._eventManager.destroy()}},{key:"_setControllerProps",value:function(e){e=Object.assign({},e,e.viewState,{isInteractive:Boolean(e.onViewStateChange||e.onViewportChange),onViewportChange:this._onViewportChange,onStateChange:this._onInteractionStateChange,eventManager:this._eventManager,width:this._width,height:this._height}),this._controller.setOptions(e);var t=this._interactiveContext;t.onViewportChange=e.onViewportChange,t.onViewStateChange=e.onViewStateChange}},{key:"_getFeatures",value:function(e){var t,n=e.pos,r=e.radius,i={},o=this.getMap();if(this.props.interactiveLayerIds&&(i.layers=this.props.interactiveLayerIds),r){var a=r,s=[[n[0]-a,n[1]+a],[n[0]+a,n[1]-a]];t=o&&o.queryRenderedFeatures(s,i)}else t=o&&o.queryRenderedFeatures(n,i);return t}},{key:"_updateInteractiveContext",value:function(e){this._interactiveContext=Object.assign({},this._interactiveContext,e)}},{key:"_normalizeEvent",value:function(e){if(e.lngLat)return e;var t=e.offsetCenter,n=[t.x,t.y],r=new oe(Object.assign({},this.props,{width:this._width,height:this._height}));return e.point=n,e.lngLat=r.unproject(n),e}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,i=e.style,o=e.getCursor,a=Object.assign({position:"relative"},i,{width:t,height:n,cursor:o(this.state)});return d.createElement(Ge.Provider,{value:this._interactiveContext},d.createElement("div",{key:"event-canvas",ref:this._eventCanvasRef,style:a},d.createElement(et,r({},this.props,{width:"100%",height:"100%",style:null,onResize:this._onResize,onLoad:this._onLoad,ref:this._staticMapRef}),this.props.children)))}}]),n}();function gn(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n prop: ".concat(s)):c.setCoordinates(i.coordinates)):r._createSource(i)}}),r.id=e.id||"jsx-source-".concat(_n++),r.type=e.type,r}return Object(a.a)(n,[{key:"componentWillUnmount",value:function(){var e=this,t=this._map;t&&(t.off("styledata",this._updateSource),requestAnimationFrame(function(){t.style&&t.style._loaded&&t.removeSource(e.id)}))}},{key:"getSource",value:function(){var e=this._map;return e&&e.style&&e.getSource(this.id)}},{key:"_createSource",value:function(e){var t=this._map;t.style&&t.style._loaded&&t.addSource(this.id,e)}},{key:"_render",value:function(e){var t=this;return!this._map&&e.map&&(this._map=e.map,this._map.on("styledata",this._updateSource)),this._updateSource(),d.Children.map(this.props.children,function(e){return Object(d.cloneElement)(e,{source:t.id})})}},{key:"render",value:function(){return d.createElement(Ge.Consumer,null,this._render.bind(this))}}]),n}();function wn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(f.a)(xn,"propTypes",bn);var En={type:m.a.string.isRequired,id:m.a.string,source:m.a.string,beforeId:m.a.string};var kn=0,On=function(e){l(n,d["PureComponent"]);var t=Sn(n);function n(e){var r;return Object(i.a)(this,n),r=t.call(this,e),Object(f.a)(o(r),"id",void 0),Object(f.a)(o(r),"type",void 0),Object(f.a)(o(r),"_map",null),Object(f.a)(o(r),"_layerOptions",{}),Object(f.a)(o(r),"_updateLayer",function(){var e=r._map;if(e){var t=o(r),n=t.props,i=t._layerOptions;if(we(!n.id||n.id===r.id,"layer id changed"),we(n.type===r.type,"layer type changed"),r.getLayer())try{!function(e,t,n,r){var i=n.layout,o=void 0===i?{}:i,a=n.paint,s=void 0===a?{}:a,l=n.filter,u=n.minzoom,c=n.maxzoom,p=n.beforeId,f=wn(n,["layout","paint","filter","minzoom","maxzoom","beforeId"]);if(p!==r.beforeId&&e.moveLayer(t,p),o!==r.layout)for(var d in o)gn(o[d],r.layout[d])||e.setLayoutProperty(t,d,o[d]);if(s!==r.paint)for(var h in s)gn(s[h],r.paint[h])||e.setPaintProperty(t,h,s[h]);for(var m in gn(l,r.filter)||e.setFilter(t,l),u===r.minzoom&&c===r.maxzoom||e.setLayerZoomRange(t,u,c),f)gn(f[m],r[m])||e.setLayerProperty(t,m,f[m])}(e,r.id,n,i),Object.assign(i,n)}catch(a){console.warn(a)}else r._createLayer()}}),r.id=e.id||"jsx-layer-".concat(kn++),r.type=e.type,r}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this._updateLayer()}},{key:"componentDidUpdate",value:function(){this._updateLayer()}},{key:"componentWillUnmount",value:function(){var e=this._map;e&&(e.off("styledata",this._updateLayer),e.style&&e.style._loaded&&e.removeLayer(this.id))}},{key:"getLayer",value:function(){var e=this._map;return e&&e.style&&e.getLayer(this.id)}},{key:"_createLayer",value:function(){var e=this._map;if(e.style&&e.style._loaded){var t=Object.assign({},this.props);t.id=this.id,delete t.beforeId,e.addLayer(t,this.props.beforeId),this._layerOptions=t}}},{key:"_render",value:function(e){return!this._map&&e.map&&(this._map=e.map,this._map.on("styledata",this._updateLayer)),null}},{key:"render",value:function(){return d.createElement(Ge.Consumer,null,this._render.bind(this))}}]),n}();function Tn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(f.a)(On,"propTypes",En);var Cn={captureScroll:m.a.bool,captureDrag:m.a.bool,captureClick:m.a.bool,captureDoubleClick:m.a.bool},Pn=function(e){l(n,d["PureComponent"]);var t=Tn(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s2&&void 0!==arguments[2]?arguments[2]:"x";if(null===e)return t;var r="x"===n?e.offsetWidth:e.offsetHeight;return Ln(t/100*r)/r*100};function zn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var Bn=Object.assign({},Dn.propTypes,{className:m.a.string,longitude:m.a.number.isRequired,latitude:m.a.number.isRequired}),Fn=Object.assign({},Dn.defaultProps,{className:""}),Un=function(e){l(n,Dn);var t=zn(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s=.5;)f-=.5,d+=.5*a;else if(h>i-u)for(;h>i-u&&f<=.5;)f+=.5,h-=.5*a;var m=t-p*o,v=m+o,g=.5;if(.5===f&&(p=Math.floor(p),g=1),m=g;)p-=g,m+=g*o;else if(v>r-u)for(;v>r-u&&p<=1-g;)p+=g,v-=g*o;return Hn.find(function(e){var t=Vn[e];return t.x===p&&t.y===f})||s}({x:e,y:t,anchor:i,padding:a,width:n.width,height:n.height,selfWidth:s.clientWidth,selfHeight:s.clientHeight}):i}},{key:"_getContainerStyle",value:function(e,t,n,r){var i=this._context.viewport,o=this.props,a=o.offsetLeft,s=o.offsetTop,l=o.sortByDepth,u=Vn[r],c=e+a,p=t+s,f=this._containerRef.current,d=Nn(f,100*-u.x),h=Nn(f,100*-u.y,"y"),m={position:"absolute",transform:"\n translate(".concat(d,"%, ").concat(h,"%)\n translate(").concat(Ln(c),"px, ").concat(Ln(p),"px)\n "),display:void 0,zIndex:void 0};return l?(n>1||n<-1||e<0||e>i.width||t<0||t>i.height?m.display="none":m.zIndex=Math.floor((1-n)/2*1e5),m):m}},{key:"_renderTip",value:function(e){var t=this.props.tipSize;return d.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:t}})}},{key:"_renderContent",value:function(){var e=this.props,t=e.closeButton,n=e.children,r=this._context.eventManager?null:this._onClick;return d.createElement("div",{key:"content",ref:this._contentRef,className:"mapboxgl-popup-content",onClick:r},t&&d.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button"},"\xd7"),n)}},{key:"_render",value:function(){var e=this.props,t=e.className,n=e.longitude,r=e.latitude,i=e.altitude,o=ve(this._context.viewport.project([n,r,i]),3),a=o[0],s=o[1],l=o[2],u=this._getPosition(a,s),c=this._getContainerStyle(a,s,l,u);return d.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(u," ").concat(t),style:c,ref:this._containerRef},this._renderTip(u),this._renderContent())}}]),n}();Object(f.a)(Kn,"propTypes",Gn),Object(f.a)(Kn,"defaultProps",Wn);var Zn=n(56);function Yn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}var Xn,Jn=Object.assign({},Pn.propTypes,{className:m.a.string,container:m.a.object}),$n=Object.assign({},Pn.defaultProps,{className:"",container:null}),Qn=function(e){l(n,Pn);var t=Yn(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;sa)return 1}return 0}(e,"1.6.0")>=0?pr:cr}var dr=function(e){l(n,Pn);var t=ar(n);function n(e){var r;return Object(i.a)(this,n),r=t.call(this,e),Object(f.a)(o(r),"_uiVersion",void 0),Object(f.a)(o(r),"_onZoomIn",function(){r._updateViewport({zoom:r._context.viewport.zoom+1})}),Object(f.a)(o(r),"_onZoomOut",function(){r._updateViewport({zoom:r._context.viewport.zoom-1})}),Object(f.a)(o(r),"_onResetNorth",function(){r._updateViewport({bearing:0,pitch:0})}),fn(e),r}return Object(a.a)(n,[{key:"_updateViewport",value:function(e){var t=this._context.viewport,n=new qe(Object.assign({},t,e)),r=Object.assign({},n.getViewportProps(),rn),i=this.props.onViewportChange||this._context.onViewportChange||sr;(this.props.onViewStateChange||this._context.onViewStateChange||sr)({viewState:r}),i(r)}},{key:"_renderCompass",value:function(){var e=this._context.viewport.bearing,t={transform:"rotate(".concat(-e,"deg)")};return this._uiVersion===pr?d.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:t}):d.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:t})}},{key:"_renderButton",value:function(e,t,n,r){return d.createElement("button",{key:e,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(e),type:"button",title:t,onClick:n},r||d.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}},{key:"_render",value:function(){var e=this.props,t=e.className,n=e.showCompass,r=e.showZoom,i=e.zoomInLabel,o=e.zoomOutLabel,a=e.compassLabel;if(!this._uiVersion){var s=this._context.map;this._uiVersion=s?fr(s.version):pr}return d.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group ".concat(t),ref:this._containerRef},r&&this._renderButton("zoom-in",i,this._onZoomIn),r&&this._renderButton("zoom-out",o,this._onZoomOut),n&&this._renderButton("compass",a,this._onResetNorth,this._renderCompass()))}}]),n}();function hr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}Object(f.a)(dr,"propTypes",lr),Object(f.a)(dr,"defaultProps",ur);var mr=Object.assign({},Pn.propTypes,{maxWidth:m.a.number,unit:m.a.oneOf(["imperial","metric","nautical"])}),vr=Object.assign({},Pn.defaultProps,{maxWidth:100,unit:"metric"}),gr=function(e){l(n,Pn);var t=hr(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s1)for(var n=1;n1)return t.map(function(t){return e(t)});var r=t[0];if("string"!==typeof r.blotName&&"string"!==typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");u[r.blotName||r.attrName]=r,"string"===typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(s[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(e){return e.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(e){null!=l[e]&&null!=r.className||(l[e]=r)})));return r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"===typeof n){if("number"===typeof e.delete&&"number"===typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"===typeof n.delete&&null!=e.insert&&(t-=1,"object"!==typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"===typeof e.insert&&"string"===typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"===typeof e.retain&&"number"===typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+a.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!==typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i0&&n.next(o.retain-s)}for(var u=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),p=t.next(c),f=n.next(c);if("number"===typeof f.retain){var d={};"number"===typeof p.retain?d.retain=c:d.insert=p.insert;var h=a.attributes.compose(p.attributes,f.attributes,"number"===typeof p.retain);if(h&&(d.attributes=h),u.push(d),!n.hasNext()&&i(u.ops[u.ops.length-1],d)){var m=new l(t.rest());return u.concat(m).chop()}}else"number"===typeof f.delete&&"number"===typeof p.retain&&u.push(f)}return u.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:s;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),o=new l,u=r(n[0],n[1],t),c=a.iterator(this.ops),p=a.iterator(e.ops);return u.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(p.peekLength(),t),o.push(p.next(n));break;case r.DELETE:n=Math.min(t,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),p.peekLength(),t);var s=c.next(n),l=p.next(n);i(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}t-=n}}),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"===typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"===typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),u=r.next(o);if(s.delete)continue;u.delete?i.push(u):i.retain(o,a.attributes.transform(s.attributes,u.attributes,t))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r0&&(e1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}();function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"===typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:g(e.parent,t))}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[u.default,s.default.Embed,c.default],t.bubbleFormats=g,t.BlockEmbed=m,t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=_(t,r),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new f.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;x.call(n,function(){return n.editor.update(null,t,i)},e)});var o=this.clipboard.convert("
"+i+"


");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),h.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof e){var i=e.attrName||e.blotName;"string"===typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"===typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=w(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],x.call(this,function(){return r.editor.deleteText(e,t)},n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return x.call(this,function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(e,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,g({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,g({},e,t))}return n.setSelection(r,l.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(e,t,n,r,o){var a,s=this,l=w(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],a=u[2],o=u[3],x.call(this,function(){return s.editor.formatLine(e,t,a)},o,e,0)}},{key:"formatText",value:function(e,t,n,r,o){var a,s=this,l=w(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],a=u[2],o=u[3],x.call(this,function(){return s.editor.formatText(e,t,a)},o,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"===typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=w(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!==typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=w(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return x.call(this,function(){return i.editor.insertEmbed(t,n,r)},o,t)}},{key:"insertText",value:function(e,t,n,r,o){var a,s=this,l=w(e,0,n,r,o),u=i(l,4);return e=u[0],a=u[2],o=u[3],x.call(this,function(){return s.editor.insertText(e,t,a)},o,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=w(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],x.call(this,function(){return r.editor.removeFormat(e,t)},n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return x.call(this,function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"===typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=w(t,n,r),a=i(o,4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new p.Range(t,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return x.call(this,function(){return e=new a.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();function _(e,t){if((t=(0,d.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==b.DEFAULTS.theme){if(t.theme=b.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=m.default;var n=(0,d.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=b.import("modules/"+t);return null==n?y.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,d.default)(!0,{},b.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"===typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function x(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=S(i,s,t):0!==r&&(i=S(i,n,r,t)),this.setSelection(i,l.default.sources.SILENT)),s.length()>0){var u,c,p=[l.default.events.TEXT_CHANGE,s,o,t];if((u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(p)),t!==l.default.sources.SILENT)(c=this.emitter).emit.apply(c,p)}return s}function w(e,t,n,i,o){var a={};return"number"===typeof e.index&&"number"===typeof e.length?"number"!==typeof t?(o=i,i=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!==typeof t&&(o=i,i=n,n=t,t=0),"object"===("undefined"===typeof n?"undefined":r(n))?(a=n,o=i):"string"===typeof n&&(null!=i?a[n]=i:o=n),[e,t,a,o=o||l.default.sources.API]}function S(e,t,n,r){if(null==e)return null;var o=void 0,s=void 0;if(t instanceof a.default){var u=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==l.default.sources.USER)}),c=i(u,2);o=c[0],s=c[1]}else{var f=[e.index,e.index+e.length].map(function(e){return e=0?e+n:Math.max(t,e+n)}),d=i(f,2);o=d[0],s=d[1]}return new p.Range(o,s-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},t.expandConfig=_,t.overload=w,t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),a=1;a=0;u--)if(p[u]!=f[u])return!1;for(u=p.length-1;u>=0;u--)if(c=p[u],!a(e[c],t[c],n))return!1;return typeof e===typeof t}(e,t,n))};function s(e){return null===e||void 0===e}function l(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&("function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0]))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"===typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n=e+n)){var a=this.newlineIndex(e,!0)+1,l=o-a+1,u=this.isolate(a,l),c=u.next;u.format(r,i),c instanceof t&&c.formatAt(0,e-a+n-l,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=this.descendant(c.default,e),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=s.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof s.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}();v.blotName="code-block",v.tagName="PRE",v.TAB=" ",t.Code=m,t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n=o&&!d.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,d);var h=t.scroll.line(e),m=i(h,2),g=m[0],y=m[1],b=(0,v.default)({},(0,p.bubbleFormats)(g));if(g instanceof f.default){var _=g.descendant(l.default.Leaf,y),x=i(_,1)[0];b=(0,v.default)(b,(0,p.bubbleFormats)(x))}c=s.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var w=Object.keys(a.insert)[0];if(null==w)return e;t.scroll.insertAt(e,w,a.insert[w])}o+=u}return Object.keys(c).forEach(function(n){t.scroll.formatAt(e,u,n,c[n])}),e+u},0),e.reduce(function(e,n){return"number"===typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach(function(t){var o=t.length();if(t instanceof u.default){var s=e-t.offset(n.scroll),l=t.newlineIndex(s+a)-s+1;t.formatAt(s,l,i,r[i])}else t.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,h.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update((new a.default).retain(e).retain(t,(0,h.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=i(e,1)[0];t instanceof f.default?n.push(t):t instanceof l.default.Leaf&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(l.default.Leaf,e,t));var o=[n,r].map(function(e){if(0===e.length)return{};for(var t=(0,p.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=_((0,p.bubbleFormats)(n),t)}return t});return v.default.apply(v.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"===typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update((new a.default).retain(e).insert(t,(0,h.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===f.default.blotName&&(!(e.children.length>1)&&e.children.head instanceof d.default)}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),o=i(r,2),s=o[0],l=o[1],c=0,p=new a.default;null!=s&&(c=s instanceof u.default?s.newlineIndex(l)-l+1:s.length()-l,p=s.delta().slice(l,l+c-1).insert("\n"));var f=this.getContents(e,t+c).diff((new a.default).insert(n).concat(p)),d=(new a.default).retain(e).concat(f);return this.applyDelta(d)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(y)&&l.default.find(t[0].target)){var i=l.default.find(t[0].target),o=(0,p.bubbleFormats)(i),s=i.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),f=(new a.default).insert(u),d=(new a.default).insert(i.value());e=(new a.default).retain(s).concat(f.diff(d,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)},new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,m.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function _(e,t){return Object.keys(t).reduce(function(n,r){return null==e[r]?n:(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]],n)},{})}t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;p(this,e),this.index=t,this.length=n},h=function(){function e(t,n){var r=this;p(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new d(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&r.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(t){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}}),this.update(l.default.sources.SILENT)}return i(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(e,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var i=void 0,o=this.scroll.leaf(e),a=r(o,2),s=a[0],l=a[1];if(null==s)return null;var u=s.position(l,!0),c=r(u,2);i=c[0],l=c[1];var p=document.createRange();if(t>0){p.setStart(i,l);var f=this.scroll.leaf(e+t),d=r(f,2);if(s=d[0],l=d[1],null==s)return null;var h=s.position(l,!0),m=r(h,2);return i=m[0],l=m[1],p.setEnd(i,l),p.getBoundingClientRect()}var v="left",g=void 0;return i instanceof Text?(l0&&(v="right")),{bottom:g.top+g.height,height:g.height,left:g[v],right:g[v],top:g.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return f.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map(function(e){var n=r(e,2),i=n[0],a=n[1],s=o.default.find(i,!0),l=s.offset(t.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(i,a)}),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(i)));return new d(s,a-s)}},{key:"normalizeNative",value:function(e){if(!m(this.root,e.startContainer)||!e.collapsed&&!m(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach(function(e,n){e=Math.min(o-1,e);var a,s=t.scroll.leaf(e),l=r(s,2),u=l[0],c=l[1],p=u.position(c,0!==n),f=r(p,2);a=f[0],c=f[1],i.push(a,c)}),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(t.index,i)),a=r(o,1)[0],s=a;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,i));s=r(l,1)[0]}if(null!=a&&null!=s){var u=e.getBoundingClientRect();n.topu.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(f.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"===typeof t&&(n=t,t=!1),f.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],u=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var p,f=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];if((c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(f)),e!==l.default.sources.SILENT)(p=this.emitter).emit.apply(p,f)}}}]),e}();function m(e,t){try{t.parentNode}catch(n){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=d,t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!==typeof e&&(e={}),"object"!==typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce(function(e,t){return null!=r[t]&&(e[t]=r[t]),e},{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!==typeof e&&(e={}),"object"!==typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!==typeof e)return t;if("object"===typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"===typeof e.delete?e.delete:"number"===typeof e.retain?e.retain:"string"===typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"===typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"===typeof t.retain?i.retain=e:"string"===typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"===typeof this.ops[this.index].delete?"delete":"number"===typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=o},function(e,n){var r=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var n,r,i;try{n=Map}catch(l){n=function(){}}try{r=Set}catch(l){r=function(){}}try{i=Promise}catch(l){i=function(){}}function o(a,l,u,c,p){"object"===typeof l&&(u=l.depth,c=l.prototype,p=l.includeNonEnumerable,l=l.circular);var f=[],d=[],h="undefined"!=typeof t;return"undefined"==typeof l&&(l=!0),"undefined"==typeof u&&(u=1/0),function a(u,m){if(null===u)return null;if(0===m)return u;var v,g;if("object"!=typeof u)return u;if(e(u,n))v=new n;else if(e(u,r))v=new r;else if(e(u,i))v=new i(function(e,t){u.then(function(t){e(a(t,m-1))},function(e){t(a(e,m-1))})});else if(o.__isArray(u))v=[];else if(o.__isRegExp(u))v=new RegExp(u.source,s(u)),u.lastIndex&&(v.lastIndex=u.lastIndex);else if(o.__isDate(u))v=new Date(u.getTime());else{if(h&&t.isBuffer(u))return v=t.allocUnsafe?t.allocUnsafe(u.length):new t(u.length),u.copy(v),v;e(u,Error)?v=Object.create(u):"undefined"==typeof c?(g=Object.getPrototypeOf(u),v=Object.create(g)):(v=Object.create(c),g=c)}if(l){var y=f.indexOf(u);if(-1!=y)return d[y];f.push(u),d.push(v)}for(var b in e(u,n)&&u.forEach(function(e,t){var n=a(t,m-1),r=a(e,m-1);v.set(n,r)}),e(u,r)&&u.forEach(function(e){var t=a(e,m-1);v.add(t)}),u){var _;g&&(_=Object.getOwnPropertyDescriptor(g,b)),_&&null==_.set||(v[b]=a(u[b],m-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(u);for(b=0;b0){if(s instanceof l.BlockEmbed||d instanceof l.BlockEmbed)return void this.optimize();if(s instanceof p.default){var h=s.newlineIndex(s.length(),!0);if(h>-1&&(s=s.split(h+1))===d)return void this.optimize()}else if(d instanceof p.default){var m=d.newlineIndex(0);m>-1&&d.split(m+1)}var v=d.children.head instanceof c.default?null:d.children.head;s.moveChildren(d,v),s.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(h,e)}},{key:"lines",value:function(){return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,function(t,n,r){h(t)?i.push(t):t instanceof a.default.Container&&(i=i.concat(e(t,n,o))),o-=r}),i}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=s.default.sources.USER;"string"===typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,e)}}}]),t}();m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,f.default],t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=T(e);if(null==r||null==r.key)return g.warn("Attempted to add invalid keyboard binding",r);"function"===typeof t&&(t={handler:t}),"function"===typeof n&&(n={handler:n}),r=(0,l.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(e.bindings[o]||[]).filter(function(e){return t.match(n,e)});if(0!==a.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var u=e.quill.getLine(l.index),c=i(u,2),f=c[0],d=c[1],h=e.quill.getLeaf(l.index),m=i(h,2),v=m[0],g=m[1],y=0===l.length?[v,g]:e.quill.getLeaf(l.index+l.length),b=i(y,2),_=b[0],x=b[1],w=v instanceof p.default.Text?v.value().slice(0,g):"",S=_ instanceof p.default.Text?_.value().slice(x):"",E={collapsed:0===l.length,empty:0===l.length&&f.length()<=1,format:e.quill.getFormat(l),offset:d,prefix:w,suffix:S};a.some(function(t){if(null!=t.collapsed&&t.collapsed!==E.collapsed)return!1;if(null!=t.empty&&t.empty!==E.empty)return!1;if(null!=t.offset&&t.offset!==E.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==E.format[e]}))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=E.format[e]:!1===t.format[e]?null==E.format[e]:(0,s.default)(t.format[e],E.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(E.prefix))&&(!(null!=t.suffix&&!t.suffix.test(E.suffix))&&!0!==t.handler.call(e,l,E))})&&n.preventDefault()}}}})}}]),t}();function _(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return v(n={key:e,shiftKey:t,altKey:null},r,/^$/),v(n,"handler",function(n){var r=n.index;e===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof p.default.Embed)||(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index-1,f.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,f.default.sources.USER):this.quill.setSelection(n.index+n.length+1,f.default.sources.USER),!1)}),n}function x(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=i(n,1)[0],o={};if(0===t.offset){var a=this.quill.getLine(e.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var l=r.formats(),u=this.quill.getFormat(e.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var p=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-p,p,f.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-p,p,o,f.default.sources.USER),this.quill.focus()}}function w(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(e.index),s=i(a,1)[0];if(t.offset>=s.length()-1){var l=this.quill.getLine(e.index+1),u=i(l,1)[0];if(u){var p=s.formats(),d=this.quill.getFormat(e.index,1);r=c.default.attributes.diff(p,d)||{},o=u.length()}}this.quill.deleteText(e.index,n,f.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,f.default.sources.USER)}}function S(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,f.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,f.default.sources.USER),this.quill.setSelection(e.index,f.default.sources.SILENT),this.quill.focus()}function E(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return p.default.query(n,p.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],f.default.sources.USER))})}function k(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=p.default.query("code-block"),r=t.index,o=t.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),l=s[0],u=s[1];if(null!=l){var c=this.quill.getIndex(l),d=l.newlineIndex(u,!0)+1,h=l.newlineIndex(c+u+o),m=l.domNode.textContent.slice(d,h).split("\n");u=0,m.forEach(function(t,i){e?(l.insertAt(d+u,n.TAB),u+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(d+u,n.TAB.length),u-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),u+=t.length+1}),this.quill.update(f.default.sources.USER),this.quill.setSelection(r,o,f.default.sources.SILENT)}}}}function O(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],f.default.sources.USER)}}}function T(e){if("string"===typeof e||"number"===typeof e)return T({key:e});if("object"===("undefined"===typeof e?"undefined":r(e))&&(e=(0,a.default)(e,!1)),"string"===typeof e.key)if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[y]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:O("bold"),italic:O("italic"),underline:O("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",f.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",f.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",f.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,f.default.sources.USER)}},"indent code-block":k(!0),"outdent code-block":k(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,f.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,f.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,f.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,f.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(0,l.default)({},r.formats(),{list:"checked"}),s=(new u.default).retain(e.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=i(n,2),o=r[0],a=r[1],s=(new u.default).retain(e.index).insert("\n",t.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,f.default.sources.USER),this.quill.setSelection(e.index+1,f.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",f.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(c,f.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,f.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(new u.default).retain(e.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,f.default.sources.USER)}},"embed left":_(b.keys.LEFT,!1),"embed left shift":_(b.keys.LEFT,!0),"embed right":_(b.keys.RIGHT,!1),"embed right shift":_(b.keys.RIGHT,!0)}},t.default=b,t.SHORTKEY=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=l,t.sanitize=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"===typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"===typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=g(n(0)),i=g(n(5)),o=n(4),a=g(o),s=g(n(16)),l=g(n(25)),u=g(n(24)),c=g(n(35)),p=g(n(6)),f=g(n(22)),d=g(n(7)),h=g(n(55)),m=g(n(42)),v=g(n(23));function g(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":p.default,"blots/scroll":f.default,"blots/text":d.default,"modules/clipboard":h.default,"modules/history":m.default,"modules/keyboard":v.default}),r.default.register(a.default,s.default,u.default,p.default,f.default,d.default),t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"===typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"===typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"===typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"===typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);t.concat(n).concat(s).forEach(function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function i(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){i(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(i(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function i(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[i(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[i(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[i(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}();function u(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"===typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)}))}(e)&&(n-=1),n}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=l,t.getLastChangeIndex=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,a.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=function(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(t)return(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0";if(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/";return e}(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",a.default.sources.USER),this.quill.setSelection(r+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}();function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}t.BaseTooltip=S,t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(ea?n(r,e-a,Math.min(t,a+l-e)):n(r,0,Math.min(l,e+t-a)),a+=l}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),o=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,a),n.attach(),n}return r(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)t.push(a.pop());for(var s=function e(t,n){void 0===n&&(n=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[o.DATA_KEY].mutations&&(t.domNode[o.DATA_KEY].mutations=[]),n&&e(t.parent))},l=function e(t){null!=t.domNode[o.DATA_KEY]&&null!=t.domNode[o.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(e),t.optimize(n))},u=t,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(e){var t=o.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(s(o.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=o.find(e,!1);s(t,!1),t instanceof i.default&&t.children.forEach(function(e){s(e,!1)})})):"attributes"===e.type&&s(t.prev)),s(t))}),this.children.forEach(l),a=(u=[].slice.call(this.observer.takeRecords())).slice();a.length>0;)t.push(a.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=o.find(e.target,!0);return null==t?null:null==t.domNode[o.DATA_KEY].mutations?(t.domNode[o.DATA_KEY].mutations=[e],t):(t.domNode[o.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==r&&null!=e.domNode[o.DATA_KEY]&&e.update(e.domNode[o.DATA_KEY].mutations||[],n)}),null!=this.domNode[o.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1);var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach(function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),o.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||o.query(r,o.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=o.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var r=o.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=o.query(n,o.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=o.query(r,o.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=o.query(n,o.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),a=o.create(n,r);i.parent.insertBefore(a,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),o=n(1),a=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=o.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return"characterData"===e.type&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)===!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!==typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;ot.length?e:t,p=e.length>t.length?t:e,f=c.indexOf(p);if(-1!=f)return u=[[r,c.substring(0,f)],[i,p],[r,c.substring(f+p.length)]],e.length>t.length&&(u[0][0]=u[2][0]=n),u;if(1==p.length)return[[n,e],[r,t]];var d=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,i,o,a,p]:null}var o,a,u,c,p,f=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));if(!f&&!d)return null;o=d?f&&f[4].length>d[4].length?f:d:f;e.length>t.length?(a=o[0],u=o[1],c=o[2],p=o[3]):(c=o[0],p=o[1],a=o[2],u=o[3]);var h=o[4];return[a,u,c,p,h]}(e,t);if(d){var h=d[0],m=d[1],v=d[2],g=d[3],y=d[4],b=o(h,v),_=o(m,g);return b.concat([[i,y]],_)}return function(e,t){for(var i=e.length,o=t.length,s=Math.ceil((i+o)/2),l=s,u=2*s,c=new Array(u),p=new Array(u),f=0;fi)v+=2;else if(w>o)m+=2;else if(h){var S=l+d-_;if(S>=0&&S=E)return a(e,t,T,w)}}}for(var k=-b+g;k<=b-y;k+=2){for(var S=l+k,O=(E=k==-b||k!=b&&p[S-1]i)y+=2;else if(O>o)g+=2;else if(!h){var x=l+d-k;if(x>=0&&x=(E=i-E))return a(e,t,T,w)}}}}return[[n,e],[r,t]]}(e,t)}(e=e.substring(0,e.length-p),t=t.substring(0,t.length-p));return f&&h.unshift([i,f]),d&&h.push([i,d]),function e(t){t.push([i,""]);var o=0;var a=0;var u=0;var c="";var p="";var f;for(;o1?(0!==a&&0!==u&&(0!==(f=s(p,c))&&(o-a-u>0&&t[o-a-u-1][0]==i?t[o-a-u-1][1]+=p.substring(0,f):(t.splice(0,0,[i,p.substring(0,f)]),o++),p=p.substring(f),c=c.substring(f)),0!==(f=l(p,c))&&(t[o][1]=p.substring(p.length-f)+t[o][1],p=p.substring(0,p.length-f),c=c.substring(0,c.length-f))),0===a?t.splice(o-u,a+u,[r,p]):0===u?t.splice(o-a,a+u,[n,c]):t.splice(o-a-u,a+u,[n,c],[r,p]),o=o-a-u+(a?1:0)+(u?1:0)+1):0!==o&&t[o-1][0]==i?(t[o-1][1]+=t[o][1],t.splice(o,1)):o++,u=0,a=0,c="",p=""}""===t[t.length-1][1]&&t.pop();var d=!1;o=1;for(;o0&&o.splice(a+2,0,[l[0],u]),c(o,a,3)}return e}(h,u)),h=function(e){for(var t=!1,o=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},a=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},s=2;s0&&l.push(e[s]);return l}(h)}function a(e,t,n,r){var i=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),u=o(i,a),c=o(s,l);return u.concat(c)}function s(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n=0&&r>=t-1;r--)if(r+1=700)&&(n.bold=!0);Object.keys(n).length>0&&(t=T(t,n));parseFloat(r.textIndent||0)>0&&(t=(new s.default).insert("\t").concat(t));return t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!P(t,"\n"))return t;var r=-1,i=e.parentNode;for(;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new s.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",M.bind(M,"bold")],["i",M.bind(M,"italic")],["style",function(){return new s.default}]],E=[f.AlignAttribute,v.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),k=[f.AlignStyle,d.BackgroundStyle,m.ColorStyle,v.DirectionStyle,g.FontStyle,y.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),O=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],S.concat(r.options.matchers).forEach(function(e){var t=i(e,2),o=t[0],a=t[1];(n.matchVisual||a!==R)&&r.addMatcher(o,a)}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,p.default),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"===typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\<"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,_({},h.default.blotName,t[h.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],l=o[1],u=function e(t,n,r){return t.nodeType===t.TEXT_NODE?r.reduce(function(e,n){return n(t,e)},new s.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(i,o){var a=e(o,n,r);return o.nodeType===t.ELEMENT_NODE&&(a=n.reduce(function(e,t){return t(o,e)},a),a=(o[w]||[]).reduce(function(e,t){return t(o,e)},a)),i.concat(a)},new s.default):new s.default}(this.container,a,l);return P(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new s.default).retain(u.length()-1).delete(1))),x.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"===typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new s.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,u.default.sources.USER),t.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:t.push(s);break;default:[].forEach.call(e.container.querySelectorAll(a),function(e){e[w]=e[w]||[],e[w].push(s)})}}),[t,n]}}]),t}();function T(e,t,n){return"object"===("undefined"===typeof t?"undefined":r(t))?Object.keys(t).reduce(function(e,n){return T(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},_({},t,n),r.attributes))},new s.default)}function C(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};return e["__ql-computed-style"]||(e["__ql-computed-style"]=window.getComputedStyle(e))}function P(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length-1}function M(e,t,n){return T(n,e,!0)}function I(e,t){var n=l.default.Attributor.Attribute.keys(e),r=l.default.Attributor.Class.keys(e),i=l.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach(function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null==(n=E[t])||n.attrName!==t&&n.keyName!==t||(o[n.attrName]=n.value(e)||void 0),null==(n=k[t])||n.attrName!==t&&n.keyName!==t||(n=k[t],o[n.attrName]=n.value(e)||void 0))}),Object.keys(o).length>0&&(t=T(t,o)),t}function j(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new s.default).insert(r,n.formats(e)))}else"function"===typeof n.formats&&(t=T(t,n.blotName,n.formats(e)));return t}function D(e,t){return P(t,"\n")||(A(e)||t.length()>0&&e.nextSibling&&A(e.nextSibling))&&t.insert("\n"),t}function R(e,t){if(A(e)&&null!=e.nextElementSibling&&!P(t,"\n\n")){var n=e.offsetHeight+parseFloat(C(e).marginTop)+parseFloat(C(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function L(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!C(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&A(e.parentNode)||null!=e.previousSibling&&A(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&A(e.parentNode)||null!=e.nextSibling&&A(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}O.DEFAULTS={matchers:[],matchVisual:!0},t.default=O,t.matchAttributor=I,t.matchBlot=j,t.matchNewline=D,t.matchSpacing=R,t.matchText=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;nr.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.leftr.bottom){var a=i.bottom-i.top,s=e.bottom-e.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n','','',''].join(""),t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=R(n(29)),i=n(36),o=n(38),a=n(64),s=R(n(65)),l=R(n(66)),u=n(67),c=R(u),p=n(37),f=n(26),d=n(39),h=n(40),m=R(n(56)),v=R(n(68)),g=R(n(27)),y=R(n(69)),b=R(n(70)),_=R(n(71)),x=R(n(72)),w=R(n(73)),S=n(13),E=R(S),k=R(n(74)),O=R(n(75)),T=R(n(57)),C=R(n(41)),P=R(n(28)),A=R(n(59)),M=R(n(60)),I=R(n(61)),j=R(n(108)),D=R(n(62));function R(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":p.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":p.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":h.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":p.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":d.FontClass,"formats/size":h.SizeClass,"formats/blockquote":s.default,"formats/code-block":E.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":S.Code,"formats/italic":v.default,"formats/link":g.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":_.default,"formats/image":x.default,"formats/video":w.default,"formats/list/item":u.ListItem,"modules/formula":k.default,"modules/syntax":O.default,"modules/toolbar":T.default,"themes/bubble":j.default,"themes/snow":D.default,"ui/icons":C.default,"ui/picker":P.default,"ui/icon-picker":M.default,"ui/color-picker":A.default,"ui/tooltip":I.default},!0),t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof f)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}();d.blotName="list",d.scope=o.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[f],t.ListItem=f,t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(56),o=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),t}();a.blotName="italic",a.tagName=["EM","I"],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"===typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return u.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}();c.blotName="image",c.tagName="IMG",t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return u.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}();c.blotName="video",c.className="ql-video",c.tagName="IFRAME",t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}();f.className="ql-syntax";var d=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(e){function t(e,n){u(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!==typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(o.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){r.highlight(),i=null},r.options.interval)}),r.highlight(),r}return p(t,a.default),r(t,null,[{key:"register",value:function(){o.default.register(d,!0),o.default.register(f,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(o.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(f).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(o.default.sources.SILENT),null!=t&&this.quill.setSelection(t,o.default.sources.SILENT)}}}]),t}();h.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=f,t.CodeToken=d,t.default=h},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t){e.exports=' '},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function e(e,t){for(var n=0;n0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var s=o[o.length-1],l=r.quill.getIndex(s),c=Math.min(s.length()-1,t.index+t.length-l),p=r.quill.getBounds(new u.Range(l,c));r.position(p)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return h(t,s.BaseTooltip),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}();g.TEMPLATE=['','
','','',"
"].join(""),t.BubbleTooltip=g,t.default=v},function(e,t,n){e.exports=n(63)}]).default},e.exports=n()}).call(this,n(360).Buffer)},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["index"]);f(this,t);var i=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r));return i.index=n,i.inBounds=!0,i.tabbableChildren=[],i.setCurrent(!1),i.setVisible(!1),i.setTarget(),i.setOrigin(),setTimeout(function(){i.tabbableChildren=(0,a.default)(i.node),i.setTabbableChildren()}),i}return h(t,u.default),i(t,[{key:"setCurrent",value:function(e){this.isCurrent=e}},{key:"setVisible",value:function(e){this.isVisible=e,this.setTabbableChildren()}},{key:"setTabbableChildren",value:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:this.pager.trackPosition;this.origin=this.target-e}},{key:"getStyles",value:function(){var e=this.pager.options,t=e.axis,n=e.viewsToShow,i=e.infinite,o={};return"x"===t&&(o.display="inline-block",o.verticalAlign="top"),"auto"!==n&&(o["x"===t?"width":"height"]=100/this.pager.views.length+"%"),i&&!this.inBounds&&(o.position="relative",o["y"===t?"top":"left"]=this.getPosition()),r({},o,this.pager.animationBus.getStyles(this))}}]),t}(),b={viewsToShow:1,viewsToMove:1,align:0,contain:!1,axis:"x",autoSize:!1,animations:[],infinite:!1,instant:!1,swipe:!0,swipeThreshold:.5,flickTimeout:300,accessibility:!0},_=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this.hydrate=function(){t.frame.setSize(),t.track.setSize(),t.views.forEach(function(e){e.setSize(),e.setTarget()}),t.setPositionValue(),t.setViewStyles(),t.emit("hydrated")};var i=(0,o.default)();this.on=i.on,this.emit=i.emit,this.off=i.off,this.views=[],this.currentIndex=0,this.currentView=null,this.currentTween=0,this.trackPosition=0,this.isSwiping=!1,this.options=r({},b,n),this.animationBus=new s.default({animations:this.options.animations,origin:function(e){return e.origin}}),v&&(this.resizeObserver=new l.default(function(){t.hydrate()}))}return i(e,[{key:"setOptions",value:function(e){var t=this.options;this.options=r({},this.options,e),this.animationBus.animations=this.options.animations,t.viewsToShow!==this.options.viewsToShow&&this.emit("viewChange",this.getCurrentIndicies())}},{key:"addFrame",value:function(e){this.frame=new u.default({node:e,pager:this})}},{key:"addTrack",value:function(e){this.track=new g({node:e,pager:this})}},{key:"addView",value:function(e){var t=this.views.length,n=new y({node:e,index:t,pager:this});return this.views.push(n),this.currentView||this.setCurrentView({index:t,suppressEvent:!0}),v&&this.resizeObserver.observe(e),this.emit("viewAdded"),n}},{key:"removeView",value:function(e){this.views=this.views.filter(function(t){return e!==t}),v&&this.resizeObserver.disconnect(e.node),this.emit("viewRemoved")}},{key:"prev",value:function(){this.setCurrentView({direction:-1})}},{key:"next",value:function(){this.setCurrentView({direction:1})}},{key:"setCurrentView",value:function(e){var t=e.direction,n=void 0===t?0:t,r=e.index,i=void 0===r?this.currentIndex:r,o=e.suppressEvent,a=void 0!==o&&o,s=this.options,l=s.viewsToMove,u=s.infinite,p=i+n*l,f=this.currentIndex,d=u?p:(0,c.clamp)(p,0,this.views.length-1),h=this.getView(f),m=this.getView(d);this.currentIndex=d,this.currentView=m,h.setCurrent(!1),m.setCurrent(!0);var v=d,g=d+l-1;(0,c.range)(v,g,this.views.length);this.views.forEach(function(e,t){e.setVisible(t===d)}),this.setPositionValue(),a||this.emit("viewChange",this.getCurrentIndicies())}},{key:"setPositionValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentView?this.currentView.target:0;if(!this.isSwiping){var t=this.options,n=t.viewsToShow,r=t.autoSize,i=t.infinite,o=t.contain,a=this.getTrackSize();if(i&&(e-=(Math.floor(this.currentIndex/this.views.length)||0)*a),o){var s="auto"===n&&r||n<=1?0:this.getFrameSize({autoSize:!1});e=(0,c.clamp)(e,s-a,0)}}this.trackPosition=e}},{key:"setViewStyles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.options,n=t.infinite,r=t.align,i=(this.getFrameSize(),this.getTrackSize()),o=(0,c.modulo)(e,-i);this.views.reduce(function(t,a,s){var l=a.getSize(),u=t+l,c=t;return u+l*r0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoSize,n=void 0===t?this.options.autoSize:t,r=e.fullSize,i=void 0!==r&&r,o={width:0,height:0};if(this.views.length)if(n){var a=this.getCurrentIndicies();o=this.getMaxDimensions(a)}else this.frame&&(o={width:this.frame.getSize("width"),height:this.frame.getSize("height")});return i?o:o["x"===this.options.axis?"width":"height"]}},{key:"getTrackSize",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.views.length:this.views.length-1,t=0;return this.views.slice(0,e).forEach(function(e){t+=e.getSize()}),t}},{key:"getView",value:function(e){return this.views[(0,c.modulo)(e,this.views.length)]}},{key:"getStartCoords",value:function(e){var t=0;return this.views.slice(0,e).forEach(function(e){t-=e.getSize()}),t}},{key:"getAlignOffset",value:function(e){return(this.getFrameSize({autoSize:!1})-e.getSize())*this.options.align}},{key:"getPositionValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.trackPosition,t=this.options,n=t.infinite,r=(t.contain,{x:0,y:0});if(this.currentTween=e,n){var i=this.getTrackSize();e=(0,c.modulo)(e,-i)||0}return this.emit("scroll",{progress:e/this.getTrackSize(!1),position:e}),r[this.options.axis]=e,r}},{key:"resetViewIndex",value:function(){this.setCurrentView({index:(0,c.modulo)(this.currentIndex,this.views.length),suppressEvent:!0})}}]),e}();t.default=_,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};d=p({},d,{},e)}(e.options.react),function(e){f=e}(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.AnimatedView=t.View=t.Track=t.Frame=t.ViewPager=void 0;var r=u(n(308)),i=u(n(316)),o=u(n(326)),a=u(n(328)),s=u(n(329)),l=u(n(140));function u(e){return e&&e.__esModule?e:{default:e}}t.ViewPager=r.default,t.Frame=i.default,t.Track=o.default,t.View=a.default,t.AnimatedView=s.default,t.utils=l.default},function(e,t,n){var r;!function(i,o,a,s){"use strict";var l,u=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p="function",f=Math.round,d=Math.abs,h=Date.now;function m(e,t,n){return setTimeout(w(e,n),t)}function v(e,t,n){return!!Array.isArray(e)&&(g(e,n[t],n),!0)}function g(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==s)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),e.apply(this,arguments)}}l="function"!==typeof Object.assign?function(e){if(e===s||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function P(e){return e.trim().split(/\s+/g)}function A(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;rn[t]}):r.sort()),r}function j(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=ne(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,l=a?a.center:o.center,u=t.center=re(r);t.timeStamp=h(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=se(l,u),t.distance=ae(l,u),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==F&&o.eventType!==V||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=oe(t.deltaX,t.deltaY);var c=ie(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=d(c.x)>d(c.y)?c.x:c.y,t.scale=a?(p=a.pointers,f=r,ae(f[0],f[1],Q)/ae(p[0],p[1],Q)):1,t.rotation=a?function(e,t){return se(t[1],t[0],Q)+se(e[1],e[0],Q)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,o,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(t.eventType!=H&&(l>B||a.velocity===s)){var u=t.deltaX-a.deltaX,c=t.deltaY-a.deltaY,p=ie(l,u,c);r=p.x,i=p.y,n=d(p.x)>d(p.y)?p.x:p.y,o=oe(u,c),e.lastInterval=t}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=o}(n,t);var p,f;var m=e.element;T(t.srcEvent.target,m)&&(m=t.srcEvent.target);t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function ne(e){for(var t=[],n=0;n=d(t)?e<0?G:W:t<0?K:Z}function ae(e,t,n){n||(n=$);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function se(e,t,n){n||(n=$);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}ee.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&O(this.element,this.evEl,this.domHandler),this.evTarget&&O(this.target,this.evTarget,this.domHandler),this.evWin&&O(R(this.element),this.evWin,this.domHandler)}};var le={mousedown:F,mousemove:U,mouseup:V},ue="mousedown",ce="mousemove mouseup";function pe(){this.evEl=ue,this.evWin=ce,this.pressed=!1,ee.apply(this,arguments)}x(pe,ee,{handler:function(e){var t=le[e.type];t&F&&0===e.button&&(this.pressed=!0),t&U&&1!==e.which&&(t=V),this.pressed&&(t&V&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var fe={pointerdown:F,pointermove:U,pointerup:V,pointercancel:H,pointerout:H},de={2:"touch",3:"pen",4:"mouse",5:"kinect"},he="pointerdown",me="pointermove pointerup pointercancel";function ve(){this.evEl=he,this.evWin=me,ee.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(he="MSPointerDown",me="MSPointerMove MSPointerUp MSPointerCancel"),x(ve,ee,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=fe[r],o=de[e.pointerType]||e.pointerType,a="touch"==o,s=A(t,e.pointerId,"pointerId");i&F&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):i&(V|H)&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ge={touchstart:F,touchmove:U,touchend:V,touchcancel:H},ye="touchstart",be="touchstart touchmove touchend touchcancel";function _e(){this.evTarget=ye,this.evWin=be,this.started=!1,ee.apply(this,arguments)}x(_e,ee,{handler:function(e){var t=ge[e.type];if(t===F&&(this.started=!0),this.started){var n=function(e,t){var n=M(e.touches),r=M(e.changedTouches);t&(V|H)&&(n=I(n.concat(r),"identifier",!0));return[n,r]}.call(this,e,t);t&(V|H)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var xe={touchstart:F,touchmove:U,touchend:V,touchcancel:H},we="touchstart touchmove touchend touchcancel";function Se(){this.evTarget=we,this.targetIds={},ee.apply(this,arguments)}x(Se,ee,{handler:function(e){var t=xe[e.type],n=function(e,t){var n=M(e.touches),r=this.targetIds;if(t&(F|U)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=M(e.changedTouches),s=[],l=this.target;if(o=n.filter(function(e){return T(e.target,l)}),t===F)for(i=0;i-1&&r.splice(e,1)},Ee)}}x(Oe,ee,{handler:function(e,t,n){var r="touch"==n.pointerType,i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)(function(e,t){e&F?(this.primaryTouch=t.changedPointers[0].identifier,Te.call(this,t)):e&(V|H)&&Te.call(this,t)}).call(this,t,n);else if(i&&function(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n=Fe&&r(t.options.event+qe(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;et.threshold&&i&t.direction},attrTest:function(e){return Ke.prototype.attrTest.call(this,e)&&(this.state&ze||!(this.state&ze)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ge(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),x(Ye,Ke,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&ze)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),x(Xe,He,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ae]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distancet.time;if(this._input=e,!r||!n||e.eventType&(V|H)&&!i)this.reset();else if(e.eventType&F)this.reset(),this._timer=m(function(){this.state=Ue,this.tryEmit()},t.time,this);else if(e.eventType&V)return Ue;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===Ue&&(e&&e.eventType&V?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}}),x(Je,Ke,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ie]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&ze)}}),x($e,Ke,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Y|X,pointers:1},getTouchAction:function(){return Ze.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Y|X)?t=e.overallVelocity:n&Y?t=e.overallVelocityX:n&X&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&d(t)>this.options.velocity&&e.eventType&V},emit:function(e){var t=Ge(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),x(Qe,He,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Me]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance=0;t--){var n=e[t][o];n.modified||(Array.isArray(n.base)?P(n)&&S(n):C(n)&&S(n))}}function C(e){for(var t=e.base,n=e.draft,r=Object.keys(n),i=r.length-1;i>=0;i--){var a=r[i],s=t[a];if(void 0===s&&!d(t,a))return!0;var l=n[a],u=l&&l[o];if(u?u.base!==s:!h(l,s))return!0}return r.length!==Object.keys(t).length}function P(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var A=Object.freeze({willFinalize:function(e,t,n){e.drafts.forEach(function(e){e[o].finalizing=!0}),n?a(t)&&t[o].scope===e&&T(e.drafts):(e.patches&&function e(t){if(t&&"object"===typeof t){var n=t[o];if(n){var r=n.base,i=n.draft,a=n.assigned;if(Array.isArray(t)){if(P(n)){if(S(n),a.length=!0,i.lengthc&&a[p-1]===s[p+u-1];)--p;for(var f=c;f=p;--m){var v=t.concat([m]);n[h+m-p]={op:"add",path:v,value:s[m]},r.push({op:"remove",path:v})}}(e,t,n,r):function(e,t,n,r){var i=e.base,o=e.copy;p(e.assigned,function(e,a){var s=i[e],l=o[e],u=a?e in i?"replace":"add":"remove";if(s!==l||"replace"!==u){var c=t.concat(e);n.push("remove"===u?{op:u,path:c}:{op:u,path:c,value:l}),r.push("add"===u?{op:"remove",path:c}:"remove"===u?{op:"add",path:c,value:s}:{op:"replace",path:c,value:s})}})}(e,t,n,r)}var B=function(e,t){for(var n=0,r=t;n0;)r[i]=arguments[i+1];return l.produce(e,function(e){return t.call.apply(t,[n,e].concat(r))})}}if("function"!==typeof t)throw new Error("The first or second argument to `produce` must be a function");if(void 0!==n&&"function"!==typeof n)throw new Error("The third argument to `produce` must be a function or undefined");if(s(e)){var u=v.enter(),c=this.createProxy(e),p=!0;try{i=t(c),p=!1}finally{p?u.revoke():u.leave()}return i instanceof Promise?i.then(function(e){return u.usePatches(n),o.processResult(e,u)},function(e){throw u.revoke(),e}):(u.usePatches(n),this.processResult(i,u))}return void 0===(i=t(e))?e:i!==r?i:void 0},U.prototype.produceWithPatches=function(e,t,n){var r,i,o=this;if("function"===typeof e)return function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return o.produceWithPatches(t,function(t){return e.apply(void 0,[t].concat(n))})};if(n)throw new Error("A patch listener cannot be passed to produceWithPatches");return[this.produce(e,t,function(e,t){r=e,i=t}),r,i]},U.prototype.createDraft=function(e){if(!s(e))throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object");var t=v.enter(),n=this.createProxy(e);return n[o].isManual=!0,t.leave(),n},U.prototype.finishDraft=function(e,t){var n=e&&e[o];if(!n||!n.isManual)throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`");if(n.finalized)throw new Error("The given draft is already finalized");var r=n.scope;return r.usePatches(t),this.processResult(void 0,r)},U.prototype.setAutoFreeze=function(e){this.autoFreeze=e},U.prototype.setUseProxies=function(e){this.useProxies=e,l(this,e?N:A)},U.prototype.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}return a(e)?B(e,t):this.produce(e,function(e){return B(e,t.slice(n+1))})},U.prototype.processResult=function(e,t){var n=t.drafts[0],i=void 0!==e&&e!==n;if(this.willFinalize(t,e,i),i){if(n[o].modified)throw t.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");s(e)&&(e=this.finalize(e,null,t)),t.patches&&(t.patches.push({op:"replace",path:[],value:e}),t.inversePatches.push({op:"replace",path:[],value:n[o].base}))}else e=this.finalize(n,[],t);return t.revoke(),t.patches&&t.patchListener(t.patches,t.inversePatches),e!==r?e:void 0},U.prototype.finalize=function(e,t,n){var r=this,i=e[o];if(!i)return Object.isFrozen(e)?e:this.finalizeTree(e,null,n);if(i.scope!==n)return e;if(!i.modified)return i.base;if(!i.finalized){if(i.finalized=!0,this.finalizeTree(i.draft,t,n),this.onDelete)if(this.useProxies){var a=i.assigned;for(var s in a)a[s]||this.onDelete(i,s)}else{var l=i.base,u=i.copy;p(l,function(e){d(u,e)||r.onDelete(i,e)})}this.onCopy&&this.onCopy(i),this.autoFreeze&&n.canAutoFreeze&&Object.freeze(i.copy),t&&n.patches&&z(i,t,n.patches,n.inversePatches)}return i.copy},U.prototype.finalizeTree=function(e,t,n){var r=this,i=e[o];i&&(this.useProxies||(i.copy=c(i.draft,!0)),e=i.copy);var l=!!t&&!!n.patches;return p(e,function o(u,c,d){if(c===d)throw Error("Immer forbids circular references");var m=!!i&&d===e;if(a(c)){var v=m&&l&&!i.assigned[u]?t.concat(u):null;if(a(c=r.finalize(c,v,n))&&(n.canAutoFreeze=!1),Array.isArray(d)||f(d,u)?d[u]=c:Object.defineProperty(d,u,{value:c}),m&&c===i.base[u])return}else{if(m&&h(c,i.base[u]))return;s(c)&&!Object.isFrozen(c)&&p(c,o)}m&&r.onAssign&&r.onAssign(i,u,c)}),e};var V=new U,H=V.produce;V.produceWithPatches.bind(V),V.setAutoFreeze.bind(V),V.setUseProxies.bind(V),V.applyPatches.bind(V),V.createDraft.bind(V),V.finishDraft.bind(V);t.a=H}).call(this,n(71))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(1),i=n.n(r).a.createContext(null);t.a=i},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,i=/^ms-/,o={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(o.hasOwnProperty(e))return o[e];var t=e.replace(r,a);return o[e]=i.test(t)?"-"+t:t}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n(1),i=n(29),o=!0,a=!1,s=null,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function u(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){o=!1}function p(){"hidden"===this.visibilityState&&a&&(o=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return o||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function d(){a=!0,window.clearTimeout(s),s=window.setTimeout(function(){a=!1},100)}function h(){return{isFocusVisible:f,onBlurVisible:d,ref:r.useCallback(function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",p,!0))},[])}}},function(e,t,n){var r=n(272),i=n(273),o=n(274),a=n(276);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t,n){"use strict";var r=n(3),i=n(11),o=n(1),a=(n(5),n(10)),s=n(18),l=n(25),u=o.forwardRef(function(e,t){var n=e.children,s=e.classes,u=e.className,c=e.color,p=void 0===c?"inherit":c,f=e.component,d=void 0===f?"svg":f,h=e.fontSize,m=void 0===h?"default":h,v=e.htmlColor,g=e.titleAccess,y=e.viewBox,b=void 0===y?"0 0 24 24":y,_=Object(i.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(d,Object(r.a)({className:Object(a.a)(s.root,u,"inherit"!==p&&s["color".concat(Object(l.a)(p))],"default"!==m&&s["fontSize".concat(Object(l.a)(m))]),focusable:"false",viewBox:b,color:v,"aria-hidden":!g||void 0,role:g?"img":void 0,ref:t},_),n,g?o.createElement("title",null,g):null)});u.muiName="SvgIcon",t.a=Object(s.a)(function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}},{name:"MuiSvgIcon"})(u)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(1);function i(e){var t=e.controlled,n=e.default,i=(e.name,e.state,r.useRef(void 0!==t).current),o=r.useState(n),a=o[0],s=o[1];return[i?t:a,r.useCallback(function(e){i||s(e)},[])]}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(45);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");t.default=o},function(e,t,n){"use strict";var r=n(1),i=n.n(r),o=n(5),a=n.n(o),s=n(201);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return(u=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var d={cursor:"pointer"},h=function(e){var t=e.index,n=e.onClick,r=e.photo,o=e.margin,a=e.direction,s=e.top,l=e.left,p=e.key,f={margin:o,display:"block"};"column"===a&&(f.position="absolute",f.left=l,f.top=s);return i.a.createElement("img",u({key:p,style:n?c({},f,d):f},r,{onClick:n?function(e){n(e,{photo:r,index:t})}:null}))},m=a.a.shape({key:a.a.string,src:a.a.string.isRequired,width:a.a.number.isRequired,height:a.a.number.isRequired,alt:a.a.string,title:a.a.string,srcSet:a.a.oneOfType([a.a.string,a.a.array]),sizes:a.a.oneOfType([a.a.string,a.a.array])});h.propTypes={index:a.a.number.isRequired,onClick:a.a.func,photo:m.isRequired,margin:a.a.number,top:function(e){if("column"===e.direction&&"number"!==typeof e.top)return new Error("top is a required number when direction is set to `column`")},left:function(e){if("column"===e.direction&&"number"!==typeof e.left)return new Error("left is a required number when direction is set to `column`")},direction:a.a.string};var v=function(e,t){return t||(t=0),Number(Math.round(e+"e"+t)+"e-"+t)},g=function(e){var t=e.width,n=e.height;return v(t/n,2)};function y(e){this.content=[],this.scoreFunction=e}y.prototype={push:function(e){this.content.push(e),this.bubbleUp(this.content.length-1)},pop:function(){var e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.sinkDown(0)),e},remove:function(e){for(var t=this.content.length,n=0;n0;){var r=Math.floor((e+1)/2)-1,i=this.content[r];if(n>=this.scoreFunction(i))break;this.content[r]=t,this.content[e]=i,e=r}},sinkDown:function(e){for(var t=this.content.length,n=this.content[e],r=this.scoreFunction(n);;){var i=2*(e+1),o=i-1,a=null;if(op)&&(o[c]=p,a.push({id:c,weight:p}),r[c]=l)}}}if("undefined"===typeof o[n])throw new Error("There is no path from ".concat(t," to ").concat(n));return r}(e,t,n),n)},_=function(e,t,n){return(t-e.length*(2*n))/e.reduce(function(e,t){return e+g(t)},0)},x=function(e,t,n,r,i,o){var a=e.slice(t,n),s=_(a,r,o);return Math.pow(Math.abs(s-i),2)},w=function(e){var t=e.containerWidth,n=e.limitNodeSearch,r=e.targetRowHeight,i=e.margin,o=e.photos,a=function(e,t,n,r,i){return function(o){var a={};a[+(o=+o)]=0;for(var s=o+1;sr);++s)a[s.toString()]=x(n,o,s,t,e,i);return a}}(r,t,o,n,i),s=b(a,"0",o.length);s=s.map(function(e){return+e});for(var l=1;l=450&&(l=function(e){var t=e.targetRowHeight,n=e.containerWidth;return v(n/t/1.5)+8}({containerWidth:y,targetRowHeight:u}))),S={display:"flex",flexWrap:"wrap",flexDirection:"row"},E=w({containerWidth:k,limitNodeSearch:l,targetRowHeight:u,margin:a,photos:t})),"column"===o&&("function"===typeof d&&(d=d(y)),void 0===d&&(d=1,y>=500&&(d=2),y>=900&&(d=3),y>=1500&&(d=4)),S={position:"relative"},E=function(e){for(var t=e.photos,n=e.columns,r=e.containerWidth,i=e.margin,o=(r-2*i*n)/n,a=t.map(function(e){var t=e.height/e.width*o;return c({},e,{width:v(o,1),height:v(t,1)})}),s=[],l=[],u=0;ul[e]?n:e},0);return e.containerHeight=l[n],e})}({containerWidth:k,columns:d,margin:a,photos:t}),S.height=E[E.length-1].containerHeight);var O=m||h;return i.a.createElement("div",{className:"react-photo-gallery--gallery"},i.a.createElement("div",{ref:_,style:S},E.map(function(e,t){var r=e.left,i=e.top,s=e.containerHeight,l=p(e,["left","top","containerHeight"]);return O({left:r,top:i,key:e.key||e.src,containerHeight:s,index:t,margin:a,direction:o,onClick:n?x:null,photo:l})})))});S.propTypes={photos:a.a.arrayOf(m).isRequired,direction:a.a.string,onClick:a.a.func,columns:a.a.oneOfType([a.a.func,a.a.number]),targetRowHeight:a.a.oneOfType([a.a.func,a.a.number]),limitNodeSearch:a.a.oneOfType([a.a.func,a.a.number]),margin:a.a.number,renderImage:a.a.func},S.defaultProps={margin:2,direction:"row",targetRowHeight:300},t.a=S},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(94),i=Object(r.b)()},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"}),"Favorite");t.default=o},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.default=o},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(0),i=function(e){return Object(r.a)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 16C123.45 16 16 123.45 16 256s107.45 240 240 240 240-107.45 240-240S388.55 16 256 16zm0 60c99.41 0 180 80.59 180 180s-80.59 180-180 180S76 355.41 76 256 156.59 76 256 76zm-80.625 60c-.97-.005-2.006.112-3.063.313v-.032c-18.297 3.436-45.264 34.743-33.375 46.626l73.157 73.125-73.156 73.126c-14.63 14.625 29.275 58.534 43.906 43.906L256 299.906l73.156 73.156c14.63 14.628 58.537-29.28 43.906-43.906l-73.156-73.125 73.156-73.124c14.63-14.625-29.275-58.5-43.906-43.875L256 212.157l-73.156-73.125c-2.06-2.046-4.56-3.015-7.47-3.03z"}}]})(e)};i.displayName="GiCancel"},function(e,t,n){"use strict";var r=s(n(342)),i=s(n(346)),o=s(n(185)),a=s(n(182));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:o.default,ReplaceTransition:i.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return f});var r=n(27),i=n(26),o=n(8),a=n(5),s=n.n(a),l=n(56);var u={container:s.a.object,gl:s.a.object,mapboxApiAccessToken:s.a.string,mapboxApiUrl:s.a.string,attributionControl:s.a.bool,preserveDrawingBuffer:s.a.bool,reuseMaps:s.a.bool,transformRequest:s.a.func,mapOptions:s.a.object,mapStyle:s.a.oneOfType([s.a.string,s.a.object]),visible:s.a.bool,asyncRender:s.a.bool,onLoad:s.a.func,onError:s.a.func,width:s.a.number,height:s.a.number,viewState:s.a.object,longitude:s.a.number,latitude:s.a.number,zoom:s.a.number,bearing:s.a.number,pitch:s.a.number,altitude:s.a.number},c={container:l.a.body,mapboxApiAccessToken:function(){var t=null;if("undefined"!==typeof window&&window.location){var n=window.location.search.match(/access_token=([^&\/]*)/);t=n&&n[1]}t||"undefined"===typeof e||(t=t||Object({NODE_ENV:"production",PUBLIC_URL:"http://languagetogether.s3-website.ap-northeast-2.amazonaws.com",REACT_APP_GOOGLEID:"106115899408-k6r15oksnfcb73ndjcr462q640csffq5.apps.googleusercontent.com",REACT_APP_MAPBOX:"pk.eyJ1IjoiZG9uZ2h3YW55ZW9tIiwiYSI6ImNrYjliZjJrZjA4ODEzMXQzcGh6emw5b2YifQ._dOuoE4tUDr6LkZukE7RdA",REACT_APP_RECAPCHAR:"6Lds1KkZAAAAAN7rnjMk5v2JrQKewzrw4XCka5IL"}).MapboxAccessToken||Object({NODE_ENV:"production",PUBLIC_URL:"http://languagetogether.s3-website.ap-northeast-2.amazonaws.com",REACT_APP_GOOGLEID:"106115899408-k6r15oksnfcb73ndjcr462q640csffq5.apps.googleusercontent.com",REACT_APP_MAPBOX:"pk.eyJ1IjoiZG9uZ2h3YW55ZW9tIiwiYSI6ImNrYjliZjJrZjA4ODEzMXQzcGh6emw5b2YifQ._dOuoE4tUDr6LkZukE7RdA",REACT_APP_RECAPCHAR:"6Lds1KkZAAAAAN7rnjMk5v2JrQKewzrw4XCka5IL"}).REACT_APP_MAPBOX_ACCESS_TOKEN);return t||"no-token"}(),mapboxApiUrl:"https://api.mapbox.com",preserveDrawingBuffer:!1,attributionControl:!0,reuseMaps:!1,mapOptions:{},mapStyle:"mapbox://styles/mapbox/light-v8",visible:!0,asyncRender:!1,onLoad:function(){},onError:function(e){e&&console.error(e.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";e.debug&&s.a.checkPropTypes(u,e,"prop",t)}var f=function(){function e(t){var n=this;if(Object(r.a)(this,e),Object(o.a)(this,"mapboxgl",void 0),Object(o.a)(this,"props",c),Object(o.a)(this,"_map",null),Object(o.a)(this,"width",0),Object(o.a)(this,"height",0),Object(o.a)(this,"_fireLoadEvent",function(){n.props.onLoad({type:"load",target:n._map})}),!t.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=t.mapboxgl,e.initialized||(e.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(t)}return Object(i.a)(e,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(e){return this._update(this.props,e),this}},{key:"resize",value:function(){return this._map.resize(),this}},{key:"redraw",value:function(){var e=this._map;e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(t){this._map=e.savedMap;var n=this._map.getContainer(),r=t.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,e.savedMap=null,t.mapStyle&&this._map.setStyle(t.mapStyle,{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(t){if(t.reuseMaps&&e.savedMap)this._reuse(t);else{if(t.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,t.gl}}var r={container:t.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:t.mapStyle,interactive:!1,trackResize:!1,attributionControl:t.attributionControl,preserveDrawingBuffer:t.preserveDrawingBuffer};t.transformRequest&&(r.transformRequest=t.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,t.mapOptions)),this._map.once("load",t.onLoad),this._map.on("error",t.onError)}return this}},{key:"_destroy",value:function(){this._map&&(e.savedMap?this._map.remove():(e.savedMap=this._map,this._map.off("load",this.props.onLoad),this._map.off("error",this.props.onError),this._map.off("styledata",this._fireLoadEvent)),this._map=null)}},{key:"_initialize",value:function(e){var t=this;p(e=Object.assign({},c,e),"Mapbox"),this.mapboxgl.accessToken=e.mapboxApiAccessToken||c.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=e.mapboxApiUrl,this._create(e);var n=e.container;Object.defineProperty(n,"offsetWidth",{get:function(){return t.width}}),Object.defineProperty(n,"clientWidth",{get:function(){return t.width}}),Object.defineProperty(n,"offsetHeight",{get:function(){return t.height}}),Object.defineProperty(n,"clientHeight",{get:function(){return t.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},e),this._updateMapSize({},e),this.props=e}},{key:"_update",value:function(e,t){if(this._map){p(t=Object.assign({},this.props,t),"Mapbox");var n=this._updateMapViewport(e,t),r=this._updateMapSize(e,t);t.asyncRender||!n&&!r||this.redraw(),this.props=t}}},{key:"_updateMapSize",value:function(e,t){var n=e.width!==t.width||e.height!==t.height;return n&&(this.width=t.width,this.height=t.height,this.resize()),n}},{key:"_updateMapViewport",value:function(e,t){var n=this._getViewState(e),r=this._getViewState(t),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(e){var t=e.viewState||e,n=t.longitude,r=t.latitude,i=t.zoom,o=t.pitch,a=void 0===o?0:o,s=t.bearing,l=void 0===s?0:s,u=t.altitude;return{longitude:n,latitude:r,zoom:i,pitch:a,bearing:l,altitude:void 0===u?1.5:u}}},{key:"_checkStyleSheet",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if("undefined"!==typeof l.a)try{var t=l.a.createElement("div");if(t.className="mapboxgl-map",t.style.display="none",l.a.body.append(t),!("static"!==window.getComputedStyle(t).position)){var n=l.a.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.css")),l.a.head.append(n)}}catch(r){}}},{key:"_viewStateToMapboxProps",value:function(e){return{center:[e.longitude,e.latitude],zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}}}]),e}();Object(o.a)(f,"initialized",!1),Object(o.a)(f,"propTypes",u),Object(o.a)(f,"defaultProps",c),Object(o.a)(f,"savedMap",null)}).call(this,n(71))},function(e,t,n){"use strict";var r=n(1),i=n.n(r),o=n(29),a=n(21),s=n.n(a),l=n(103),u=n(202),c=n.n(u),p=n(42),f=n(47),d=n(129);function h(e,t){return function(e,t){var n=Object(r.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}(t,function(t){return e.forEach(function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)})})}var m=function(){},v=r.forwardRef(function(e,t){var n=r.useRef(null),i=r.useState({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:m}),o=i[0],a=i[1],s=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,f=e.enabled,v=e.shards,g=e.sideCar,y=e.noIsolation,b=e.inert,_=e.allowPinchZoom,x=p.b(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),w=g,S=p.a({ref:h([n,t])},x,o);return r.createElement(r.Fragment,null,f&&r.createElement(w,{sideCar:d.a,removeScrollBar:c,shards:v,noIsolation:y,inert:b,setCallbacks:a,allowPinchZoom:!!_,lockRef:n}),s?r.cloneElement(r.Children.only(l),S):r.createElement("div",p.a({},S,{className:u}),l))});function g(){return(g=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},F=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},U=function(e){var t=e.css,n=e.innerRef,r=e.tag,i=B(e,["css","innerRef","tag"]);return s()(r,N({ref:n,css:N({boxSizing:"border-box"},t)},i))},V=function(e){return s()(U,N({tag:"button"},e))},H=function(e){return s()(U,N({tag:"div"},e))},q=function(e){return s()(U,N({tag:"img"},e))},G=function(e){return s()(U,N({tag:"nav"},e))},W=function(e){return s()(U,N({tag:"span"},e))},K="react-images";function Z(e,t){var n=Array.isArray(e)?e:[e];if(t&&"string"===typeof e)for(var r in t)t.hasOwnProperty(r)&&t[r]&&n.push(e+"--"+r);return n.map(function(e){return K+"__"+e}).join(" ")}function Y(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var X={Header:"header",Footer:"footer",View:"view",Track:"track",Positioner:"positioner"},J=X.Footer,$=function(e){var t=e.size,n=B(e,["size"]);return s()("svg",N({role:"presentation",viewBox:"0 0 24 24",css:{display:"inline-block",fill:"currentColor",height:t,stroke:"currentColor",strokeWidth:0,width:t}},n))},Q=function(e){var t=e.size,n=void 0===t?32:t,r=B(e,["size"]);return s()($,N({size:n},r),s()("path",{d:"M15.422 16.078l-1.406 1.406-6-6 6-6 1.406 1.406-4.594 4.594z"}))},ee=function(e){var t=e.size,n=void 0===t?32:t,r=B(e,["size"]);return s()($,N({size:n},r),s()("path",{d:"M9.984 6l6 6-6 6-1.406-1.406 4.594-4.594-4.594-4.594z"}))},te=function(e){var t=e.size,n=void 0===t?32:t,r=B(e,["size"]);return s()($,N({size:n},r),s()("path",{d:"M18.984 6.422l-5.578 5.578 5.578 5.578-1.406 1.406-5.578-5.578-5.578 5.578-1.406-1.406 5.578-5.578-5.578-5.578 1.406-1.406 5.578 5.578 5.578-5.578z"}))},ne=function(e){var t=e.size,n=void 0===t?32:t,r=B(e,["size"]);return s()($,N({size:n},r),s()("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"}))},re=function(e){var t=e.size,n=void 0===t?32:t,r=B(e,["size"]);return s()($,N({size:n},r),s()("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"}))},ie=X.Header,oe=function(){return{alignItems:"center",background:0,border:0,color:"rgba(255, 255, 255, 0.75)",cursor:"pointer",display:"inline-flex ",height:44,justifyContent:"center",outline:0,padding:0,position:"relative",width:44,"&:hover":{color:"white"}}},ae=oe,se=oe,le=function(e){var t,n=e.align;return L(t={alignItems:"center",background:"rgba(255, 255, 255, 0.2)",border:0,borderRadius:"50%",color:"white",cursor:"pointer",display:"flex ",fontSize:"inherit",height:50,justifyContent:"center",marginTop:-25,outline:0,position:"absolute",top:"50%",transition:"background-color 200ms",width:50},n,20),L(t,"&:hover",{background:"rgba(255, 255, 255, 0.3)"}),L(t,"&:active",{background:"rgba(255, 255, 255, 0.2)"}),t},ue=le,ce=le;function pe(e){var t=e.data,n=e.isFullscreen,r=t.source,i=void 0===r?t.src:r;return"string"===typeof i?i:n?i.fullscreen:i.regular}var fe=X.View,de={Container:function(e){var t=e.children,n=e.getStyles,r=e.isFullscreen,i=e.isModal,o=e.innerProps;return s()(H,N({css:n("container",e),className:Z("container",{isFullscreen:r,isModal:i})},o),t)},Footer:function(e){var t=e.components,n=e.getStyles,r=e.innerProps,i=e.isFullscreen,o=e.isModal,a=o?{background:"linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.33))"}:null,l={isFullscreen:i,isModal:o},u={container:Z(J,l),caption:Z("footer__caption",l),count:Z("footer__count",l)},c={container:n(J,e),caption:n("footerCaption",e),count:n("footerCount",e)},p=t.Caption,f=t.Count;return s()(H,N({css:c.container,className:u.container,style:a},r),s()(p,e),s()(f,e))},FooterCaption:function(e){var t=e.currentView,n=e.getStyles,r=e.isFullscreen,i=e.isModal,o=t.caption,a={isFullscreen:r,isModal:i};return s()(W,{css:n("footerCaption",e),className:Z("footer__caption",a)},"string"===typeof o?c()(""+o+""):o)},FooterCount:function(e){var t=e.currentIndex,n=e.getStyles,r={isFullscreen:e.isFullscreen,isModal:e.isModal},i=t+1,o=e.views.length;return i&&o?s()(W,{css:n("footerCount",e),className:Z("footer__count",r)},i," of ",o):null},Header:function(e){var t=e.components,n=e.getStyles,r=e.getCloseLabel,i=e.getFullscreenLabel,o=e.innerProps,a=e.isModal,l=e.modalProps;if(!a)return null;var u=l.allowFullscreen,c=l.isFullscreen,p=l.onClose,f=l.toggleFullscreen,d=c?re:ne,h=t.CloseButton,m=t.FullscreenButton,v={isFullscreen:c,isModal:a};return s()(H,N({css:n(ie,e),className:Z(ie,v),style:{background:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0))"}},o),s()("span",null),s()("span",null,u?s()(m,{getStyles:n,innerProps:{onClick:f,title:i(v)}},s()(d,{size:32})):null,s()(h,{getStyles:n,innerProps:{onClick:p,title:r(v)}},s()(te,{size:32}))))},HeaderClose:function(e){var t=e.children,n=e.getStyles,r=e.innerProps;return s()(V,N({css:n("headerClose",e),className:Z(["header_button","header_button--close"]),type:"button"},r),t)},HeaderFullscreen:function(e){var t=e.children,n=e.getStyles,r=e.innerProps;return s()(V,N({css:n("headerFullscreen",e),className:Z(["header_button","header_button--fullscreen"]),type:"button"},r),t)},Navigation:function(e){var t=e.children,n=e.getStyles,r=e.isFullscreen,i=e.isModal,o=e.showNavigationOnTouchDevice;return!Y()||Y()&&o?s()(G,{css:n("navigation",e),className:Z("navigation",{isFullscreen:r,isModal:i})},t):null},NavigationPrev:function(e){var t=e.children,n=void 0===t?s()(Q,{size:48}):t,r=e.getStyles,i=e.innerProps;return s()(V,N({type:"button",css:r("navigationPrev",e)},i),n)},NavigationNext:function(e){var t=e.children,n=void 0===t?s()(ee,{size:48}):t,r=e.getStyles,i=e.innerProps;return s()(V,N({type:"button",css:r("navigationNext",e)},i),n)},View:function(e){var t=e.data,n=e.formatters,r=e.getStyles,i=e.index,o=e.isFullscreen,a=e.isModal,l={alt:n.getAltText({data:t,index:i}),src:pe({data:t,isFullscreen:o})};return s()(H,{css:r(fe,e),className:Z(fe,{isFullscreen:o,isModal:a})},s()(q,N({},l,{className:Z("view-image",{isFullscreen:o,isModal:a}),css:{height:"auto",maxHeight:"100%",maxWidth:"100%",userSelect:"none",margin:"auto"}})))}},he={Blanket:function(e){var t=e.getStyles,n=e.innerProps,r=e.isFullscreen;return s()(H,N({css:t("blanket",e),className:Z("blanket",{isFullscreen:r})},n))},Positioner:function(e){var t=e.children,n=e.getStyles,r=e.innerProps,i=e.isFullscreen;return s()(H,N({css:n(X.Positioner,e),className:Z(X.Positioner,{isFullscreen:i})},r),t)},Dialog:function(e){var t=e.children,n=e.getStyles,r=e.innerProps,i=e.isFullscreen;return e.removeFocusOn?s()(H,N({css:n("dialog",e),className:Z("dialog",{isFullscreen:i})},r),t):s()(C,null,s()(H,N({css:n("dialog",e),className:Z("dialog",{isFullscreen:i})},r),t))}},me={container:function(e){return{backgroundColor:e.isFullscreen?"black":null,display:"flex ",flexDirection:"column",height:"100%"}},footer:function(e){var t=e.isModal,n=e.interactionIsIdle;return L({alignItems:"top",bottom:t?0:null,color:t?"rgba(255, 255, 255, 0.9)":"#666",display:"flex ",flex:"0 0 auto",fontSize:13,justifyContent:"space-between",left:t?0:null,opacity:n&&t?0:1,padding:t?"30px 20px 20px":"10px 0",position:t?"absolute":null,right:t?0:null,transform:t?"translateY("+(n?10:0)+"px)":null,transition:"opacity 300ms, transform 300ms",zIndex:t?1:null,"& *:focus":{outline:"1.5px solid orange"}},"@media (max-width: 769px)",{padding:t?"20px 15px 15px":"5px 0"})},footerCaption:function(){return{}},footerCount:function(){return{flexShrink:0,marginLeft:"1em"}},header:function(e){var t=e.interactionIsIdle;return{alignItems:"center",display:"flex ",flex:"0 0 auto",justifyContent:"space-between",opacity:t?0:1,padding:10,paddingBottom:20,position:"absolute",transform:"translateY("+(t?-10:0)+"px)",transition:"opacity 300ms, transform 300ms",top:0,left:0,right:0,zIndex:1,"& *:focus":{outline:"1.5px solid orange"}}},headerClose:se,headerFullscreen:ae,navigation:function(e){return{display:"flex ",alignItems:"center",justifyContent:"space-between",opacity:e.interactionIsIdle?0:1,transition:"opacity 300ms","& *:focus":{outline:"1.5px solid orange"}}},navigationPrev:ue,navigationNext:ce,view:function(){return{lineHeight:0,position:"relative",textAlign:"center"}}},ve={blanket:function(e){return{backgroundColor:e.isFullscreen?"black":"rgba(0, 0, 0, 0.8)",bottom:0,left:0,position:"fixed",right:0,top:0,zIndex:1199}},dialog:function(){return{width:"100%"}},positioner:function(){return{alignItems:"center",bottom:0,display:"flex ",justifyContent:"center",left:0,position:"fixed",right:0,top:0,zIndex:1200}}},ge="cubic-bezier(0.23, 1, 0.32, 1)",ye=function(e){var t=e.component,n=e.onEntered,r=e.onExited,o=e.in,a=e.innerProps,s=B(e,["component","onEntered","onExited","in","innerProps"]),l={transition:"opacity 200ms",opacity:0},u={entering:{opacity:0},entered:{opacity:1},exiting:{opacity:0,transitionDuration:"500ms"}};return i.a.createElement(j.Transition,{appear:!0,mountOnEnter:!0,unmountOnExit:!0,onEntered:n,onExited:r,key:"fade",in:o,timeout:{enter:300,exit:500}},function(e){var n=N({},a,{style:N({},l,u[e])});return"exited"===e?null:i.a.createElement(t,N({innerProps:n},s))})},be=function(e){var t=e.component,n=e.onEntered,r=e.onExited,o=e.in,a=e.innerProps,s=B(e,["component","onEntered","onExited","in","innerProps"]),l={transition:"transform 300ms "+ge+", opacity 300ms "+ge,transform:"translate3d(0, 0, 0)"},u={entering:{opacity:0,transform:"translate3d(0, 40px, 0) scale(0.9)"},entered:{opacity:1,transform:"translate3d(0, 0, 0)"},exiting:{opacity:0,transform:"translate3d(0, 40px, 0) scale(0.9)",transition:"transform 500ms "+ge+", opacity 500ms "+ge}};return i.a.createElement(j.Transition,{appear:!0,in:o,mountOnEnter:!0,onEntered:n,onExited:r,timeout:{enter:300,exit:500},unmountOnExit:!0},function(e){if("exited"===e)return null;var n=N({},a,{style:N({},l,u[e])});return i.a.createElement(t,N({innerProps:n},s))})},_e={allowFullscreen:!Y(),closeOnBackdropClick:!0,closeOnEsc:!0,preventScroll:!0,styles:{}},xe=new Set([X.View,X.Header,X.Footer,X.Track,X.Positioner].map(Z)),we=function(e){function t(e){D(this,t);var n=F(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return Se.call(n),n.cacheComponents(e.components),n.state={isFullscreen:!1,isClosing:!1},n}return z(t,e),R(t,[{key:"componentDidUpdate",value:function(e){e.components!==this.props.components&&this.cacheComponents(e.components)}},{key:"getCommonProps",value:function(){var e=this.state.isFullscreen;return{getStyles:this.getStyles,isFullscreen:e,modalProps:this.props}}},{key:"render",value:function(){var e=this.components,t=e.Blanket,n=e.Positioner,i=e.Dialog,o=this.props,a=o.allowFullscreen,l=o.children,u=this.state.isFullscreen,c=this.commonProps=this.getCommonProps(),p=this.props.in,f={allowFullscreen:a,isFullscreen:u,onClose:this.handleClose,preventScroll:this.preventScroll,toggleFullscreen:this.toggleFullscreen},d=Object(r.cloneElement)(l,{isModal:!0,modalProps:f});return s()(A.a,{enabled:u,onChange:this.handleFullscreenChange},s()(ye,N({},c,{component:t,in:p})),s()(be,N({},c,{component:n,in:p,innerProps:{onClick:this.state.isClosing?null:this.handleBackdropClick},onEntered:this.modalDidMount,onExited:this.modalWillUnmount}),s()(i,N({removeFocusOn:this.state.isClosing},c),d)))}}]),t}(r.Component);we.defaultProps=_e;var Se=function(){var e=this;this.modalDidMount=function(){document.addEventListener("keyup",e.handleKeyUp),I.a.storeFocus()},this.modalWillUnmount=function(){document.removeEventListener("keyup",e.handleKeyUp),I.a.restoreFocus(),e.setState({isClosing:!1})},this.cacheComponents=function(t){e.components=N({},he,t)},this.handleFullscreenChange=function(t){e.setState({isFullscreen:t})},this.handleKeyUp=function(t){var n=e.props,r=n.allowFullscreen,i=n.closeOnEsc,o=e.state.isFullscreen,a="Escape"===t.key&&i&&!o;r&&"f"===t.key&&e.toggleFullscreen(),a&&e.handleClose(t)},this.handleBackdropClick=function(t){var n=!1,r=!0,i=!1,o=void 0;try{for(var a,s=t.target.classList[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;xe.has(l)&&(n=!0)}}catch(u){i=!0,o=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}n&&e.props.closeOnBackdropClick&&e.handleClose(t)},this.toggleFullscreen=function(){e.setState(function(e){return{isFullscreen:!e.isFullscreen}})},this.handleClose=function(t){var n=e.props.onClose,r=e.state.isFullscreen;e.setState({isClosing:!0}),r&&e.toggleFullscreen(),n(t)},this.getStyles=function(t,n){var r=ve[t](n);r.boxSizing="border-box";var i=e.props.styles[t];return i?i(r,n):r}};var Ee={flex:"1 1 auto",position:"relative"},ke={outline:0},Oe={currentIndex:0,formatters:{getAltText:function(e){var t=e.data,n=e.index;return t.caption?t.caption:"Image "+(n+1)},getNextLabel:function(e){return"Show slide "+(e.currentIndex+2)+" of "+e.views.length},getPrevLabel:function(e){return"Show slide "+e.currentIndex+" of "+e.views.length},getNextTitle:function(e){return"Next (right arrow)"},getPrevTitle:function(e){return"Previous (left arrow)"},getCloseLabel:function(e){return"Close (esc)"},getFullscreenLabel:function(e){return e.isFullscreen?"Exit fullscreen (f)":"Enter fullscreen (f)"}},hideControlsWhenIdle:3e3,showNavigationOnTouchDevice:!1,styles:{},trackProps:{instant:!Y(),swipe:"touch"}},Te=X.Track,Ce=function(e){function t(e){D(this,t);var n=F(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return Pe.call(n),n.cacheComponents(e.components),n.state={currentIndex:e.currentIndex,interactionIsIdle:Y()},n}return z(t,e),R(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.hideControlsWhenIdle,n=e.modalProps,r=Boolean(n);this.mounted=!0,t&&this.container&&(this.container.addEventListener("mousedown",this.handleMouseActivity),this.container.addEventListener("mousemove",this.handleMouseActivity),this.container.addEventListener("touchmove",this.handleMouseActivity)),r&&this.focusViewFrame()}},{key:"componentDidUpdate",value:function(e){e.components!==this.props.components&&this.cacheComponents(e.components),this.props.currentIndex!==e.currentIndex&&this.setState({currentIndex:this.props.currentIndex})}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.props.hideControlsWhenIdle&&this.container&&(this.container.removeEventListener("mousedown",this.handleMouseActivity),this.container.removeEventListener("mousemove",this.handleMouseActivity),this.container.removeEventListener("touchmove",this.handleMouseActivity),this.handleMouseActivity.cancel())}},{key:"getCommonProps",value:function(){var e=this.props,t=e.frameProps,n=e.trackProps,r=e.modalProps,i=e.views,o=e.showNavigationOnTouchDevice,a=Boolean(r),s=Boolean(r&&r.isFullscreen),l=this.state,u=l.currentIndex,c=l.interactionIsIdle,p=this.getViewData();return{carouselProps:this.props,currentIndex:u,currentView:p,formatters:this.props.formatters,frameProps:t,getStyles:this.getStyles,showNavigationOnTouchDevice:o,isFullscreen:s,isModal:a,modalProps:r,interactionIsIdle:c,trackProps:n,views:i}}},{key:"render",value:function(){var e=this.components,t=e.Container,n=e.View,r=this.state.currentIndex,i=this.props,o=i.frameProps,a=i.views,u=this.commonProps=this.getCommonProps();return s()(t,N({},u,{innerProps:{innerRef:this.getContainer}}),this.renderHeader(),s()(l.ViewPager,{tag:"main",style:Ee,className:Z("pager")},s()(l.Frame,N({},o,{ref:this.getFrame,className:Z("frame"),style:ke,tabIndex:"-1"}),s()(l.Track,N({},this.getTrackProps(this.props),{style:{display:"flex",alignItems:"center"},currentView:r,className:Z(Te),onViewChange:this.handleViewChange,ref:this.getTrack}),a&&a.map(function(e,t){return s()(l.View,{className:Z("view-wrapper"),key:t},s()(n,N({},u,{data:e,index:t})))}))),this.renderNavigation()),this.renderFooter())}}]),t}(r.Component);Ce.defaultProps=Oe;var Pe=function(){var e=this;this.mounted=!1,this.cacheComponents=function(t){e.components=N({},de,t)},this.getContainer=function(t){e.container=t},this.getFooter=function(t){e.footer=t},this.getFrame=function(t){e.frame=Object(o.findDOMNode)(t)},this.getHeader=function(t){e.header=t},this.getTrack=function(t){e.track=t},this.hasPreviousView=function(){var t=e.props.trackProps,n=e.state.currentIndex;return t.infinite||0!==n},this.hasNextView=function(){var t=e.props,n=t.trackProps,r=t.views,i=e.state.currentIndex;return n.infinite||i!==r.length-1},this.getStyles=function(t,n){var r=me[t](n);r.boxSizing="border-box";var i=e.props.styles[t];return i?i(r,n):r},this.getTrackProps=function(e){return N({},Oe.trackProps,e.trackProps)},this.getFormatters=function(){return N({},Oe.formatters,e.props.formatters)},this.getViewData=function(){return e.props.views[e.state.currentIndex]},this.focusViewFrame=function(){e.frame&&document.activeElement!==e.frame&&e.frame.focus()},this.prev=function(t){t.stopPropagation(),e.track.prev(),e.focusViewFrame()},this.next=function(t){t.stopPropagation(),e.track.next(),e.focusViewFrame()},this.handleMouseActivity=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=Array(r),o=0;o])/g,y=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,_=/\s{2,}/g,x=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,k=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,P="-webkit-",A="-moz-",M="-ms-",I=59,j=125,D=123,R=40,L=41,N=91,z=93,B=10,F=13,U=9,V=64,H=32,q=38,G=45,W=95,K=42,Z=44,Y=58,X=39,J=34,$=47,Q=62,ee=43,te=126,ne=0,re=12,ie=11,oe=107,ae=109,se=115,le=112,ue=111,ce=105,pe=99,fe=100,de=112,he=1,me=1,ve=0,ge=1,ye=1,be=1,_e=0,xe=0,we=0,Se=[],Ee=[],ke=0,Oe=null,Te=-2,Ce=-1,Pe=0,Ae=1,Me=2,Ie=3,je=0,De=1,Re="",Le="",Ne="";function ze(e,t,i,o,a){for(var s,l,c=0,p=0,f=0,d=0,g=0,y=0,b=0,_=0,w=0,E=0,k=0,O=0,T=0,C=0,W=0,_e=0,Ee=0,Oe=0,Te=0,Ce=i.length,Fe=Ce-1,We="",Ke="",Ze="",Ye="",Xe="",Je="";W0&&(Ke=Ke.replace(r,"")),Ke.trim().length>0)){switch(b){case H:case U:case I:case F:case B:break;default:Ke+=i.charAt(W)}b=I}if(1===Ee)switch(b){case D:case j:case I:case J:case X:case R:case L:case Z:Ee=0;case U:case F:case B:case H:break;default:for(Ee=0,Te=W,g=b,W--,b=I;Te0&&(++W,b=g);case D:Te=Ce}}switch(b){case D:for(g=(Ke=Ke.trim()).charCodeAt(0),k=1,Te=++W;W0&&(Ke=Ke.replace(r,"")),y=Ke.charCodeAt(1)){case fe:case ae:case se:case G:s=t;break;default:s=Se}if(Te=(Ze=ze(t,s,Ze,y,a+1)).length,we>0&&0===Te&&(Te=Ke.length),ke>0&&(s=Be(Se,Ke,Oe),l=qe(Ie,Ze,s,t,me,he,Te,y,a,o),Ke=s.join(""),void 0!==l&&0===(Te=(Ze=l.trim()).length)&&(y=0,Ze="")),Te>0)switch(y){case se:Ke=Ke.replace(S,He);case fe:case ae:case G:Ze=Ke+"{"+Ze+"}";break;case oe:Ze=(Ke=Ke.replace(h,"$1 $2"+(De>0?Re:"")))+"{"+Ze+"}",Ze=1===ye||2===ye&&Ve("@"+Ze,3)?"@"+P+Ze+"@"+Ze:"@"+Ze;break;default:Ze=Ke+Ze,o===de&&(Ye+=Ze,Ze="")}else Ze="";break;default:Ze=ze(t,Be(t,Ke,Oe),Ze,o,a+1)}Xe+=Ze,O=0,Ee=0,C=0,_e=0,Oe=0,T=0,Ke="",Ze="",b=i.charCodeAt(++W);break;case j:case I:if((Te=(Ke=(_e>0?Ke.replace(r,""):Ke).trim()).length)>1)switch(0===C&&((g=Ke.charCodeAt(0))===G||g>96&&g<123)&&(Te=(Ke=Ke.replace(" ",":")).length),ke>0&&void 0!==(l=qe(Ae,Ke,t,e,me,he,Ye.length,o,a,o))&&0===(Te=(Ke=l.trim()).length)&&(Ke="\0\0"),g=Ke.charCodeAt(0),y=Ke.charCodeAt(1),g){case ne:break;case V:if(y===ce||y===pe){Je+=Ke+i.charAt(W);break}default:if(Ke.charCodeAt(Te-1)===Y)break;Ye+=Ue(Ke,g,y,Ke.charCodeAt(2))}O=0,Ee=0,C=0,_e=0,Oe=0,Ke="",b=i.charCodeAt(++W)}}switch(b){case F:case B:if(p+d+f+c+xe===0)switch(E){case L:case X:case J:case V:case te:case Q:case K:case ee:case $:case G:case Y:case Z:case I:case D:case j:break;default:C>0&&(Ee=1)}p===$?p=0:ge+O===0&&o!==oe&&Ke.length>0&&(_e=1,Ke+="\0"),ke*je>0&&qe(Pe,Ke,t,e,me,he,Ye.length,o,a,o),he=1,me++;break;case I:case j:if(p+d+f+c===0){he++;break}default:switch(he++,We=i.charAt(W),b){case U:case H:if(d+c+p===0)switch(_){case Z:case Y:case U:case H:We="";break;default:b!==H&&(We=" ")}break;case ne:We="\\0";break;case re:We="\\f";break;case ie:We="\\v";break;case q:d+p+c===0&&ge>0&&(Oe=1,_e=1,We="\f"+We);break;case 108:if(d+p+c+ve===0&&C>0)switch(W-C){case 2:_===le&&i.charCodeAt(W-3)===Y&&(ve=_);case 8:w===ue&&(ve=w)}break;case Y:d+p+c===0&&(C=W);break;case Z:p+f+d+c===0&&(_e=1,We+="\r");break;case J:case X:0===p&&(d=d===b?0:0===d?b:d);break;case N:d+p+f===0&&c++;break;case z:d+p+f===0&&c--;break;case L:d+p+c===0&&f--;break;case R:if(d+p+c===0){if(0===O)switch(2*_+3*w){case 533:break;default:k=0,O=1}f++}break;case V:p+f+d+c+C+T===0&&(T=1);break;case K:case $:if(d+c+f>0)break;switch(p){case 0:switch(2*b+3*i.charCodeAt(W+1)){case 235:p=$;break;case 220:Te=W,p=K}break;case K:b===$&&_===K&&Te+2!==W&&(33===i.charCodeAt(Te+2)&&(Ye+=i.substring(Te,W+1)),We="",p=0)}}if(0===p){if(ge+d+c+T===0&&o!==oe&&b!==I)switch(b){case Z:case te:case Q:case ee:case L:case R:if(0===O){switch(_){case U:case H:case B:case F:We+="\0";break;default:We="\0"+We+(b===Z?"":"\0")}_e=1}else switch(b){case R:C+7===W&&108===_&&(C=0),O=++k;break;case L:0==(O=--k)&&(_e=1,We+="\0")}break;case U:case H:switch(_){case ne:case D:case j:case I:case Z:case re:case U:case H:case B:case F:break;default:0===O&&(_e=1,We+="\0")}}Ke+=We,b!==H&&b!==U&&(E=b)}}w=_,_=b,W++}if(Te=Ye.length,we>0&&0===Te&&0===Xe.length&&0===t[0].length==0&&(o!==ae||1===t.length&&(ge>0?Le:Ne)===t[0])&&(Te=t.join(",").length+2),Te>0){if(s=0===ge&&o!==oe?function(e){for(var t,n,i=0,o=e.length,a=Array(o);i1)){if(f=l.charCodeAt(l.length-1),d=n.charCodeAt(0),t="",0!==c)switch(f){case K:case te:case Q:case ee:case H:case R:break;default:t=" "}switch(d){case q:n=t+Le;case te:case Q:case ee:case H:case L:case R:break;case N:n=t+n+Le;break;case Y:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(be>0){n=t+n.substring(8,p-1);break}default:(c<1||s[c-1].length<1)&&(n=t+Le+n)}break;case Z:t="";default:n=p>1&&n.indexOf(":")>0?t+n.replace(x,"$1"+Le+"$2"):t+n+Le}l+=n}a[i]=l.replace(r,"").trim()}return a}(t):t,ke>0&&void 0!==(l=qe(Me,Ye,s,e,me,he,Te,o,a,o))&&0===(Ye=l).length)return Je+Ye+Xe;if(Ye=s.join(",")+"{"+Ye+"}",ye*ve!=0){switch(2!==ye||Ve(Ye,2)||(ve=0),ve){case ue:Ye=Ye.replace(v,":"+A+"$1")+Ye;break;case le:Ye=Ye.replace(m,"::"+P+"input-$1")+Ye.replace(m,"::"+A+"$1")+Ye.replace(m,":"+M+"input-$1")+Ye}ve=0}}return Je+Ye+Xe}function Be(e,t,n){var r=t.trim().split(c),i=r,o=r.length,a=e.length;switch(a){case 0:case 1:for(var s=0,l=0===a?"":e[0]+" ";s0&&ge>0)return i.replace(f,"$1").replace(p,"$1"+Ne);break;default:return e.trim()+i.replace(p,"$1"+e.trim())}default:if(n*ge>0&&i.indexOf("\f")>0)return i.replace(p,(e.charCodeAt(0)===Y?"":"$1")+e.trim())}return e+i}function Ue(e,t,n,r){var u,c=0,p=e+";",f=2*t+3*n+4*r;if(944===f)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),i=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*De){case 0:break;case G:if(110!==e.charCodeAt(10))break;default:for(var o=i.split((i="",s)),a=0,n=0,t=o.length;aV&&p<90||p>96&&p<123||p===W||p===G&&u.charCodeAt(1)!==G))switch(isNaN(parseFloat(u))+(-1!==u.indexOf("("))){case 1:switch(u){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:u+=Re}}c[n++]=u}i+=(0===a?"":",")+c.join(" ")}}return i=r+i+";",1===ye||2===ye&&Ve(i,1)?P+i+i:i}(p);if(0===ye||2===ye&&!Ve(p,1))return p;switch(f){case 1015:return 97===p.charCodeAt(10)?P+p+p:p;case 951:return 116===p.charCodeAt(3)?P+p+p:p;case 963:return 110===p.charCodeAt(5)?P+p+p:p;case 1009:if(100!==p.charCodeAt(4))break;case 969:case 942:return P+p+p;case 978:return P+p+A+p+p;case 1019:case 983:return P+p+A+p+M+p+p;case 883:return p.charCodeAt(8)===G?P+p+p:p.indexOf("image-set(",11)>0?p.replace(C,"$1"+P+"$2")+p:p;case 932:if(p.charCodeAt(4)===G)switch(p.charCodeAt(5)){case 103:return P+"box-"+p.replace("-grow","")+P+p+M+p.replace("grow","positive")+p;case 115:return P+p+M+p.replace("shrink","negative")+p;case 98:return P+p+M+p.replace("basis","preferred-size")+p}return P+p+M+p+p;case 964:return P+p+M+"flex-"+p+p;case 1023:if(99!==p.charCodeAt(8))break;return u=p.substring(p.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),P+"box-pack"+u+P+p+M+"flex-pack"+u+p;case 1005:return o.test(p)?p.replace(i,":"+P)+p.replace(i,":"+A)+p:p;case 1e3:switch(c=(u=p.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(c)){case 226:u=p.replace(w,"tb");break;case 232:u=p.replace(w,"tb-rl");break;case 220:u=p.replace(w,"lr");break;default:return p}return P+p+M+u+p;case 1017:if(-1===p.indexOf("sticky",9))return p;case 975:switch(c=(p=e).length-10,f=(u=(33===p.charCodeAt(c)?p.substring(0,c):p).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(u.charCodeAt(8)<111)break;case 115:p=p.replace(u,P+u)+";"+p;break;case 207:case 102:p=p.replace(u,P+(f>102?"inline-":"")+"box")+";"+p.replace(u,P+u)+";"+p.replace(u,M+u+"box")+";"+p}return p+";";case 938:if(p.charCodeAt(5)===G)switch(p.charCodeAt(6)){case 105:return u=p.replace("-items",""),P+p+P+"box-"+u+M+"flex-"+u+p;case 115:return P+p+M+"flex-item-"+p.replace(k,"")+p;default:return P+p+M+"flex-line-pack"+p.replace("align-content","").replace(k,"")+p}break;case 973:case 989:if(p.charCodeAt(3)!==G||122===p.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?Ue(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):p.replace(u,P+u)+p.replace(u,A+u.replace("fill-",""))+p;break;case 962:if(p=P+p+(102===p.charCodeAt(5)?M+p:"")+p,n+r===211&&105===p.charCodeAt(13)&&p.indexOf("transform",10)>0)return p.substring(0,p.indexOf(";",27)+1).replace(a,"$1"+P+"$2")+p}return p}function Ve(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),i=e.substring(n+1,e.length-1);return Oe(2!==t?r:r.replace(O,"$1"),i,t)}function He(e,t){var n=Ue(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(E," or ($1)").substring(4):"("+t+")"}function qe(e,t,n,r,i,o,a,s,l,u){for(var c,p=0,f=t;p0&&(Re=i.replace(d,o===N?"":"-")),o=1,1===ge?Ne=i:Le=i;var a,s=[Ne];ke>0&&void 0!==(a=qe(Ce,n,s,s,me,he,0,0,0,0))&&"string"==typeof a&&(n=a);var l=ze(Se,s,n,0,0);return ke>0&&void 0!==(a=qe(Te,l,s,s,me,he,l.length,0,0,0))&&"string"!=typeof(l=a)&&(o=0),Re="",Ne="",Le="",ve=0,me=1,he=1,_e*o==0?l:l.replace(r,"").replace(g,"").replace(y,"$1").replace(b,"$1").replace(_," ")}return Ke.use=function e(t){switch(t){case void 0:case null:ke=Ee.length=0;break;default:if("function"==typeof t)Ee[ke++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},y=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0?o=e.filter(function(e){var t=y(e,2)[1];return n.indexOf(t)>-1}):r.length>0&&(o=e.filter(function(e){var t=y(e,2)[1];return-1===r.indexOf(t)})),t.length>0&&(t.forEach(function(e){var t=o.find(function(t){return y(t,2)[1]===e});t&&i.push(t)}),o=o.filter(function(e){var n=y(e,2)[1];return-1===t.indexOf(n)})),i.length?[].concat(i,b(o)):o},x=function(e){function t(e){f(this,t);var n=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={countries:_(s,e.priorityOptions,e.whitelist,e.blacklist)},n}return m(t,e),d(t,[{key:"getCountries",value:function(){var e=this.props,t=e.valueType,n=e.labelType;return this.state.countries.map(function(e){var r=y(e,2),o=r[0],a=r[1];return i.a.createElement("option",{value:t===u?a:o,key:a},n===u?a:o)})}},{key:"getDefaultOption",value:function(){var e=this.props,t=e.showDefaultOption,n=e.defaultOptionLabel;return t?i.a.createElement("option",{value:"",key:"default"},n):null}},{key:"render",value:function(){var e=this.props,t=e.name,n=e.id,r=e.classes,o=e.value,a=e.onChange,s=e.onBlur,l=e.disabled,u=(e.showDefaultOption,e.defaultOptionLabel,e.labelType,e.valueType,e.whitelist,e.blacklist,e.customOptions,e.priorityOptions,v(e,["name","id","classes","value","onChange","onBlur","disabled","showDefaultOption","defaultOptionLabel","labelType","valueType","whitelist","blacklist","customOptions","priorityOptions"])),c=h({},u,{name:t,value:o,onChange:function(e){return a(e.target.value,e)},onBlur:function(e){return s(e)},disabled:l});return n&&(c.id=n),r&&(c.className=r),i.a.createElement("select",c,this.getDefaultOption(),this.getCountries())}}]),t}(r.Component);x.propTypes={value:a.a.oneOfType([a.a.string,a.a.number]),name:a.a.string,id:a.a.string,classes:a.a.string,showDefaultOption:a.a.bool,defaultOptionLabel:a.a.oneOfType([a.a.string,a.a.number]),priorityOptions:a.a.array,onChange:a.a.func,onBlur:a.a.func,labelType:a.a.oneOf([l,u]),valueType:a.a.oneOf([l,u]),whitelist:a.a.array,blacklist:a.a.array,disabled:a.a.bool},x.defaultProps={value:"",name:"rcrs-country",id:"",classes:"",showDefaultOption:!0,defaultOptionLabel:"Select Country",priorityOptions:[],onChange:function(){},onBlur:function(){},labelType:l,valueType:l,whitelist:[],blacklist:[],disabled:!1};var w=function(e){function t(e){f(this,t);var n=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={regions:n.getRegions(e.country)},n.getRegions=n.getRegions.bind(n),n}return m(t,e),d(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.country;if(t!==e.country){var n=this.getRegions(t);this.setState({regions:[].concat(b(n),b(this.getCustomOptions(n)))})}}},{key:"getCustomOptions",value:function(e){var t=this.props.customOptions,n=this.getDuplicates(e);return n.length?(console.error("Error: Duplicate regions present: "+n.toString()+".\nThe above item(s) is/are already getting added to the region dropdown by the library."),[]):t.map(function(e){if(e)return{regionName:e,regionShortCode:e}})}},{key:"getDuplicates",value:function(e){var t=this.props,n=t.customOptions,r=t.valueType===l?"regionName":"regionShortCode";return e.filter(function(e){return-1!==n.indexOf(e[r])}).map(function(e){return e[r]})}},{key:"getRegions",value:function(e){if(!e)return[];var t=this.props.countryValueType===l?0:1,n=[];return s.forEach(function(r){r[t]===e&&(n=r)}),n&&0!==n.length?n[2].split(c).map(function(e){var t=e.split(p),n=y(t,2),r=n[0],i=n[1];return{regionName:r,regionShortCode:void 0===i?null:i}}):(console.error("Error. Unknown country passed: "+e+'. If you\'re passing a country shortcode, be sure to include countryValueType="short" on the RegionDropdown'),[])}},{key:"getRegionList",value:function(){var e=this.props,t=e.labelType,n=e.valueType;return this.state.regions.map(function(e){var r=e.regionName,o=e.regionShortCode,a=t===l?r:o,s=n===l?r:o;return i.a.createElement("option",{value:s,key:r},a)})}},{key:"getDefaultOption",value:function(){var e=this.props,t=e.blankOptionLabel,n=e.showDefaultOption,r=e.defaultOptionLabel;return e.country?n?i.a.createElement("option",{value:""},r):null:i.a.createElement("option",{value:""},t)}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.country,r=e.onChange,o=e.onBlur,a=e.id,s=e.name,l=e.classes,u=e.disabled,c=(e.blankOptionLabel,e.showDefaultOption,e.defaultOptionLabel,e.labelType,e.valueType,e.countryValueType,e.disableWhenEmpty),p=(e.customOptions,v(e,["value","country","onChange","onBlur","id","name","classes","disabled","blankOptionLabel","showDefaultOption","defaultOptionLabel","labelType","valueType","countryValueType","disableWhenEmpty","customOptions"])),f=h({},p,{name:s,value:t,onChange:function(e){return r(e.target.value,e)},onBlur:function(e){return o(e)},disabled:u||c&&""===n});return a&&(f.id=a),l&&(f.className=l),i.a.createElement("select",f,this.getDefaultOption(),this.getRegionList())}}]),t}(r.PureComponent);w.propTypes={country:a.a.string,countryValueType:a.a.oneOf([l,u]),value:a.a.oneOfType([a.a.string,a.a.number]),name:a.a.string,id:a.a.string,classes:a.a.string,blankOptionLabel:a.a.string,showDefaultOption:a.a.bool,defaultOptionLabel:a.a.string,onChange:a.a.func,onBlur:a.a.func,labelType:a.a.string,valueType:a.a.string,disabled:a.a.bool,disableWhenEmpty:a.a.bool,customOptions:a.a.array},w.defaultProps={country:"",value:"",name:"rcrs-region",id:"",classes:"",blankOptionLabel:"-",showDefaultOption:!0,defaultOptionLabel:"Select Region",onChange:function(){},onBlur:function(){},countryValueType:l,labelType:l,valueType:l,disabled:!1,disableWhenEmpty:!1,customOptions:[]}},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,l,u=r(t),c=r(n);if(u&&c){if((s=t.length)!=n.length)return!1;for(a=s;0!==a--;)if(!e(t[a],n[a]))return!1;return!0}if(u!=c)return!1;var p=t instanceof Date,f=n instanceof Date;if(p!=f)return!1;if(p&&f)return t.getTime()==n.getTime();var d=t instanceof RegExp,h=n instanceof RegExp;if(d!=h)return!1;if(d&&h)return t.toString()==n.toString();var m=i(t);if((s=m.length)!==i(n).length)return!1;for(a=s;0!==a--;)if(!o.call(n,m[a]))return!1;for(a=s;0!==a--;)if(!e(t[l=m[a]],n[l]))return!1;return!0}return t!==t&&n!==n}},function(e,t,n){"use strict";var r=n(44),i=n(35);function o(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.init(t,n)}return Object(s.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||b,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r-1?e.replace(/###/g,"."):e}function i(){return!e||"string"===typeof e}for(var o="string"!==typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=e[a]}return i()?{}:{obj:e,k:r(o.shift())}}function k(e,t,n){var r=E(e,t,Object);r.obj[r.k]=n}function O(e,t){var n=E(e,t),r=n.obj,i=n.k;if(r)return r[i]}function T(e,t,n){var r=O(e,n);return void 0!==r?r:O(t,n)}function C(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var P={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function A(e){return"string"===typeof e?e.replace(/[&<>"'\/]/g,function(e){return P[e]}):e}var M="undefined"!==typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,I=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(a.a)(this,t),n=u(this,c(t).call(this)),M&&x.call(Object(l.a)(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,x),Object(s.a)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[e,t];return n&&"string"!==typeof n&&(o=o.concat(n)),n&&"string"===typeof n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split(".")),O(this.data,o)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),k(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!==typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var l=O(this.data,s)||{};r?function e(t,n,r){for(var i in n)i in t?"string"===typeof t[i]||t[i]instanceof String||"string"===typeof n[i]||n[i]instanceof String?r&&(t[i]=n[i]):e(t[i],n[i],r):t[i]=n[i];return t}(l,n,i):l=o({},l,n),k(this.data,s,l),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?o({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(),j={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))}),t}},D={},R=function(e){function t(e){var n,r,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,t),n=u(this,c(t).call(this)),M&&x.call(Object(l.a)(n)),r=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=e,o=Object(l.a)(n),r.forEach(function(e){i[e]&&(o[e]=i[e])}),n.options=s,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=_.create("translator"),n}return f(t,x),Object(s.a)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=t.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return"string"===typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var n=this;if("object"!==Object(r.a)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),void 0===e||null===e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),s=a.key,l=a.namespaces,u=l[l.length-1],c=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(p){var f=t.nsSeparator||this.options.nsSeparator;return u+f+s}return s}var d=this.resolve(e,t),h=d&&d.res,m=d&&d.usedKey||s,v=d&&d.exactUsedKey||s,g=Object.prototype.toString.apply(h),y=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&h&&("string"!==typeof h&&"boolean"!==typeof h&&"number"!==typeof h)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0&&("string"!==typeof y||"[object Array]"!==g)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,t):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var _="[object Array]"===g,x=_?[]:{},w=_?v:m;for(var S in h)if(Object.prototype.hasOwnProperty.call(h,S)){var E="".concat(w).concat(i).concat(S);x[S]=this.translate(E,o({},t,{joinArrays:!1,ns:l})),x[S]===E&&(x[S]=h[S])}h=x}}else if(b&&"string"===typeof y&&"[object Array]"===g)(h=h.join(y))&&(h=this.extendTranslation(h,e,t));else{var k=!1,O=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(k=!0,void 0!==t.count){var T=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(T)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(O=!0,h=s);var C=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(O||k||C){this.logger.log(C?"updateKey":"missingKey",c,u,s,C?t.defaultValue:h);var P=[],A=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&A&&A[0])for(var M=0;M1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),u=l.key;n=u;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var p=void 0!==s.count&&"string"!==typeof s.count,f=void 0!==s.context&&"string"===typeof s.context&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(e){a.isValidLookup(t)||(o=e,!D["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(D["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for namespace "').concat(o,'" for languages "').concat(d.join(", "),"\" won't get resolved as namespace was not yet loaded"),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(function(n){if(!a.isValidLookup(t)){i=n;var o,l,c=u,d=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(d,u,n,e,s);else p&&(o=a.pluralResolver.getSuffix(n,s.count)),p&&f&&d.push(c+o),f&&d.push(c+="".concat(a.options.contextSeparator).concat(s.context)),p&&d.push(c+=o);for(;l=d.pop();)a.isValidLookup(t)||(r=l,t=a.getResource(n,e,l,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}]),t}();function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){Object(a.a)(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=_.create("languageUtils")}return Object(s.a)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"===typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=L(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=L(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=L(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"===typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isWhitelisted(e)?i.push(e):n.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"===typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"===typeof e&&o(this.formatLanguageCode(e)),r.forEach(function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))}),i}}]),e}(),z=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],B={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};var F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.languageUtils=t,this.options=n,this.logger=_.create("pluralResolver"),this.rules=function(){var e={};return z.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:B[t.fc]}})}),e}()}return Object(s.a)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=this,r=[],i=this.getRule(e);return i?(i.numbers.forEach(function(i){var o=n.getSuffix(e,i);r.push("".concat(t).concat(o))}),r):r}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),o=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"===typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e),this.logger=_.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Object(s.a)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:A,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?C(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?C(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?C(t.nestingPrefix):t.nestingPrefixEscaped||C("$t("),this.nestingSuffix=t.nestingSuffix?C(t.nestingSuffix):t.nestingSuffixEscaped||C(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var i=T(t,l,e);return s.alwaysFormat?s.format(i,void 0,n):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),u=o.join(s.formatSeparator).trim();return s.format(T(t,l,a),u,n,r)};this.resetRegExp();var p=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;i=this.regexpUnescape.exec(e);){if(void 0===(o=c(i[1].trim())))if("function"===typeof p){var f=p(e,i,r);o="string"===typeof f?f:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"===typeof o||this.useRawValueToEscape||(o=S(o));if(e=e.replace(i[0],u(o)),this.regexpUnescape.lastIndex=0,++a>=this.maxReplaces)break}for(a=0;i=this.regexp.exec(e);){if(void 0===(o=c(i[1].trim())))if("function"===typeof p){var d=p(e,i,r);o="string"===typeof d?d:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"===typeof o||this.useRawValueToEscape||(o=S(o));if(o=this.escapeValue?u(this.escape(o)):u(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var n,r,i,a=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=o({},s);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0],i=(i=this.interpolate(i,l)).replace(/'/g,'"');try{l=JSON.parse(i),t&&(l=o({},t,l))}catch(a){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),a),"".concat(e).concat(n).concat(i)}return delete l.defaultValue,e}for(l.applyPostProcessor=!1,delete l.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],p=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map(function(e){return e.trim()}),d=(i=f,Object(h.a)(i)||Object(m.a)(i)||Object(v.a)(i)||Object(g.a)());n[1]=d[0],c=d.slice(1),p=!0}if((r=t(u.call(this,n[1].trim(),l),l))&&n[0]===e&&"string"!==typeof r)return r;"string"!==typeof r&&(r=S(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),p&&(r=c.reduce(function(e,t){return a.format(e,t,s.lng,s)},r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();var V=function(e){function t(e,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,t),i=u(this,c(t).call(this)),M&&x.call(Object(l.a)(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=o,i.logger=_.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,o.backend,o),i}return f(t,x),Object(s.a)(t,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o=[],a=[],s=[],l=[];return e.forEach(function(e){var r=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),l.indexOf(t)<0&&l.push(t)))}),r||s.push(e)}),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=Object(y.a)(r,2),o=i[0],a=i[1];t&&this.emit("failedLoading",o,a,t),n&&this.store.addResourceBundle(o,a,n),this.state[e]=t?-1:2;var s={};this.queue.forEach(function(n){!function(e,t,n,r){var i=E(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}(n.loaded,[o],a),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach(function(e){s[e]||(s[e]=[]),n.loaded[e].length&&n.loaded[e].forEach(function(t){s[e].indexOf(t)<0&&s[e].push(t)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,function(s,l){s&&l&&i<5?setTimeout(function(){r.read.call(r,e,t,n,i+1,2*o,a)},o):a(s,l)}):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"===typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"===typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=Object(y.a)(r,2),o=i[0],a=i[1];this.read(o,a,"read",void 0,void 0,function(r,i){r&&t.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(o," failed"),r),!r&&i&&t.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(o),i),t.loaded(e,r,i)})}},{key:"saveMissing",value:function(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" for namespace "').concat(t,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):void 0!==n&&null!==n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,o({},a,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}();function H(e){return"string"===typeof e.ns&&(e.ns=[e.ns]),"string"===typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"===typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function q(){}var G=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(Object(a.a)(this,t),e=u(this,c(t).call(this)),M&&x.call(Object(l.a)(e)),e.options=H(n),e.services={},e.logger=_,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),u(e,Object(l.a)(e));setTimeout(function(){e.init(n,r)},0)}return e}return f(t,x),Object(s.a)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"===typeof e?new e:e:null}if("function"===typeof t&&(n=t,t={}),this.options=o({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(r.a)(e[1])&&(t=e[1]),"string"===typeof e[1]&&(t.defaultValue=e[1]),"string"===typeof e[2]&&(t.tDescription=e[2]),"object"===Object(r.a)(e[2])||"object"===Object(r.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3}},this.options,H(t)),this.format=this.options.interpolation.format,n||(n=q),!this.options.isClone){this.modules.logger?_.init(i(this.modules.logger),this.options):_.init(null,this.options);var a=new N(this.options);this.store=new I(this.options.resources,this.options);var s=this.services;s.logger=_,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new F(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new U(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new V(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:q,r="string"===typeof e?e:this.language;if("function"===typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var i=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){i.indexOf(e)<0&&i.push(e)})};if(r)o(r);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return o(e)});this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(i,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=w();return e||(e=this.languages),t||(t=this.options.ns),n||(n=q),this.services.backendConnector.reload(e,t,function(e){r.resolve(),n(e)}),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&j.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=w();this.emit("languageChanging",e);var i=function(e){e&&(n.language||(n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e)),n.translator.language||n.translator.changeLanguage(e),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(e)),n.loadResources(e,function(i){!function(e,i){i?(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})}(i,e)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,i=function e(t,i){var a;if("object"!==Object(r.a)(i)){for(var s=arguments.length,l=new Array(s>2?s-2:0),u=2;u0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,i=o({},this.options,n,{isClone:!0}),a=new t(i);return["store","services","language"].forEach(function(t){a[t]=e[t]}),a.services=o({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new R(a.services,a.options),a.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(e){s.headers[e]={}}),r.forEach(["post","put","patch"],function(e){s.headers[e]=r.merge(o)}),e.exports=s}).call(this,n(71))},function(e,t,n){"use strict";var r=n(52),i=n(259),o=n(164),a=n(261),s=n(264),l=n(265),u=n(168);e.exports=function(e){return new Promise(function(t,c){var p=e.data,f=e.headers;r.isFormData(p)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password||"";f.Authorization="Basic "+btoa(h+":"+m)}var v=a(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),o(v,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};i(t,c,r),d=null}},d.onabort=function(){d&&(c(u("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){c(u("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(u(t,e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var g=n(266),y=(e.withCredentials||l(v))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&r.forEach(f,function(e,t){"undefined"===typeof p&&"content-type"===t.toLowerCase()?delete f[t]:d.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(b){if("json"!==e.responseType)throw b}"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),c(e),d=null)}),void 0===p&&(p=null),d.send(p)})}},function(e,t,n){"use strict";var r=n(260);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";var r=n(52);e.exports=function(e,t){t=t||{};var n={},i=["url","method","params","data"],o=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,function(e){"undefined"!==typeof t[e]&&(n[e]=t[e])}),r.forEach(o,function(i){r.isObject(t[i])?n[i]=r.deepMerge(e[i],t[i]):"undefined"!==typeof t[i]?n[i]=t[i]:r.isObject(e[i])?n[i]=r.deepMerge(e[i]):"undefined"!==typeof e[i]&&(n[i]=e[i])}),r.forEach(a,function(r){"undefined"!==typeof t[r]?n[r]=t[r]:"undefined"!==typeof e[r]&&(n[r]=e[r])});var s=i.concat(o).concat(a),l=Object.keys(t).filter(function(e){return-1===s.indexOf(e)});return r.forEach(l,function(r){"undefined"!==typeof t[r]?n[r]=t[r]:"undefined"!==typeof e[r]&&(n[r]=e[r])}),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simulations=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];o=!!e},t.default=function(e){var t=e.className,n=e.parsed;return function e(t,n){var r=[];var i=n.plain,o=n.selects,a=n.medias,u=n.supports;i&&r.push(l({style:i,selector:s(t)}));o&&Object.keys(o).forEach(function(e){return r.push(l({style:o[e],selector:s(t,e)}))});a&&Object.keys(a).forEach(function(n){return r.push(n+"{"+e(t,a[n]).join("")+"}")});u&&Object.keys(u).forEach(function(n){return r.push(n+"{"+e(t,u[n]).join("")+"}")});return r}(t,n)};var r=n(174),i=n(289),o=!1;var a=/[(),]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\//g;function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e&&t)return t.replace(/\&/g,"");if(e&&!t)return"."+e;var n=function(e){if(-1===e.indexOf(","))return[e];for(var t,n=[],r=[],i=0;t=a.exec(e);)switch(t[0]){case"(":i++;break;case")":i--;break;case",":if(i)break;n.push(t.index)}for(t=n.length;t--;)r.unshift(e.slice(n[t]+1)),e=e.slice(0,n[t]);return r.unshift(e),r}(t).map(function(t){return t.indexOf("&")>=0?t.replace(/\&/gm,"."+e):"."+e+t}).join(",");return o&&/^\&\:/.exec(t)&&!/\s/.exec(t)&&(n+=",."+e+"[data-simulate-"+function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.toLowerCase().replace(/[^a-z0-9]/g,t)}(t)+"]"),n}function l(e){var t=(0,i.prefixes)((0,i.fallbacks)((0,i.contentWrap)(e)));return t.selector+"{"+(0,r.createMarkupForStyles)(t.style)+"}"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processStyleName=void 0,t.createMarkupForStyles=function(e,t){var n="";for(var i in e){var o=0===i.indexOf("--");if(e.hasOwnProperty(i)&&"label"!==i){var a=e[i];0,null!=a&&(o?n+=i+":"+a+";":(n+=s(i)+":",n+=(0,r.default)(i,a,t)+";"))}}return n||null};a(n(281));var r=a(n(283)),i=a(n(286)),o=a(n(288));a(n(175));function a(e){return e&&e.__esModule?e:{default:e}}var s=t.processStyleName=(0,o.default)(i.default)},function(e,t,n){"use strict";var r=n(285);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.element,t=this.origin(e),n=[],r={};return this.animations.forEach(function(e){var i=e.prop,o=e.unit||s[i]||"",u=(0,a.default)(e.stops)(t);l.indexOf(i)>-1?n.push(i+"("+u+o+")"):r[i]=""+u+o}),n.length&&(r.transform=n.join(" ")),r}},{key:"applyStyles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.element,t=this.getStyles(e);Object.keys(t).forEach(function(n){return e.style[n]=t[n]})}}]),e}();t.default=u,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var i=n(317);t.Motion=r(i);var o=n(319);t.StaggeredMotion=r(o);var a=n(320);t.TransitionMotion=r(a);var s=n(322);t.spring=r(s);var l=n(179);t.presets=r(l);var u=n(110);t.stripStyle=r(u);var c=n(323);t.reorderKeys=r(c)},function(e,t,n){"use strict";t.__esModule=!0,t.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=t.default},function(e,t,n){var r=n(1),i=/-([a-z])/g,o=/^--[a-zA-Z0-9-]+$|^[^-]+$/;var a=r.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,camelCase:function(e){if("string"!==typeof e)throw new TypeError("First argument must be a string");return o.test(e)?e:e.toLowerCase().replace(i,function(e,t){return t.toUpperCase()})},invertObject:function(e,t){if(!e||"object"!==typeof e)throw new TypeError("First argument must be an object");var n,r,i="function"===typeof t,o={},a={};for(n in e)r=e[n],i&&(o=t(n,r))&&2===o.length?a[o[0]]=o[1]:"string"===typeof r&&(a[r]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}}},function(e,t,n){for(var r,i=n(340).CASE_SENSITIVE_TAG_NAMES,o={},a=0,s=i.length;a=0||(i[n]=e[n]);return i}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var o=i.default.Children.only(n);return i.default.cloneElement(o,r)},r}(i.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,a.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(5))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(5)),i=s(n(1)),o=n(183),a=n(347);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["component","childFactory"]),o=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:i.default.createElement(t,r,o)},r}(i.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,o.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){},function(e,t,n){e.exports=function(){"use strict";var e,t,n;function r(r,i){if(e)if(t){var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",a={};e(a),(n=i(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else t=i;else e=i}return r(0,function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=r;function r(e,t,n,r){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=n,this.p2y=r}r.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},r.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},r.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},r.prototype.solveCurveX=function(e,t){var n,r,i,o,a;for(void 0===t&&(t=1e-6),i=e,a=0;a<8;a++){if(o=this.sampleCurveX(i)-e,Math.abs(o)(r=1))return r;for(;no?n=i:r=i,i=.5*(r-n)+n}return i},r.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var i=o;function o(e,t){this.x=e,this.y=t}function a(e,t,r,i){var o=new n(e,t,r,i);return function(e){return o.solve(e)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=n*this.x+t*this.y;return this.x=t*this.x-n*this.y,this.y=r,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),i=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=t.x+n*(this.x-t.x)-r*(this.y-t.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e};var s=a(.25,.1,.25,1);function l(e,t,n){return Math.min(n,Math.max(t,e))}function u(e,t,n){var r=n-t,i=((e-t)%r+r)%r+t;return i===t?n:i}function c(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function h(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function m(e,t){e.forEach(function(e){t[e]&&(t[e]=t[e].bind(t))})}function v(e,t){return-1!==e.indexOf(t,e.length-t.length)}function g(e,t,n){var r={};for(var i in e)r[i]=t.call(n||this,e[i],i,e);return r}function y(e,t,n){var r={};for(var i in e)t.call(n||this,e[i],i,e)&&(r[i]=e[i]);return r}function b(e){return Array.isArray(e)?e.map(b):"object"==typeof e&&e?g(e,b):e}var _={};function x(e){_[e]||("undefined"!=typeof console&&console.warn(e),_[e]=!0)}function w(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function S(e){for(var t=0,n=0,r=e.length,i=r-1,o=void 0,a=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(e,n,r,i){var o=r||i;return t[n]=!o||o.toLowerCase(),""}),t["max-age"]){var n=parseInt(t["max-age"],10);isNaN(n)?delete t["max-age"]:t["max-age"]=n}return t}var O=null;function T(e){if(null==O){var t=e.navigator?e.navigator.userAgent:null;O=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return O}function C(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(e){return!1}}var P,A,M,I,j=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),D=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,R=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,L={now:j,frame:function(e){var t=D(e);return{cancel:function(){return R(t)}}},getImageData:function(e,t){void 0===t&&(t=0);var n=self.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=e.width,n.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return P||(P=self.document.createElement("a")),P.href=e,P.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==A&&(A=self.matchMedia("(prefers-reduced-motion: reduce)")),A.matches)}},N={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},z={supported:!1,testSupport:function(e){!B&&I&&(F?U(e):M=e)}},B=!1,F=!1;function U(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,I),e.isContextLost())return;z.supported=!0}catch(e){}e.deleteTexture(t),B=!0}self.document&&((I=self.document.createElement("img")).onload=function(){M&&U(M),M=null,F=!0},I.onerror=function(){B=!0,M=null},I.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var V="01",H=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function q(e){return 0===e.indexOf("mapbox:")}H.prototype._createSkuToken=function(){var e=function(){for(var e="",t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",V,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},H.prototype.normalizeStyleURL=function(e,t){if(!q(e))return e;var n=Z(e);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},H.prototype.normalizeGlyphsURL=function(e,t){if(!q(e))return e;var n=Z(e);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},H.prototype.normalizeSourceURL=function(e,t){if(!q(e))return e;var n=Z(e);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||t)},H.prototype.normalizeSpriteURL=function(e,t,n,r){var i=Z(e);return q(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+n,this._makeAPIURL(i,this._customAccessToken||r)):(i.path+=""+t+n,Y(i))},H.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!q(e))return e;var n=Z(e);n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,(L.devicePixelRatio>=2||512===t?"@2x":"")+(z.supported?".webp":"$1")),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path;var r=this._customAccessToken||function(e){for(var t=0,n=e;t=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(e){x("Unable to write to LocalStorage")}},J.prototype.processRequests=function(e){},J.prototype.postEvent=function(e,t,n,r){var i=this;if(N.EVENTS_URL){var o=Z(N.EVENTS_URL);o.params.push("access_token="+(r||N.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:V,userId:this.anonId},s=t?c(a,t):a,l={url:Y(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=be(l,function(e){i.pendingRequest=null,n(e),i.saveEventData(),i.processRequests(r)})}},J.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var $,Q,ee=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.postMapLoadEvent=function(e,t,n,r){this.skuToken=n,(N.EVENTS_URL&&r||N.ACCESS_TOKEN&&Array.isArray(e)&&e.some(function(e){return q(e)||W(e)}))&&this.queueRequest({id:t,timestamp:Date.now()},r)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),r=n.id,i=n.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),h(this.anonId)||(this.anonId=d()),this.postEvent(i,{skuToken:this.skuToken},function(e){e||r&&(t.success[r]=!0)},e))}},t}(J),te=new(function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.postTurnstileEvent=function(e,t){N.EVENTS_URL&&N.ACCESS_TOKEN&&Array.isArray(e)&&e.some(function(e){return q(e)||W(e)})&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=X(N.ACCESS_TOKEN),r=n?n.u:N.ACCESS_TOKEN,i=r!==this.eventData.tokenU;h(this.anonId)||(this.anonId=d(),i=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||a.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},function(e){e||(t.eventData.lastSuccess=o,t.eventData.tokenU=r)},e)}},t}(J)),ne=te.postTurnstileEvent.bind(te),re=new ee,ie=re.postMapLoadEvent.bind(re),oe=500,ae=50;function se(){self.caches&&!$&&($=self.caches.open("mapbox-tiles"))}function le(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var ue,ce=1/0;function pe(){return null==ue&&(ue=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),ue}var fe={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(fe);var de,he,me=function(e){function t(t,n,r){401===n&&W(r)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,t),this.status=n,this.url=r,this.name=this.constructor.name,this.message=t}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error),ve=E()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href},ge=function(e,t){if(!(/^file:/.test(n=e.url)||/^file:/.test(ve())&&!/^\w+:/.test(n))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return function(e,t){var n,r=new self.AbortController,i=new self.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:ve(),signal:r.signal}),o=!1,a=!1,s=(n=i.url).indexOf("sku=")>0&&W(n);"json"===e.type&&i.headers.set("Accept","application/json");var l=function(n,r,o){if(!a){if(n&&"SecurityError"!==n.message&&x(n),r&&o)return u(r);var l=Date.now();self.fetch(i).then(function(n){if(n.ok){var r=s?n.clone():null;return u(n,r,l)}return t(new me(n.statusText,n.status,e.url))}).catch(function(e){20!==e.code&&t(new Error(e.message))})}},u=function(n,r,s){("arrayBuffer"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then(function(e){a||(r&&s&&function(e,t,n){if(se(),$){var r={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach(function(e,t){return r.headers.set(t,e)});var i=k(t.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&r.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-n<42e4||function(e,t){if(void 0===Q)try{new Response(new ReadableStream),Q=!0}catch(e){Q=!1}Q?t(e.body):e.blob().then(t)}(t,function(t){var n=new self.Response(t,r);se(),$&&$.then(function(t){return t.put(le(e.url),n)}).catch(function(e){return x(e.message)})}))}}(i,r,s),o=!0,t(null,e,n.headers.get("Cache-Control"),n.headers.get("Expires")))}).catch(function(e){a||t(new Error(e.message))})};return s?function(e,t){if(se(),!$)return t(null);var n=le(e.url);$.then(function(e){e.match(n).then(function(r){var i=function(e){if(!e)return!1;var t=new Date(e.headers.get("Expires")||0),n=k(e.headers.get("Cache-Control")||"");return t>Date.now()&&!n["no-cache"]}(r);e.delete(n),i&&e.put(n,r.clone()),t(null,r,i)}).catch(t)}).catch(t)}(i,l):l(null,null),{cancel:function(){a=!0,o||r.abort()}}}(e,t);if(E()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var n;return function(e,t){var n=new self.XMLHttpRequest;for(var r in n.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(n.responseType="arraybuffer"),e.headers)n.setRequestHeader(r,e.headers[r]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=function(){t(new Error(n.statusText))},n.onload=function(){if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){var r=n.response;if("json"===e.type)try{r=JSON.parse(n.response)}catch(e){return t(e)}t(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else t(new me(n.statusText,n.status,e.url))},n.send(e.body),{cancel:function(){return n.abort()}}}(e,t)},ye=function(e,t){return ge(c(e,{type:"arrayBuffer"}),t)},be=function(e,t){return ge(c(e,{method:"POST"}),t)};function _e(e,t,n){n[e]&&-1!==n[e].indexOf(t)||(n[e]=n[e]||[],n[e].push(t))}function xe(e,t,n){if(n&&n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}de=[],he=0;var we=function(e,t){void 0===t&&(t={}),c(this,t),this.type=e},Se=function(e){function t(t,n){void 0===n&&(n={}),e.call(this,"error",c({error:t},n))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t}(we),Ee=function(){};Ee.prototype.on=function(e,t){return this._listeners=this._listeners||{},_e(e,t,this._listeners),this},Ee.prototype.off=function(e,t){return xe(e,t,this._listeners),xe(e,t,this._oneTimeListeners),this},Ee.prototype.once=function(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},_e(e,t,this._oneTimeListeners),this},Ee.prototype.fire=function(e,t){"string"==typeof e&&(e=new we(e,t||{}));var n=e.type;if(this.listens(n)){e.target=this;for(var r=0,i=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];r0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},Ee.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var ke={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Oe=function(e,t,n,r){this.message=(e?e+": ":"")+n,r&&(this.identifier=r),null!=t&&t.__line__&&(this.line=t.__line__)};function Te(e){var t=e.value;return t?[new Oe(e.key,t,"constants have been deprecated as of v8")]:[]}function Ce(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Ge=[je,De,Re,Le,Ne,Ue,ze,He(Be),Ve];function We(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!We(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var n=0,r=Ge;n255?255:e}function i(e){return r("%"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function o(e){return(t="%"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))<0?0:t>1?1:t;var t}function a(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}try{t.parseCSSColor=function(e){var t,s=e.replace(/ /g,"").toLowerCase();if(s in n)return n[s].slice();if("#"===s[0])return 4===s.length?(t=parseInt(s.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===s.length&&(t=parseInt(s.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),p=s.substr(l+1,u-(l+1)).split(","),f=1;switch(c){case"rgba":if(4!==p.length)return null;f=o(p.pop());case"rgb":return 3!==p.length?null:[i(p[0]),i(p[1]),i(p[2]),f];case"hsla":if(4!==p.length)return null;f=o(p.pop());case"hsl":if(3!==p.length)return null;var d=(parseFloat(p[0])%360+360)%360/360,h=o(p[1]),m=o(p[2]),v=m<=.5?m*(h+1):m+h-m*h,g=2*m-v;return[r(255*a(g,v,d+1/3)),r(255*a(g,v,d)),r(255*a(g,v,d-1/3)),f];default:return null}}return null}}catch(e){}}).parseCSSColor,Xe=function(e,t,n,r){void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r};Xe.parse=function(e){if(e){if(e instanceof Xe)return e;if("string"==typeof e){var t=Ye(e);if(t)return new Xe(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},Xe.prototype.toString=function(){var e=this.toArray(),t=e[1],n=e[2],r=e[3];return"rgba("+Math.round(e[0])+","+Math.round(t)+","+Math.round(n)+","+r+")"},Xe.prototype.toArray=function(){var e=this.a;return 0===e?[0,0,0,0]:[255*this.r/e,255*this.g/e,255*this.b/e,e]},Xe.black=new Xe(0,0,0,1),Xe.white=new Xe(1,1,1,1),Xe.transparent=new Xe(0,0,0,0),Xe.red=new Xe(1,0,0,1);var Je=function(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Je.prototype.compare=function(e,t){return this.collator.compare(e,t)},Je.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var $e=function(e,t,n,r,i){this.text=e,this.image=t,this.scale=n,this.fontStack=r,this.textColor=i},Qe=function(e){this.sections=e};Qe.fromString=function(e){return new Qe([new $e(e,null,null,null,null)])},Qe.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length})},Qe.factory=function(e){return e instanceof Qe?e:Qe.fromString(e)},Qe.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(e){return e.text}).join("")},Qe.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[e,t,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[e,t,n,r]:[e,t,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function nt(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Xe)return!0;if(e instanceof Je)return!0;if(e instanceof Qe)return!0;if(e instanceof et)return!0;if(Array.isArray(e)){for(var t=0,n=e;t2){var s=e[1];if("string"!=typeof s||!(s in st)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=st[s],r++}else o=Be;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],r++}n=He(o,a)}else n=st[i];for(var l=[];r1)&&t.push(r)}}return t.concat(this.args.map(function(e){return e.serialize()}))};var ut=function(e){this.type=Ue,this.sections=e};ut.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[1];if(!Array.isArray(n)&&"object"==typeof n)return t.error("First argument must be an image or text section.");for(var r=[],i=!1,o=1;o<=e.length-1;++o){var a=e[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,De)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,He(Re))))return null;var u=null;if(a["text-color"]&&!(u=t.parse(a["text-color"],1,Ne)))return null;var c=r[r.length-1];c.scale=s,c.font=l,c.textColor=u}else{var p=t.parse(e[o],1,Be);if(!p)return null;var f=p.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:p,scale:null,font:null,textColor:null})}}return new ut(r)},ut.prototype.evaluate=function(e){return new Qe(this.sections.map(function(t){var n=t.content.evaluate(e);return rt(n)===Ve?new $e("",n,null,null,null):new $e(it(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))},ut.prototype.eachChild=function(e){for(var t=0,n=this.sections;t-1),n},ct.prototype.eachChild=function(e){e(this.input)},ct.prototype.outputDefined=function(){return!1},ct.prototype.serialize=function(){return["image",this.input.serialize()]};var pt={"to-boolean":Le,"to-color":Ne,"to-number":De,"to-string":Re},ft=function(e,t){this.type=e,this.args=t};ft.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[0];if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");for(var r=pt[n],i=[],o=1;o4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":tt(t[0],t[1],t[2],t[3])))return new Xe(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new at(n||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=t[2]||e[1]<=t[1]||e[3]>=t[3])}function bt(e,t){var n=(180+e[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,i=Math.pow(2,t.z);return[Math.round(n*i*8192),Math.round(r*i*8192)]}function _t(e,t,n){return t[1]>e[1]!=n[1]>e[1]&&e[0]<(n[0]-t[0])*(e[1]-t[1])/(n[1]-t[1])+t[0]}function xt(e,t){for(var n,r,i,o,a,s,l,u=!1,c=0,p=t.length;c0&&s<0||a<0&&s>0}function Et(e,t,n){for(var r=0,i=n;rn[2]){var i=.5*r,o=e[0]-n[0]>i?-r:n[0]-e[0]>i?r:0;0===o&&(o=e[0]-n[2]>i?-r:n[2]-e[0]>i?r:0),e[0]+=o}gt(t,e)}function At(e,t,n,r){for(var i=8192*Math.pow(2,r.z),o=[8192*r.x,8192*r.y],a=[],s=0,l=e;s=0)return!1;var n=!0;return e.eachChild(function(e){n&&!Rt(e,t)&&(n=!1)}),n}It.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(nt(e[1])){var n=e[1];if("FeatureCollection"===n.type)for(var r=0;rt))throw new at("Input is not a number.");o=a-1}return 0}Nt.prototype.parse=function(e,t,n,r,i){return void 0===i&&(i={}),t?this.concat(t,n,r)._parse(e,i):this._parse(e,i)},Nt.prototype._parse=function(e,t){function n(e,t,n){return"assert"===n?new lt(t,[e]):"coerce"===n?new ft(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=e[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var o=i.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=n(o,a,t.typeAnnotation||"coerce");else o=n(o,a,t.typeAnnotation||"assert")}if(!(o instanceof ot)&&"resolvedImage"!==o.type.kind&&function e(t){if(t instanceof Lt)return e(t.boundExpression);if(t instanceof mt&&"error"===t.name)return!1;if(t instanceof vt)return!1;if(t instanceof It)return!1;var n=t instanceof ft||t instanceof lt,r=!0;return t.eachChild(function(t){r=n?r&&e(t):r&&t instanceof ot}),!!r&&jt(t)&&Rt(t,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new ht;try{o=new ot(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof e+" instead.")},Nt.prototype.concat=function(e,t,n){var r="number"==typeof e?this.path.concat(e):this.path,i=n?this.scope.concat(n):this.scope;return new Nt(this.registry,r,t||null,i,this.errors)},Nt.prototype.error=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=""+this.key+t.map(function(e){return"["+e+"]"}).join("");this.errors.push(new Me(r,e))},Nt.prototype.checkSubtype=function(e,t){var n=We(e,t);return n&&this.error(n),n};var Bt=function(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var r=0,i=n;r=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=t.parse(s,u,i);if(!c)return null;i=i||c.type,r.push([a,c])}return new Bt(i,n,r)},Bt.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;return r>=t[i-1]?n[i-1].evaluate(e):n[zt(t,r)].evaluate(e)},Bt.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Ut=Object.freeze({__proto__:null,number:Ft,color:function(e,t,n){return new Xe(Ft(e.r,t.r,n),Ft(e.g,t.g,n),Ft(e.b,t.b,n),Ft(e.a,t.a,n))},array:function(e,t,n){return e.map(function(e,r){return Ft(e,t[r],n)})}}),Vt=6/29*3*(6/29),Ht=Math.PI/180,qt=180/Math.PI;function Gt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Vt+4/29}function Wt(e){return e>6/29?e*e*e:Vt*(e-4/29)}function Kt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Zt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Yt(e){var t=Zt(e.r),n=Zt(e.g),r=Zt(e.b),i=Gt((.4124564*t+.3575761*n+.1804375*r)/.95047),o=Gt((.2126729*t+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-Gt((.0193339*t+.119192*n+.9503041*r)/1.08883)),alpha:e.a}}function Xt(e){var t=(e.l+16)/116,n=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=1*Wt(t),n=.95047*Wt(n),r=1.08883*Wt(r),new Xe(Kt(3.2404542*n-1.5371385*t-.4985314*r),Kt(-.969266*n+1.8760108*t+.041556*r),Kt(.0556434*n-.2040259*t+1.0572252*r),e.alpha)}function Jt(e,t,n){var r=t-e;return e+n*(r>180||r<-180?r-360*Math.round(r/360):r)}var $t={forward:Yt,reverse:Xt,interpolate:function(e,t,n){return{l:Ft(e.l,t.l,n),a:Ft(e.a,t.a,n),b:Ft(e.b,t.b,n),alpha:Ft(e.alpha,t.alpha,n)}}},Qt={forward:function(e){var t=Yt(e),n=t.l,r=t.a,i=t.b,o=Math.atan2(i,r)*qt;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:e.a}},reverse:function(e){var t=e.h*Ht,n=e.c;return Xt({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})},interpolate:function(e,t,n){return{h:Jt(e.h,t.h,n),c:Ft(e.c,t.c,n),l:Ft(e.l,t.l,n),alpha:Ft(e.alpha,t.alpha,n)}}},en=Object.freeze({__proto__:null,lab:$t,hcl:Qt}),tn=function(e,t,n,r,i){this.type=e,this.operator=t,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=i;o1}))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,De)))return null;var l=[],u=null;"interpolate-hcl"===n||"interpolate-lab"===n?u=Ne:t.expectedType&&"value"!==t.expectedType.kind&&(u=t.expectedType);for(var c=0;c=p)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);var m=t.parse(f,h,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new tn(u,n,r,i,l):t.error("Type "+qe(u)+" is not interpolatable.")},tn.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;if(r>=t[i-1])return n[i-1].evaluate(e);var o=zt(t,r),a=tn.interpolationFactor(this.interpolation,r,t[o],t[o+1]),s=n[o].evaluate(e),l=n[o+1].evaluate(e);return"interpolate"===this.operator?Ut[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?Qt.reverse(Qt.interpolate(Qt.forward(s),Qt.forward(l),a)):$t.reverse($t.interpolate($t.forward(s),$t.forward(l),a))},tn.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t=n.length)throw new at("Array index out of bounds: "+t+" > "+(n.length-1)+".");if(t!==Math.floor(t))throw new at("Array index must be an integer, but found "+t+" instead.");return n[t]},an.prototype.eachChild=function(e){e(this.index),e(this.input)},an.prototype.outputDefined=function(){return!1},an.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var sn=function(e,t){this.type=Le,this.needle=e,this.haystack=t};sn.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Be),r=t.parse(e[2],2,Be);return n&&r?Ke(n.type,[Le,Re,De,je,Be])?new sn(n,r):t.error("Expected first argument to be of type boolean, string, number or null, but found "+qe(n.type)+" instead"):null},sn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!n)return!1;if(!Ze(t,["boolean","string","number","null"]))throw new at("Expected first argument to be of type boolean, string, number or null, but found "+qe(rt(t))+" instead.");if(!Ze(n,["string","array"]))throw new at("Expected second argument to be of type array or string, but found "+qe(rt(n))+" instead.");return n.indexOf(t)>=0},sn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},sn.prototype.outputDefined=function(){return!0},sn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ln=function(e,t,n){this.type=De,this.needle=e,this.haystack=t,this.fromIndex=n};ln.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Be),r=t.parse(e[2],2,Be);if(!n||!r)return null;if(!Ke(n.type,[Le,Re,De,je,Be]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+qe(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,De);return i?new ln(n,r,i):null}return new ln(n,r)},ln.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Ze(t,["boolean","string","number","null"]))throw new at("Expected first argument to be of type boolean, string, number or null, but found "+qe(rt(t))+" instead.");if(!Ze(n,["string","array"]))throw new at("Expected second argument to be of type array or string, but found "+qe(rt(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)},ln.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},ln.prototype.outputDefined=function(){return!1},ln.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var un=function(e,t,n,r,i,o){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};un.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var n,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,rt(f)))return null}else n=rt(f);if(void 0!==i[String(f)])return u.error("Branch labels must be unique.");i[String(f)]=o.length}var d=t.parse(l,a,r);if(!d)return null;r=r||d.type,o.push(d)}var h=t.parse(e[1],1,Be);if(!h)return null;var m=t.parse(e[e.length-1],e.length-1,r);return m?"value"!==h.type.kind&&t.concat(1).checkSubtype(n,h.type)?null:new un(n,r,h,i,o,m):null},un.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(rt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},un.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},un.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})&&this.otherwise.outputDefined()},un.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Be),r=t.parse(e[2],2,De);if(!n||!r)return null;if(!Ke(n.type,[He(Be),Re,Be]))return t.error("Expected first argument to be of type array or string, but found "+qe(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,De);return i?new pn(n.type,n,r,i):null}return new pn(n.type,n,r)},pn.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Ze(t,["string","array"]))throw new at("Expected first argument to be of type array or string, but found "+qe(rt(t))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)},pn.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var mn=hn("==",function(e,t,n){return t===n},dn),vn=hn("!=",function(e,t,n){return t!==n},function(e,t,n,r){return!dn(0,t,n,r)}),gn=hn("<",function(e,t,n){return t",function(e,t,n){return t>n},function(e,t,n,r){return r.compare(t,n)>0}),bn=hn("<=",function(e,t,n){return t<=n},function(e,t,n,r){return r.compare(t,n)<=0}),_n=hn(">=",function(e,t,n){return t>=n},function(e,t,n,r){return r.compare(t,n)>=0}),xn=function(e,t,n,r,i){this.type=Re,this.number=e,this.locale=t,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i};xn.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,De);if(!n)return null;var r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");var i=null;if(r.locale&&!(i=t.parse(r.locale,1,Re)))return null;var o=null;if(r.currency&&!(o=t.parse(r.currency,1,Re)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=t.parse(r["min-fraction-digits"],1,De)))return null;var s=null;return r["max-fraction-digits"]&&!(s=t.parse(r["max-fraction-digits"],1,De))?null:new xn(n,i,o,a,s)},xn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},xn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var wn=function(e){this.type=De,this.input=e};wn.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error("Expected argument of type string or array, but found "+qe(n.type)+" instead."):new wn(n):null},wn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new at("Expected value to be of type string or array, but found "+qe(rt(t))+" instead.")},wn.prototype.eachChild=function(e){e(this.input)},wn.prototype.outputDefined=function(){return!1},wn.prototype.serialize=function(){var e=["length"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Sn={"==":mn,"!=":vn,">":yn,"<":gn,">=":_n,"<=":bn,array:lt,at:an,boolean:lt,case:cn,coalesce:rn,collator:vt,format:ut,image:ct,in:sn,"index-of":ln,interpolate:tn,"interpolate-hcl":tn,"interpolate-lab":tn,length:wn,let:on,literal:ot,match:un,number:lt,"number-format":xn,object:lt,slice:pn,step:Bt,string:lt,"to-boolean":ft,"to-color":ft,"to-number":ft,"to-string":ft,var:Lt,within:It};function En(e,t){var n=t[0],r=t[1],i=t[2],o=t[3];n=n.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);var a=o?o.evaluate(e):1,s=tt(n,r,i,a);if(s)throw new at(s);return new Xe(n/255*a,r/255*a,i/255*a,a)}function kn(e,t){return e in t}function On(e,t){var n=t[e];return void 0===n?null:n}function Tn(e){return{type:e}}function Cn(e){return{result:"success",value:e}}function Pn(e){return{result:"error",value:e}}function An(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Mn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function In(e){return!!e.expression&&e.expression.interpolated}function jn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function Dn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Rn(e){return e}function Ln(e,t,n){return void 0!==e?e:void 0!==t?t:void 0!==n?n:void 0}function Nn(e,t,n,r,i){return Ln(typeof n===i?r[n]:void 0,e.default,t.default)}function zn(e,t,n){if("number"!==jn(n))return Ln(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[r-1][0])return e.stops[r-1][1];var i=zt(e.stops.map(function(e){return e[0]}),n);return e.stops[i][1]}function Bn(e,t,n){var r=void 0!==e.base?e.base:1;if("number"!==jn(n))return Ln(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[i-1][0])return e.stops[i-1][1];var o=zt(e.stops.map(function(e){return e[0]}),n),a=function(e,t,n,r){var i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}(n,r,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=Ut[t.type]||Rn;if(e.colorSpace&&"rgb"!==e.colorSpace){var c=en[e.colorSpace];u=function(e,t){return c.reverse(c.interpolate(c.forward(e),c.forward(t),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=s.evaluate.apply(void 0,e),r=l.evaluate.apply(void 0,e);if(void 0!==n&&void 0!==r)return u(n,r,a)}}:u(s,l,a)}function Fn(e,t,n){return"color"===t.type?n=Xe.parse(n):"formatted"===t.type?n=Qe.fromString(n.toString()):"resolvedImage"===t.type?n=et.fromString(n.toString()):jn(n)===t.type||"enum"===t.type&&t.values[n]||(n=void 0),Ln(n,e.default,t.default)}mt.register(Sn,{error:[{kind:"error"},[Re],function(e,t){throw new at(t[0].evaluate(e))}],typeof:[Re,[Be],function(e,t){return qe(rt(t[0].evaluate(e)))}],"to-rgba":[He(De,4),[Ne],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Ne,[De,De,De],En],rgba:[Ne,[De,De,De,De],En],has:{type:Le,overloads:[[[Re],function(e,t){return kn(t[0].evaluate(e),e.properties())}],[[Re,ze],function(e,t){var n=t[1];return kn(t[0].evaluate(e),n.evaluate(e))}]]},get:{type:Be,overloads:[[[Re],function(e,t){return On(t[0].evaluate(e),e.properties())}],[[Re,ze],function(e,t){var n=t[1];return On(t[0].evaluate(e),n.evaluate(e))}]]},"feature-state":[Be,[Re],function(e,t){return On(t[0].evaluate(e),e.featureState||{})}],properties:[ze,[],function(e){return e.properties()}],"geometry-type":[Re,[],function(e){return e.geometryType()}],id:[Be,[],function(e){return e.id()}],zoom:[De,[],function(e){return e.globals.zoom}],"heatmap-density":[De,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[De,[],function(e){return e.globals.lineProgress||0}],accumulated:[Be,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[De,Tn(De),function(e,t){for(var n=0,r=0,i=t;r":[Le,[Re,Be],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[Le,[Be],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[Le,[Re,Be],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[Le,[Be],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[Le,[Re,Be],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[Le,[Be],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[Le,[Be],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Le,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[Le,[He(Re)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Le,[He(Be)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Le,[Re,He(Be)],function(e,t){var n=t[0];return t[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[Le,[Re,He(Be)],function(e,t){var n=t[0],r=t[1];return function(e,t,n,r){for(;n<=r;){var i=n+r>>1;if(t[i]===e)return!0;t[i]>e?r=i-1:n=i+1}return!1}(e.properties()[n.value],r.value,0,r.value.length-1)}],all:{type:Le,overloads:[[[Le,Le],function(e,t){var n=t[1];return t[0].evaluate(e)&&n.evaluate(e)}],[Tn(Le),function(e,t){for(var n=0,r=t;n0&&"string"==typeof e[0]&&e[0]in Sn}function Hn(e,t){var n=new Nt(Sn,[],t?function(e){var t={color:Ne,string:Re,number:De,enum:Re,boolean:Le,formatted:Ue,resolvedImage:Ve};return"array"===e.type?He(t[e.value]||Be,e.length):t[e.type]}(t):void 0),r=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?Cn(new Un(r,t)):Pn(n.errors)}Un.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},Un.prototype.evaluate=function(e,t,n,r,i,o){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new at("Expected value to be one of "+Object.keys(this._enumValues).map(function(e){return JSON.stringify(e)}).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}};var qn=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Dt(t.expression)};qn.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)},qn.prototype.evaluate=function(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)};var Gn=function(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Dt(t.expression),this.interpolationType=r};function Wn(e,t){if("error"===(e=Hn(e,t)).result)return e;var n=e.value.expression,r=jt(n);if(!r&&!An(t))return Pn([new Me("","data expressions not supported")]);var i=Rt(n,["zoom"]);if(!i&&!Mn(t))return Pn([new Me("","zoom expressions not supported")]);var o=function e(t){var n=null;if(t instanceof on)n=e(t.result);else if(t instanceof rn)for(var r=0,i=t.args;rr.maximum?[new Oe(t,n,n+" is greater than the maximum value "+r.maximum)]:[]}function Jn(e){var t,n,r,i=e.valueSpec,o=Pe(e.value.type),a={},s="categorical"!==o&&void 0===e.value.property,l=!s,u="array"===jn(e.value.stops)&&"array"===jn(e.value.stops[0])&&"object"===jn(e.value.stops[0][0]),c=Zn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===o)return[new Oe(e.key,e.value,'identity function may not have a "stops" property')];var t=[],n=e.value;return t=t.concat(Yn({key:e.key,value:n,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:p})),"array"===jn(n)&&0===n.length&&t.push(new Oe(e.key,n,"array must have at least one stop")),t},default:function(e){return br({key:e.key,value:e.value,valueSpec:i,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===o&&s&&c.push(new Oe(e.key,e.value,'missing required property "property"')),"identity"===o||e.value.stops||c.push(new Oe(e.key,e.value,'missing required property "stops"')),"exponential"===o&&e.valueSpec.expression&&!In(e.valueSpec)&&c.push(new Oe(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!An(e.valueSpec)?c.push(new Oe(e.key,e.value,"property functions not supported")):s&&!Mn(e.valueSpec)&&c.push(new Oe(e.key,e.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==e.value.property||c.push(new Oe(e.key,e.value,'"property" property is required')),c;function p(e){var t=[],o=e.value,s=e.key;if("array"!==jn(o))return[new Oe(s,o,"array expected, "+jn(o)+" found")];if(2!==o.length)return[new Oe(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==jn(o[0]))return[new Oe(s,o,"object expected, "+jn(o[0])+" found")];if(void 0===o[0].zoom)return[new Oe(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Oe(s,o,"object stop key must have value")];if(r&&r>Pe(o[0].zoom))return[new Oe(s,o[0].zoom,"stop zoom values must appear in ascending order")];Pe(o[0].zoom)!==r&&(r=Pe(o[0].zoom),n=void 0,a={}),t=t.concat(Zn({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Xn,value:f}}))}else t=t.concat(f({key:s+"[0]",value:o[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},o));return Vn(Ae(o[1]))?t.concat([new Oe(s+"[1]",o[1],"expressions are not allowed in function stops.")]):t.concat(br({key:s+"[1]",value:o[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function f(e,r){var s=jn(e.value),l=Pe(e.value),u=null!==e.value?e.value:r;if(t){if(s!==t)return[new Oe(e.key,u,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Oe(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return An(i)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Oe(e.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,n=e.slice(1);tt?1:0}function ir(e){if(!e)return!0;var t,n=e[0];return e.length<=1?"any"!==n:"=="===n?or(e[1],e[2],"=="):"!="===n?lr(or(e[1],e[2],"==")):"<"===n||">"===n||"<="===n||">="===n?or(e[1],e[2],n):"any"===n?(t=e.slice(1),["any"].concat(t.map(ir))):"all"===n?["all"].concat(e.slice(1).map(ir)):"none"===n?["all"].concat(e.slice(1).map(ir).map(lr)):"in"===n?ar(e[1],e.slice(2)):"!in"===n?lr(ar(e[1],e.slice(2))):"has"===n?sr(e[1]):"!has"===n?lr(sr(e[1])):"within"!==n||e}function or(e,t,n){switch(e){case"$type":return["filter-type-"+n,t];case"$id":return["filter-id-"+n,t];default:return["filter-"+n,e,t]}}function ar(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(e){return typeof e!=typeof t[0]})?["filter-in-large",e,["literal",t.sort(rr)]]:["filter-in-small",e,["literal",t]]}}function sr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function lr(e){return["!",e]}function ur(e){return er(Ae(e.value))?$n(Ce({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){var n=t.value,r=t.key;if("array"!==jn(n))return[new Oe(r,n,"array expected, "+jn(n)+" found")];var i,o=t.styleSpec,a=[];if(n.length<1)return[new Oe(r,n,"filter array must have at least 1 element")];switch(a=a.concat(Qn({key:r+"[0]",value:n[0],valueSpec:o.filter_operator,style:t.style,styleSpec:t.styleSpec})),Pe(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===Pe(n[1])&&a.push(new Oe(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new Oe(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(i=jn(n[1]))&&a.push(new Oe(r+"[1]",n[1],"string expected, "+i+" found"));for(var s=2;s=c[d+0]&&r>=c[d+1])?(a[f]=!0,o.push(u[f])):a[f]=!1}}},Ar.prototype._forEachCell=function(e,t,n,r,i,o,a,s){for(var l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(n),p=this._convertToCellCoord(r),f=l;f<=c;f++)for(var d=u;d<=p;d++){var h=this.d*d+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&i.call(this,e,t,n,r,h,o,a,s))return}},Ar.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},Ar.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},Ar.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=3+this.cells.length+1+1,n=0,r=0;r=0)){var c=e[u];l[u]=jr[s].shallow.indexOf(u)>=0?c:zr(c,t)}e instanceof Error&&(l.message=e.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof e)}function Br(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||Lr(e)||Nr(e)||ArrayBuffer.isView(e)||e instanceof Mr)return e;if(Array.isArray(e))return e.map(Br);if("object"==typeof e){var t=e.$name||"Object",n=jr[t].klass;if(!n)throw new Error("can't deserialize unregistered class "+t);if(n.deserialize)return n.deserialize(e);for(var r=Object.create(n.prototype),i=0,o=Object.keys(e);i=0?s:Br(s)}}return r}throw new Error("can't deserialize object of type "+typeof e)}var Fr=function(){this.first=!0};Fr.prototype.update=function(e,t){var n=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function Vr(e){for(var t=0,n=e;t=65097&&e<=65103)||Ur["CJK Compatibility Ideographs"](e)||Ur["CJK Compatibility"](e)||Ur["CJK Radicals Supplement"](e)||Ur["CJK Strokes"](e)||!(!Ur["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Ur["CJK Unified Ideographs Extension A"](e)||Ur["CJK Unified Ideographs"](e)||Ur["Enclosed CJK Letters and Months"](e)||Ur["Hangul Compatibility Jamo"](e)||Ur["Hangul Jamo Extended-A"](e)||Ur["Hangul Jamo Extended-B"](e)||Ur["Hangul Jamo"](e)||Ur["Hangul Syllables"](e)||Ur.Hiragana(e)||Ur["Ideographic Description Characters"](e)||Ur.Kanbun(e)||Ur["Kangxi Radicals"](e)||Ur["Katakana Phonetic Extensions"](e)||Ur.Katakana(e)&&12540!==e||!(!Ur["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Ur["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||Ur["Unified Canadian Aboriginal Syllabics"](e)||Ur["Unified Canadian Aboriginal Syllabics Extended"](e)||Ur["Vertical Forms"](e)||Ur["Yijing Hexagram Symbols"](e)||Ur["Yi Syllables"](e)||Ur["Yi Radicals"](e))))}function qr(e){return!(Hr(e)||function(e){return!!(Ur["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||Ur["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||Ur["Letterlike Symbols"](e)||Ur["Number Forms"](e)||Ur["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||Ur["Control Pictures"](e)&&9251!==e||Ur["Optical Character Recognition"](e)||Ur["Enclosed Alphanumerics"](e)||Ur["Geometric Shapes"](e)||Ur["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||Ur["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||Ur["CJK Symbols and Punctuation"](e)||Ur.Katakana(e)||Ur["Private Use Area"](e)||Ur["CJK Compatibility Forms"](e)||Ur["Small Form Variants"](e)||Ur["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function Gr(e){return e>=1424&&e<=2303||Ur["Arabic Presentation Forms-A"](e)||Ur["Arabic Presentation Forms-B"](e)}function Wr(e,t){return!(!t&&Gr(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||Ur.Khmer(e))}function Kr(e){for(var t=0,n=e;t-1&&(Yr="error"),Zr&&Zr(e)};function $r(){Qr.fire(new we("pluginStateChange",{pluginStatus:Yr,pluginURL:Xr}))}var Qr=new Ee,ei=function(){return Yr},ti=function(){if("deferred"!==Yr||!Xr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Yr="loading",$r(),Xr&&ye({url:Xr},function(e){e?Jr(e):(Yr="loaded",$r())})},ni={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Yr||null!=ni.applyArabicShaping},isLoading:function(){return"loading"===Yr},setState:function(e){Yr=e.pluginStatus,Xr=e.pluginURL},isParsed:function(){return null!=ni.applyArabicShaping&&null!=ni.processBidirectionalText&&null!=ni.processStyledBidirectionalText},getPluginURL:function(){return Xr}},ri=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Fr,this.transition={})};ri.prototype.isSupportedScript=function(e){return function(e,t){for(var n=0,r=e;nthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*t}};var ii=function(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(Dn(e))return new Kn(e,t);if(Vn(e)){var n=Wn(e,t);if("error"===n.result)throw new Error(n.value.map(function(e){return e.key+": "+e.message}).join(", "));return n.value}var r=e;return"string"==typeof e&&"color"===t.type&&(r=Xe.parse(e)),{kind:"constant",evaluate:function(){return r}}}(void 0===t?e.specification.default:t,e.specification)};ii.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ii.prototype.possiblyEvaluate=function(e,t,n){return this.property.possiblyEvaluate(this,e,t,n)};var oi=function(e){this.property=e,this.value=new ii(e,void 0)};oi.prototype.transitioned=function(e,t){return new si(this.property,this.value,t,c({},e.transition,this.transition),e.now)},oi.prototype.untransitioned=function(){return new si(this.property,this.value,null,{},0)};var ai=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};ai.prototype.getValue=function(e){return b(this._values[e].value.value)},ai.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new oi(this._values[e].property)),this._values[e].value=new ii(this._values[e].property,null===t?void 0:b(t))},ai.prototype.getTransition=function(e){return b(this._values[e].transition)},ai.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new oi(this._values[e].property)),this._values[e].transition=b(t)||void 0},ai.prototype.serialize=function(){for(var e={},t=0,n=Object.keys(this._values);tthis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r=1)return 1;var t=a*a,n=t*a;return 4*(a<.5?n:3*(a-t)+n-.75)}())}return i};var li=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};li.prototype.possiblyEvaluate=function(e,t,n){for(var r=new pi(this._properties),i=0,o=Object.keys(this._values);ir.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},t.prototype.interpolate=function(e){return e},t}(di),mi=function(e){this.specification=e};mi.prototype.possiblyEvaluate=function(e,t,n,r){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},n,r);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new ri(Math.floor(t.zoom-1),t)),e.expression.evaluate(new ri(Math.floor(t.zoom),t)),e.expression.evaluate(new ri(Math.floor(t.zoom+1),t)),t)}},mi.prototype._calculate=function(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},mi.prototype.interpolate=function(e){return e};var vi=function(e){this.specification=e};vi.prototype.possiblyEvaluate=function(e,t,n,r){return!!e.expression.evaluate(t,null,{},n,r)},vi.prototype.interpolate=function(){return!1};var gi=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var n=e[t];n.specification.overridable&&this.overridableProperties.push(t);var r=this.defaultPropertyValues[t]=new ii(n,void 0),i=this.defaultTransitionablePropertyValues[t]=new oi(n);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})}};Dr("DataDrivenProperty",di),Dr("DataConstantProperty",fi),Dr("CrossFadedDataDrivenProperty",hi),Dr("CrossFadedProperty",mi),Dr("ColorRampProperty",vi);var yi=function(e){function t(t,n){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=(t=t).metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),n.layout&&(this._unevaluatedLayout=new ui(n.layout)),n.paint)){for(var r in this._transitionablePaint=new ai(n.paint),t.paint)this.setPaintProperty(r,t.paint[r],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new pi(n.paint)}}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,n){void 0===n&&(n={}),null!=t&&this._validate(Tr,"layers."+this.id+".layout."+e,e,t,n)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)},t.prototype.getPaintProperty=function(e){return v(e,"-transition")?this._transitionablePaint.getTransition(e.slice(0,-"-transition".length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,n){if(void 0===n&&(n={}),null!=t&&this._validate(Or,"layers."+this.id+".paint."+e,e,t,n))return!1;if(v(e,"-transition"))return this._transitionablePaint.setTransition(e.slice(0,-"-transition".length),t||void 0),!1;var r=this._transitionablePaint._values[e],i="cross-faded-data-driven"===r.property.specification["property-type"],o=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var s=this._transitionablePaint._values[e].value;return s.isDataDriven()||o||i||this._handleOverridablePaintPropertyUpdate(e,a,s)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,n){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),y(e,function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)})},t.prototype._validate=function(e,t,n,r,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Cr(this,e.call(Er,{key:t,layerType:this.type,objectKey:n,value:r,styleSpec:ke,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof ci&&An(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(Ee),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},_i=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},xi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function wi(e,t){void 0===t&&(t=1);var n=0,r=0;return{members:e.map(function(e){var i=bi[e.type].BYTES_PER_ELEMENT,o=n=Si(n,Math.max(t,i)),a=e.components||1;return r=Math.max(r,i),n+=i*a,{name:e.name,type:e.type,components:a,offset:o}}),size:Si(n,Math.max(r,t)),alignment:t}}function Si(e,t){return Math.ceil(e/t)*t}xi.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},xi.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},xi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},xi.prototype.clear=function(){this.length=0},xi.prototype.resize=function(e){this.reserve(e),this.length=e},xi.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},xi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Ei=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.int16[r+0]=t,this.int16[r+1]=n,e},t}(xi);Ei.prototype.bytesPerElement=4,Dr("StructArrayLayout2i4",Ei);var ki=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,e},t}(xi);ki.prototype.bytesPerElement=8,Dr("StructArrayLayout4i8",ki);var Oi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)},t.prototype.emplace=function(e,t,n,r,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(xi);Oi.prototype.bytesPerElement=12,Dr("StructArrayLayout2i4i12",Oi);var Ti=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)},t.prototype.emplace=function(e,t,n,r,i,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.uint8[l+4]=r,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(xi);Ti.prototype.bytesPerElement=8,Dr("StructArrayLayout2i4ub8",Ti);var Ci=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,n,r,i,o,a,s,l,u)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,u,c){var p=9*e,f=18*e;return this.uint16[p+0]=t,this.uint16[p+1]=n,this.uint16[p+2]=r,this.uint16[p+3]=i,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.uint8[f+16]=u,this.uint8[f+17]=c,e},t}(xi);Ci.prototype.bytesPerElement=18,Dr("StructArrayLayout8ui2ub18",Ci);var Pi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,u,c,p){var f=this.length;return this.resize(f+1),this.emplace(f,e,t,n,r,i,o,a,s,l,u,c,p)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,u,c,p,f){var d=12*e;return this.int16[d+0]=t,this.int16[d+1]=n,this.int16[d+2]=r,this.int16[d+3]=i,this.uint16[d+4]=o,this.uint16[d+5]=a,this.uint16[d+6]=s,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=c,this.int16[d+10]=p,this.int16[d+11]=f,e},t}(xi);Pi.prototype.bytesPerElement=24,Dr("StructArrayLayout4i4ui4i24",Pi);var Ai=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=n,this.float32[i+2]=r,e},t}(xi);Ai.prototype.bytesPerElement=12,Dr("StructArrayLayout3f12",Ai);var Mi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){return this.uint32[1*e+0]=t,e},t}(xi);Mi.prototype.bytesPerElement=4,Dr("StructArrayLayout1ul4",Mi);var Ii=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,r,i,o,a,s,l)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,u){var c=10*e,p=5*e;return this.int16[c+0]=t,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[p+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e},t}(xi);Ii.prototype.bytesPerElement=20,Dr("StructArrayLayout6i1ul2ui20",Ii);var ji=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)},t.prototype.emplace=function(e,t,n,r,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(xi);ji.prototype.bytesPerElement=12,Dr("StructArrayLayout2i2i2i12",ji);var Di=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,i)},t.prototype.emplace=function(e,t,n,r,i,o){var a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,e},t}(xi);Di.prototype.bytesPerElement=16,Dr("StructArrayLayout2f1f2i16",Di);var Ri=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,e},t}(xi);Ri.prototype.bytesPerElement=12,Dr("StructArrayLayout2ub2f12",Ri);var Li=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=n,this.uint16[i+2]=r,e},t}(xi);Li.prototype.bytesPerElement=6,Dr("StructArrayLayout3ui6",Li);var Ni=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,v){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,v)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,v,g){var y=24*e,b=12*e,_=48*e;return this.int16[y+0]=t,this.int16[y+1]=n,this.uint16[y+2]=r,this.uint16[y+3]=i,this.uint32[b+2]=o,this.uint32[b+3]=a,this.uint32[b+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=u,this.uint16[y+12]=c,this.float32[b+7]=p,this.float32[b+8]=f,this.uint8[_+36]=d,this.uint8[_+37]=h,this.uint8[_+38]=m,this.uint32[b+10]=v,this.int16[y+22]=g,e},t}(xi);Ni.prototype.bytesPerElement=48,Dr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ni);var zi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,v,g,y,b,_,x,w,S,E,k,O,T){var C=this.length;return this.resize(C+1),this.emplace(C,e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,v,g,y,b,_,x,w,S,E,k,O,T)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,v,g,y,b,_,x,w,S,E,k,O,T,C){var P=34*e,A=17*e;return this.int16[P+0]=t,this.int16[P+1]=n,this.int16[P+2]=r,this.int16[P+3]=i,this.int16[P+4]=o,this.int16[P+5]=a,this.int16[P+6]=s,this.int16[P+7]=l,this.uint16[P+8]=u,this.uint16[P+9]=c,this.uint16[P+10]=p,this.uint16[P+11]=f,this.uint16[P+12]=d,this.uint16[P+13]=h,this.uint16[P+14]=m,this.uint16[P+15]=v,this.uint16[P+16]=g,this.uint16[P+17]=y,this.uint16[P+18]=b,this.uint16[P+19]=_,this.uint16[P+20]=x,this.uint16[P+21]=w,this.uint16[P+22]=S,this.uint32[A+12]=E,this.float32[A+13]=k,this.float32[A+14]=O,this.float32[A+15]=T,this.float32[A+16]=C,e},t}(xi);zi.prototype.bytesPerElement=68,Dr("StructArrayLayout8i15ui1ul4f68",zi);var Bi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){return this.float32[1*e+0]=t,e},t}(xi);Bi.prototype.bytesPerElement=4,Dr("StructArrayLayout1f4",Bi);var Fi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=n,this.int16[i+2]=r,e},t}(xi);Fi.prototype.bytesPerElement=6,Dr("StructArrayLayout3i6",Fi);var Ui=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=4*e;return this.uint32[2*e+0]=t,this.uint16[i+2]=n,this.uint16[i+3]=r,e},t}(xi);Ui.prototype.bytesPerElement=8,Dr("StructArrayLayout1ul2ui8",Ui);var Vi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.uint16[r+0]=t,this.uint16[r+1]=n,e},t}(xi);Vi.prototype.bytesPerElement=4,Dr("StructArrayLayout2ui4",Vi);var Hi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){return this.uint16[1*e+0]=t,e},t}(xi);Hi.prototype.bytesPerElement=2,Dr("StructArrayLayout1ui2",Hi);var qi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.float32[r+0]=t,this.float32[r+1]=n,e},t}(xi);qi.prototype.bytesPerElement=8,Dr("StructArrayLayout2f8",qi);var Gi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,e},t}(xi);Gi.prototype.bytesPerElement=16,Dr("StructArrayLayout4f16",Gi);var Wi=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,n),t}(_i);Wi.prototype.size=20;var Ki=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(e){return new Wi(this,e)},t}(Ii);Dr("CollisionBoxArray",Ki);var Zi=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,n),t}(_i);Zi.prototype.size=48;var Yi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(e){return new Zi(this,e)},t}(Ni);Dr("PlacedSymbolArray",Yi);var Xi=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+12]=e},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,n),t}(_i);Xi.prototype.size=68;var Ji=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(e){return new Xi(this,e)},t}(zi);Dr("SymbolInstanceArray",Ji);var $i=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(Bi);Dr("GlyphOffsetArray",$i);var Qi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(Fi);Dr("SymbolLineVertexArray",Qi);var eo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,n),t}(_i);eo.prototype.size=8;var to=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.get=function(e){return new eo(this,e)},t}(Ui);Dr("FeatureIndexArray",to);var no=wi([{name:"a_pos",components:2,type:"Int16"}],4).members,ro=function(e){void 0===e&&(e=[]),this.segments=e};function io(e,t){return 256*(e=l(Math.floor(e),0,255))+l(Math.floor(t),0,255)}ro.prototype.prepareSegment=function(e,t,n,r){var i=this.segments[this.segments.length-1];return e>ro.MAX_VERTEX_ARRAY_LENGTH&&x("Max vertices per segment is "+ro.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>ro.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i},ro.prototype.get=function(){return this.segments},ro.prototype.destroy=function(){for(var e=0,t=this.segments;e>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}}),so=t(function(e){e.exports=function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}}),lo=ao,uo=so;lo.murmur3=ao,lo.murmur2=uo;var co=function(){this.ids=[],this.positions=[],this.indexed=!1};co.prototype.add=function(e,t,n,r){this.ids.push(fo(e)),this.positions.push(t,n,r)},co.prototype.getPositions=function(e){for(var t=fo(e),n=0,r=this.ids.length-1;n>1;this.ids[i]>=t?r=i:n=i+1}for(var o=[];this.ids[n]===t;)o.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return o},co.serialize=function(e,t){var n=new Float64Array(e.ids),r=new Uint32Array(e.positions);return function e(t,n,r,i){for(;r>1],a=r-1,s=i+1;;){do{a++}while(t[a]o);if(a>=s)break;ho(t,a,s),ho(n,3*a,3*s),ho(n,3*a+1,3*s+1),ho(n,3*a+2,3*s+2)}s-rDo.max||a.yDo.max)&&(x("Geometry exceeds allowed extent, reduce your vector tile buffer size"),a.x=l(a.x,Do.min,Do.max),a.y=l(a.y,Do.min,Do.max))}return n}function Lo(e,t,n,r,i){e.emplaceBack(2*t+(r+1)/2,2*n+(i+1)/2)}var No=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(e){return e.id}),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Ei,this.indexArray=new Li,this.segments=new ro,this.programConfigurations=new Mo(no,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(function(e){return e.isStateDependent()}).map(function(e){return e.id})};function zo(e,t){for(var n=0;n1){if(Vo(e,t))return!0;for(var r=0;r1?n:n.sub(t)._mult(i)._add(t))}function Wo(e,t){for(var n,r,i,o=!1,a=0;at.y!=(i=n[l]).y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function Ko(e,t){for(var n=!1,r=0,i=e.length-1;rt.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function Zo(e,t,n){var r=n[0],i=n[2];if(e.xi.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;var o=w(e,t,n[0]);return o!==w(e,t,n[1])||o!==w(e,t,n[2])||o!==w(e,t,n[3])}function Yo(e,t,n){var r=t.paint.get(e).value;return"constant"===r.kind?r.value:n.programConfigurations.get(t.id).getMaxValue(e)}function Xo(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Jo(e,t,n,r,o){if(!t[0]&&!t[1])return e;var a=i.convert(t)._mult(o);"viewport"===n&&a._rotate(-r);for(var s=[],l=0;l=8192||c<0||c>=8192)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),f=p.vertexLength;Lo(this.layoutVertexArray,u,c,-1,-1),Lo(this.layoutVertexArray,u,c,1,-1),Lo(this.layoutVertexArray,u,c,1,1),Lo(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(f,f+1,f+2),this.indexArray.emplaceBack(f,f+3,f+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,{},r)},Dr("CircleBucket",No,{omit:["layers"]});var $o=new gi({"circle-sort-key":new di(ke.layout_circle["circle-sort-key"])}),Qo={paint:new gi({"circle-radius":new di(ke.paint_circle["circle-radius"]),"circle-color":new di(ke.paint_circle["circle-color"]),"circle-blur":new di(ke.paint_circle["circle-blur"]),"circle-opacity":new di(ke.paint_circle["circle-opacity"]),"circle-translate":new fi(ke.paint_circle["circle-translate"]),"circle-translate-anchor":new fi(ke.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new fi(ke.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new fi(ke.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new di(ke.paint_circle["circle-stroke-width"]),"circle-stroke-color":new di(ke.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new di(ke.paint_circle["circle-stroke-opacity"])}),layout:$o},ea="undefined"!=typeof Float32Array?Float32Array:Array;function ta(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function na(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],p=t[8],f=t[9],d=t[10],h=t[11],m=t[12],v=t[13],g=t[14],y=t[15],b=n[0],_=n[1],x=n[2],w=n[3];return e[0]=b*r+_*s+x*p+w*m,e[1]=b*i+_*l+x*f+w*v,e[2]=b*o+_*u+x*d+w*g,e[3]=b*a+_*c+x*h+w*y,e[4]=(b=n[4])*r+(_=n[5])*s+(x=n[6])*p+(w=n[7])*m,e[5]=b*i+_*l+x*f+w*v,e[6]=b*o+_*u+x*d+w*g,e[7]=b*a+_*c+x*h+w*y,e[8]=(b=n[8])*r+(_=n[9])*s+(x=n[10])*p+(w=n[11])*m,e[9]=b*i+_*l+x*f+w*v,e[10]=b*o+_*u+x*d+w*g,e[11]=b*a+_*c+x*h+w*y,e[12]=(b=n[12])*r+(_=n[13])*s+(x=n[14])*p+(w=n[15])*m,e[13]=b*i+_*l+x*f+w*v,e[14]=b*o+_*u+x*d+w*g,e[15]=b*a+_*c+x*h+w*y,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,n=arguments.length;n--;)t+=e[n]*e[n];return Math.sqrt(t)});var ra,ia=na;function oa(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}ra=new ea(3),ea!=Float32Array&&(ra[0]=0,ra[1]=0,ra[2]=0),function(){var e=new ea(4);ea!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var aa=(function(){var e=new ea(2);ea!=Float32Array&&(e[0]=0,e[1]=0)}(),function(e){function t(t){e.call(this,t,Qo)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.createBucket=function(e){return new No(e)},t.prototype.queryRadius=function(e){var t=e;return Yo("circle-radius",this,t)+Yo("circle-stroke-width",this,t)+Xo(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,o,a,s){for(var l=Jo(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(t,n)+this.paint.get("circle-stroke-width").evaluate(t,n),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(e,t){return l.map(function(e){return sa(e,t)})}(0,s),f=c?u*a:u,d=0,h=r;de.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l80*n){r=o=e[0],i=a=e[1];for(var h=n;ho&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return ka(f,d,n,r,i,u),d}function Sa(e,t,n,r,i){var o,a;if(i===Ka(e,t,n,r)>0)for(o=t;o=t;o-=r)a=qa(o,e[o],e[o+1],a);return a&&za(a,a.next)&&(Ga(a),a=a.next),a}function Ea(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!za(r,r.next)&&0!==Na(r.prev,r,r.next))r=r.next;else{if(Ga(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function ka(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=ja(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,u=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Ta(e,r,i,o):Oa(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),Ga(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?ka(e=Ca(Ea(e),t,n),t,n,r,i,o,2):2===a&&Pa(e,t,n,r,i,o):ka(Ea(e),t,n,r,i,o,1);break}}}function Oa(e){var t=e.prev,n=e,r=e.next;if(Na(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Ra(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Na(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Ta(e,t,n,r){var i=e.prev,o=e,a=e.next;if(Na(i,o,a)>=0)return!1;for(var s=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,u=ja(i.x=u&&f&&f.z<=c;){if(p!==e.prev&&p!==e.next&&Ra(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Na(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&Ra(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Na(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=u;){if(p!==e.prev&&p!==e.next&&Ra(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Na(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=c;){if(f!==e.prev&&f!==e.next&&Ra(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Na(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Ca(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!za(i,o)&&Ba(i,r,r.next,o)&&Va(i,o)&&Va(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Ga(r),Ga(r.next),r=e=o),r=r.next}while(r!==e);return Ea(r)}function Pa(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&La(a,s)){var l=Ha(a,s);return a=Ea(a,a.next),l=Ea(l,l.next),ka(a,t,n,r,i,o),void ka(l,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function Aa(e,t){return e.x-t.x}function Ma(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&Ra(on.x||r.x===n.x&&Ia(n,r)))&&(n=r,f=l)),r=r.next}while(r!==u);return n}(e,t)){var n=Ha(t,e);Ea(t,t.next),Ea(n,n.next)}}function Ia(e,t){return Na(e.prev,e,t.prev)<0&&Na(t.next,e,e.next)<0}function ja(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Da(e){var t=e,n=e;do{(t.x=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function La(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Ba(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Va(e,t)&&Va(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Na(e.prev,e,t.prev)||Na(e,t.prev,t))||za(e,t)&&Na(e.prev,e,e.next)>0&&Na(t.prev,t,t.next)>0)}function Na(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function za(e,t){return e.x===t.x&&e.y===t.y}function Ba(e,t,n,r){var i=Ua(Na(e,t,n)),o=Ua(Na(e,t,r)),a=Ua(Na(n,r,e)),s=Ua(Na(n,r,t));return i!==o&&a!==s||!(0!==i||!Fa(e,n,t))||!(0!==o||!Fa(e,r,t))||!(0!==a||!Fa(n,e,r))||!(0!==s||!Fa(n,t,r))}function Fa(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Ua(e){return e>0?1:e<0?-1:0}function Va(e,t){return Na(e.prev,e,e.next)<0?Na(e,t,e.next)>=0&&Na(e,e.prev,t)>=0:Na(e,t,e.prev)<0||Na(e,e.next,t)<0}function Ha(e,t){var n=new Wa(e.i,e.x,e.y),r=new Wa(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function qa(e,t,n,r){var i=new Wa(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Ga(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Wa(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ka(e,t,n,r){for(var i=0,o=t,a=n-r;or;){if(i-r>600){var a=i-r+1,s=n-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);e(t,n,Math.max(r,Math.floor(n-s*u/a+c)),Math.min(i,Math.floor(n+(a-s)*u/a+c)),o)}var p=t[n],f=r,d=i;for(Ya(t,r,n),o(t[i],p)>0&&Ya(t,r,i);f0;)d--}0===o(t[r],p)?Ya(t,r,d):Ya(t,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(e,t,n||0,r||e.length-1,i||Xa)}function Ya(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Xa(e,t){return et?1:0}function Ja(e,t){var n=e.length;if(n<=1)return[e];for(var r,i,o=[],a=0;a1)for(var l=0;l0&&n.holes.push(r+=e[i-1].length)}return n},_a.default=xa;var ts=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(e){return e.id}),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ei,this.indexArray=new Li,this.indexArray2=new Vi,this.programConfigurations=new Mo(ba,e.layers,e.zoom),this.segments=new ro,this.segments2=new ro,this.stateDependentLayerIds=this.layers.filter(function(e){return e.isStateDependent()}).map(function(e){return e.id})};ts.prototype.populate=function(e,t,n){this.hasPattern=Qa("fill",this.layers,t);for(var r=this.layers[0].layout.get("fill-sort-key"),i=[],o=0,a=e;o>3}if(o--,1===r||2===r)a+=e.readSVarint(),s+=e.readSVarint(),1===r&&(t&&l.push(t),t=[]),t.push(new i(a,s));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&l.push(t),l},ss.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(r--,1===n||2===n)(i+=e.readSVarint())s&&(s=i),(o+=e.readSVarint())u&&(u=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,u]},ss.prototype.toGeoJSON=function(e,t,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=ss.types[this.type];function c(e){for(var t=0;t>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(n))}function ds(e,t,n){if(3===e){var r=new cs(n,n.readVarint()+n.pos);r.length&&(t[r.name]=r)}}ps.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new as(this._pbf,t,this.extent,this._keys,this._values)};var hs={VectorTile:function(e,t){this.layers=e.readFields(ds,{},t)},VectorTileFeature:as,VectorTileLayer:cs},ms=hs.VectorTileFeature.types,vs=Math.pow(2,13);function gs(e,t,n,r,i,o,a,s){e.emplaceBack(t,n,2*Math.floor(r*vs)+a,i*vs*2,o*vs*2,Math.round(s))}var ys=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(function(e){return e.id}),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Oi,this.indexArray=new Li,this.programConfigurations=new Mo(os,e.layers,e.zoom),this.segments=new ro,this.stateDependentLayerIds=this.layers.filter(function(e){return e.isStateDependent()}).map(function(e){return e.id})};function bs(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}ys.prototype.populate=function(e,t,n){this.features=[],this.hasPattern=Qa("fill-extrusion",this.layers,t);for(var r=0,i=e;r8192})||I.every(function(e){return e.y<0})||I.every(function(e){return e.y>8192})))for(var m=0,v=0;v=1){var y=h[v-1];if(!bs(g,y)){p.vertexLength+4>ro.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var b=g.sub(y)._perp()._unit(),_=y.dist(g);m+_>32768&&(m=0),gs(this.layoutVertexArray,g.x,g.y,b.x,b.y,0,0,m),gs(this.layoutVertexArray,g.x,g.y,b.x,b.y,0,1,m),gs(this.layoutVertexArray,y.x,y.y,b.x,b.y,0,0,m+=_),gs(this.layoutVertexArray,y.x,y.y,b.x,b.y,0,1,m);var x=p.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+l>ro.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===ms[e.type]){for(var w=[],S=[],E=p.vertexLength,k=0,O=s;k=2&&e[l-1].equals(e[l-2]);)l--;for(var u=0;u0;if(S&&g>u){var k=c.dist(d);if(k>2*p){var O=c.sub(c.sub(d)._mult(p/k)._round());this.updateDistance(d,O),this.addCurrentVertex(O,m,0,0,f),d=O}}var T=d&&h,C=T?n:s?"butt":r;if(T&&"round"===C&&(xi&&(C="bevel"),"bevel"===C&&(x>2&&(C="flipbevel"),x100)y=v.mult(-1);else{var P=x*m.add(v).mag()/m.sub(v).mag();y._perp()._mult(P*(E?-1:1))}this.addCurrentVertex(c,y,0,0,f),this.addCurrentVertex(c,y.mult(-1),0,0,f)}else if("bevel"===C||"fakeround"===C){var A=-Math.sqrt(x*x-1),M=E?A:0,I=E?0:A;if(d&&this.addCurrentVertex(c,m,M,I,f),"fakeround"===C)for(var j=Math.round(180*w/Math.PI/20),D=1;D2*p){var F=c.add(h.sub(c)._mult(p/B)._round());this.updateDistance(c,F),this.addCurrentVertex(F,v,0,0,f),c=F}}}}},Cs.prototype.addCurrentVertex=function(e,t,n,r,i,o){void 0===o&&(o=!1);var a=t.y*r-t.x,s=-t.y-t.x*r;this.addHalfVertex(e,t.x+t.y*n,t.y-t.x*n,o,!1,n,i),this.addHalfVertex(e,a,s,o,!0,-r,i),this.distance>Ts/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,n,r,i,o))},Cs.prototype.addHalfVertex=function(e,t,n,r,i,o,a){var s=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((e.x<<1)+(r?1:0),(e.y<<1)+(i?1:0),Math.round(63*t)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6);var l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),i?this.e2=l:this.e1=l},Cs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Ts-1):this.distance},Cs.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},Dr("LineBucket",Cs,{omit:["layers","patternFeatures"]});var Ps=new gi({"line-cap":new fi(ke.layout_line["line-cap"]),"line-join":new di(ke.layout_line["line-join"]),"line-miter-limit":new fi(ke.layout_line["line-miter-limit"]),"line-round-limit":new fi(ke.layout_line["line-round-limit"]),"line-sort-key":new di(ke.layout_line["line-sort-key"])}),As={paint:new gi({"line-opacity":new di(ke.paint_line["line-opacity"]),"line-color":new di(ke.paint_line["line-color"]),"line-translate":new fi(ke.paint_line["line-translate"]),"line-translate-anchor":new fi(ke.paint_line["line-translate-anchor"]),"line-width":new di(ke.paint_line["line-width"]),"line-gap-width":new di(ke.paint_line["line-gap-width"]),"line-offset":new di(ke.paint_line["line-offset"]),"line-blur":new di(ke.paint_line["line-blur"]),"line-dasharray":new mi(ke.paint_line["line-dasharray"]),"line-pattern":new hi(ke.paint_line["line-pattern"]),"line-gradient":new vi(ke.paint_line["line-gradient"])}),layout:Ps},Ms=new(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.possiblyEvaluate=function(t,n){return n=new ri(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),e.prototype.possiblyEvaluate.call(this,t,n)},t.prototype.evaluate=function(t,n,r,i){return n=c({},n,{zoom:Math.floor(n.zoom)}),e.prototype.evaluate.call(this,t,n,r,i)},t}(di))(As.paint.properties["line-width"].specification);Ms.useIntegerZoom=!0;var Is=function(e){function t(t){e.call(this,t,As)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){this.gradient=ma(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,n){e.prototype.recalculate.call(this,t,n),this.paint._values["line-floorwidth"]=Ms.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new Cs(e)},t.prototype.queryRadius=function(e){var t=e,n=js(Yo("line-width",this,t),Yo("line-gap-width",this,t)),r=Yo("line-offset",this,t);return n/2+Math.abs(r)+Xo(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,o,a,s){var l=Jo(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*js(this.paint.get("line-width").evaluate(t,n),this.paint.get("line-gap-width").evaluate(t,n)),c=this.paint.get("line-offset").evaluate(t,n);return c&&(r=function(e,t){for(var n=[],r=new i(0,0),o=0;o=3)for(var o=0;o0?t+2*e:e}var Ds=wi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Rs=wi([{name:"a_projected_pos",components:3,type:"Float32"}],4),Ls=(wi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),wi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ns=(wi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),wi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),zs=wi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Bs(e,t,n){return e.sections.forEach(function(e){e.text=function(e,t,n){var r=t.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?e=e.toLocaleUpperCase():"lowercase"===r&&(e=e.toLocaleLowerCase()),ni.applyArabicShaping&&(e=ni.applyArabicShaping(e)),e}(e.text,t,n)}),e}wi([{name:"triangle",components:3,type:"Uint16"}]),wi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),wi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),wi([{type:"Float32",name:"offsetX"}]),wi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Fs={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"},Us=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+p],p+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+p],p+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)},Vs=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(t*l-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,u-=8);e[n+d-h]|=128*m},Hs=qs;function qs(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}qs.Varint=0,qs.Fixed64=1,qs.Bytes=2,qs.Fixed32=5;var Gs="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Ws(e){return e.type===qs.Bytes?e.readVarint()+e.pos:e.pos+1}function Ks(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Zs(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function Ys(e,t){for(var n=0;n>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function al(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function sl(e,t,n){1===e&&n.readMessage(ll,t)}function ll(e,t,n){if(3===e){var r=n.readMessage(ul,{}),i=r.width,o=r.height,a=r.left,s=r.top,l=r.advance;t.push({id:r.id,bitmap:new fa({width:i+6,height:o+6},r.bitmap),metrics:{width:i,height:o,left:a,top:s,advance:l}})}}function ul(e,t,n){1===e?t.id=n.readVarint():2===e?t.bitmap=n.readBytes():3===e?t.width=n.readVarint():4===e?t.height=n.readVarint():5===e?t.left=n.readSVarint():6===e?t.top=n.readSVarint():7===e&&(t.advance=n.readVarint())}function cl(e){for(var t=0,n=0,r=0,i=e;r=0;f--){var d=a[f];if(!(p.w>d.w||p.h>d.h)){if(p.x=d.x,p.y=d.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===d.w&&p.h===d.h){var h=a.pop();f>3,o=this.pos;this.type=7&r,e(i,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=il(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=al(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=il(this.buf,this.pos)+4294967296*il(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=il(this.buf,this.pos)+4294967296*al(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=Us(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Us(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return Ks(e,r,t);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return Ks(e,r,t);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return Ks(e,r,t);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return Ks(e,r,t);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return Ks(e,r,t);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return Ks(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Gs?function(e,t,n){return Gs.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){for(var r="",i=t;i239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=e[i+2],128==(192&(o=e[i+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=e[i+2],s=e[i+3],128==(192&(o=e[i+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==qs.Bytes)return e.push(this.readVarint(t));var n=Ws(this);for(e=e||[];this.pos127;);else if(t===qs.Bytes)this.pos=this.readVarint()+this.pos;else if(t===qs.Fixed32)this.pos+=4;else{if(t!==qs.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,n.buf[n.pos]=127&(e>>>=7)}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,o=0;o55295&&r<57344){if(!i){r>56319||o+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&Zs(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),Vs(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Vs(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n=128&&Zs(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,qs.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Ys,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Xs,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Qs,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,Js,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,$s,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,el,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,tl,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,nl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,rl,t)},writeBytesField:function(e,t){this.writeTag(e,qs.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,qs.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,qs.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,qs.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,qs.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,qs.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,qs.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,qs.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,qs.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,qs.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var pl=function(e,t){var n=t.pixelRatio,r=t.version,i=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=n,this.stretchX=i,this.stretchY=o,this.content=a,this.version=r},fl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};fl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},fl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},fl.tlbr.get=function(){return this.tl.concat(this.br)},fl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(pl.prototype,fl);var dl=function(e,t){var n={},r={};this.haveRenderCallbacks=[];var i=[];this.addImages(e,n,i),this.addImages(t,r,i);var o=cl(i),a=new da({width:o.w||1,height:o.h||1});for(var s in e){var l=e[s],u=n[s].paddedRect;da.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in t){var p=t[c],f=r[c].paddedRect,d=f.x+1,h=f.y+1,m=p.data.width,v=p.data.height;da.copy(p.data,a,{x:0,y:0},{x:d,y:h},p.data),da.copy(p.data,a,{x:0,y:v-1},{x:d,y:h-1},{width:m,height:1}),da.copy(p.data,a,{x:0,y:0},{x:d,y:h+v},{width:m,height:1}),da.copy(p.data,a,{x:m-1,y:0},{x:d-1,y:h},{width:1,height:v}),da.copy(p.data,a,{x:0,y:0},{x:d+m,y:h},{width:1,height:v})}this.image=a,this.iconPositions=n,this.patternPositions=r};dl.prototype.addImages=function(e,t,n){for(var r in e){var i=e[r],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};n.push(o),t[r]=new pl(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(r)}},dl.prototype.patchUpdatedImages=function(e,t){for(var n in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[n],e.getImage(n),t),this.patchUpdatedImage(this.patternPositions[n],e.getImage(n),t)},dl.prototype.patchUpdatedImage=function(e,t,n){if(e&&t&&e.version!==t.version){e.version=t.version;var r=e.tl;n.update(t.data,void 0,{x:r[0],y:r[1]})}},Dr("ImagePosition",pl),Dr("ImageAtlas",dl);var hl={horizontal:1,vertical:2,horizontalOnly:3},ml=function(){this.scale=1,this.fontStack="",this.imageName=null};ml.forText=function(e,t){var n=new ml;return n.scale=e||1,n.fontStack=t,n},ml.forImage=function(e){var t=new ml;return t.imageName=e,t};var vl=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function gl(e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m){var v,g=vl.fromFeature(e,i);p===hl.vertical&&g.verticalizePunctuation();var y=ni.processBidirectionalText,b=ni.processStyledBidirectionalText;if(y&&1===g.sections.length){v=[];for(var _=0,x=y(g.toString(),El(g,u,o,t,r,d,h));_0&&z>k&&(k=z)}else{var B=n[T.fontStack],F=B&&B[P];if(F&&F.rect)I=F.rect,M=F.metrics;else{var U=t[T.fontStack],V=U&&U[P];if(!V)continue;M=V.metrics}A=24*(x-T.scale)}R?(e.verticalizable=!0,E.push({glyph:P,imageName:j,x:f,y:d+A,vertical:R,scale:T.scale,fontStack:T.fontStack,sectionIndex:C,metrics:M,rect:I}),f+=D*T.scale+u):(E.push({glyph:P,imageName:j,x:f,y:d+A,vertical:R,scale:T.scale,fontStack:T.fontStack,sectionIndex:C,metrics:M,rect:I}),f+=M.advance*T.scale+u)}0!==E.length&&(h=Math.max(f-u,h),Ol(E,0,E.length-1,v,k)),f=0;var H=o*x+k;S.lineOffset=Math.max(k,w),d+=H,m=Math.max(H,m),++g}else d+=o,++g}var q,G=d- -17,W=kl(a),K=W.horizontalAlign,Z=W.verticalAlign;(function(e,t,n,r,i,o,a,s,l){var u,c=(t-n)*i;u=o!==a?-s*r- -17:(-r*l+.5)*a;for(var p=0,f=e;p=0&&r>=e&&yl[this.text.charCodeAt(r)];r--)n--;this.text=this.text.substring(e,n),this.sectionIndex=this.sectionIndex.slice(e,n)},vl.prototype.substring=function(e,t){var n=new vl;return n.text=this.text.substring(e,t),n.sectionIndex=this.sectionIndex.slice(e,t),n.sections=this.sections,n},vl.prototype.toString=function(){return this.text},vl.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce(function(t,n){return Math.max(t,e.sections[n].scale)},0)},vl.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(ml.forText(e.scale,e.fontStack||t));for(var n=this.sections.length-1,r=0;r=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var yl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},bl={};function _l(e,t,n,r,i,o){if(t.imageName){var a=r[t.imageName];return a?a.displaySize[0]*t.scale*24/o+i:0}var s=n[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function xl(e,t,n,r){var i=Math.pow(e-t,2);return r?e=0,p=0,f=0;f-n/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],u=0;sr;)u-=l.shift().angleDelta;if(u>i)return!1;a++,s+=c.dist(p)}return!0}function Dl(e){for(var t=0,n=0;nu){var h=(u-l)/d,m=Ft(p.x,f.x,h),v=Ft(p.y,f.y,h),g=new Cl(m,v,f.angleTo(p),c);return g._round(),!a||jl(e,g,s,a,t)?g:void 0}l+=d}}function zl(e,t,n,r,i,o,a,s,l){var u=Rl(r,o,a),c=Ll(r,i),p=c*a,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-p=0&&x=0&&w=0&&d+c<=p){var S=new Cl(x,w,b,m);S._round(),i&&!jl(t,S,a,i,o)||h.push(S)}}f+=y}return l||h.length||s||(h=e(t,f/2,r,i,o,a,s,!0,u)),h}(e,f?t/2*s%t:(c/2+2*o)*a*s%t,t,u,n,p,f,!1,l)}function Bl(e,t,n,r,o){for(var a=[],s=0;s=r&&f.x>=r||(p.x>=r?p=new i(r,p.y+(r-p.x)/(f.x-p.x)*(f.y-p.y))._round():f.x>=r&&(f=new i(r,p.y+(r-p.x)/(f.x-p.x)*(f.y-p.y))._round()),p.y>=o&&f.y>=o||(p.y>=o?p=new i(p.x+(o-p.y)/(f.y-p.y)*(f.x-p.x),o)._round():f.y>=o&&(f=new i(p.x+(o-p.y)/(f.y-p.y)*(f.x-p.x),o)._round()),u&&p.equals(u[u.length-1])||a.push(u=[p]),u.push(f)))))}return a}function Fl(e,t,n,r){var o=[],a=e.image,s=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2,c=e.right-e.left,p=e.bottom-e.top,f=a.stretchX||[[0,l]],d=a.stretchY||[[0,u]],h=function(e,t){return e+t[1]-t[0]},m=f.reduce(h,0),v=d.reduce(h,0),g=l-m,y=u-v,b=0,_=m,x=0,w=v,S=0,E=g,k=0,O=y;if(a.content&&r){var T=a.content;b=Ul(f,0,T[0]),x=Ul(d,0,T[1]),_=Ul(f,T[0],T[2]),w=Ul(d,T[1],T[3]),S=T[0]-b,k=T[1]-x,E=T[2]-T[0]-_,O=T[3]-T[1]-w}var C=function(r,o,l,u){var f=Hl(r.stretch-b,_,c,e.left),d=ql(r.fixed-S,E,r.stretch,m),h=Hl(o.stretch-x,w,p,e.top),g=ql(o.fixed-k,O,o.stretch,v),y=Hl(l.stretch-b,_,c,e.left),T=ql(l.fixed-S,E,l.stretch,m),C=Hl(u.stretch-x,w,p,e.top),P=ql(u.fixed-k,O,u.stretch,v),A=new i(f,h),M=new i(y,h),I=new i(y,C),j=new i(f,C),D=new i(d/s,g/s),R=new i(T/s,P/s),L=t*Math.PI/180;if(L){var N=Math.sin(L),z=Math.cos(L),B=[z,-N,N,z];A._matMult(B),M._matMult(B),j._matMult(B),I._matMult(B)}var F=r.stretch+r.fixed,U=o.stretch+o.fixed;return{tl:A,tr:M,bl:j,br:I,tex:{x:a.paddedRect.x+1+F,y:a.paddedRect.y+1+U,w:l.stretch+l.fixed-F,h:u.stretch+u.fixed-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:R,minFontScaleX:E/s/c,minFontScaleY:O/s/p,isSDF:n}};if(r&&(a.stretchX||a.stretchY))for(var P=Vl(f,g,m),A=Vl(d,y,v),M=0;M0&&(h=Math.max(10,h),this.circleDiameter=h)}else{var m=a.top*s-l,v=a.bottom*s+l,g=a.left*s-l,y=a.right*s+l,b=a.collisionPadding;if(b&&(g-=b[0]*s,m-=b[1]*s,y+=b[2]*s,v+=b[3]*s),c){var _=new i(g,m),x=new i(y,m),w=new i(g,v),S=new i(y,v),E=c*Math.PI/180;_._rotate(E),x._rotate(E),w._rotate(E),S._rotate(E),g=Math.min(_.x,x.x,w.x,S.x),y=Math.max(_.x,x.x,w.x,S.x),m=Math.min(_.y,x.y,w.y,S.y),v=Math.max(_.y,x.y,w.y,S.y)}e.emplaceBack(t.x,t.y,g,m,y,v,n,r,o)}this.boxEndIndex=e.length},Wl=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=Kl),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function Kl(e,t){return et?1:0}function Zl(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!1);for(var r=1/0,o=1/0,a=-1/0,s=-1/0,l=e[0],u=0;ua)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var p=Math.min(a-r,s-o),f=p/2,d=new Wl([],Yl);if(0===p)return new i(r,o);for(var h=r;hv.d||!v.d)&&(v=y,n&&console.log("found best %d after %d probes",Math.round(1e4*y.d)/1e4,g)),y.max-v.d<=t||(d.push(new Xl(y.p.x-(f=y.h/2),y.p.y-f,f,e)),d.push(new Xl(y.p.x+f,y.p.y-f,f,e)),d.push(new Xl(y.p.x-f,y.p.y+f,f,e)),d.push(new Xl(y.p.x+f,y.p.y+f,f,e)),g+=4)}return n&&(console.log("num probes: "+g),console.log("best distance: "+v.d)),v.p}function Yl(e,t){return t.max-e.max}function Xl(e,t,n,r){this.p=new i(e,t),this.h=n,this.d=function(e,t){for(var n=!1,r=1/0,i=0;ie.y!=c.y>e.y&&e.x<(c.x-u.x)*(e.y-u.y)/(c.y-u.y)+u.x&&(n=!n),r=Math.min(r,Go(e,u,c))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}Wl.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},Wl.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},Wl.prototype.peek=function(){return this.data[0]},Wl.prototype._up=function(e){for(var t=this.data,n=this.compare,r=t[e];e>0;){var i=e-1>>1,o=t[i];if(n(r,o)>=0)break;t[e]=o,e=i}t[e]=r},Wl.prototype._down=function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e];e=0)break;t[e]=a,e=o}t[e]=i};var Jl=Number.POSITIVE_INFINITY;function $l(e,t){return t[1]!==Jl?function(e,t,n){var r=0,i=0;switch(t=Math.abs(t),n=Math.abs(n),e){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(e){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,i]}(e,t[0],t[1]):function(e,t){var n=0,r=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-t;break;case"top":r=t-7}switch(e){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=t;break;case"right":n=-t}return[n,r]}(e,t[0])}function Ql(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function eu(e,t,n,r,o,a,s,l,u,c,p,f,d,h,m){var v=function(e,t,n,r,o,a,s,l){for(var u=r.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[],p=0,f=t.positionedLines;p32640&&x(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===g.kind&&((y=[128*h.compositeTextSizes[0].evaluate(s,{},m),128*h.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||y[1]>32640)&&x(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),e.addSymbols(e.text,v,y,l,a,s,c,t,u.lineStartIndex,u.lineLength,d,m);for(var b=0,_=p;b<_.length;b+=1)f[_[b]]=e.text.placedSymbolArray.length-1;return 4*v.length}function tu(e){for(var t in e)return e[t];return null}function nu(e,t,n,r){var i=e.compareText;if(t in i){for(var o=i[t],a=o.length-1;a>=0;a--)if(r.dist(o[a])0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],l||u){for(var p=t.iconDependencies,f=t.glyphDependencies,d=t.availableImages,h=new ri(this.zoom),m=0,v=e;m=0;for(var j=0,D=E.sections;j=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l0},cu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},cu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},cu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},cu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},cu.prototype.addIndicesForPlacedSymbol=function(e,t){for(var n=e.placedSymbolArray.get(t),r=n.vertexStartIndex+4*n.numGlyphs,i=n.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,r=this.symbolInstanceIndexes;n=0&&r.indexOf(e)===n&&t.addIndicesForPlacedSymbol(t.text,e)}),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,i.verticalPlacedTextSymbolIndex),i.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.placedIconSymbolIndex),i.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Dr("SymbolBucket",cu,{omit:["layers","collisionBoxArray","features","compareText"]}),cu.MAX_GLYPHS=65535,cu.addDynamicAttributes=au;var pu=new gi({"symbol-placement":new fi(ke.layout_symbol["symbol-placement"]),"symbol-spacing":new fi(ke.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fi(ke.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new di(ke.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fi(ke.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fi(ke.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new fi(ke.layout_symbol["icon-ignore-placement"]),"icon-optional":new fi(ke.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fi(ke.layout_symbol["icon-rotation-alignment"]),"icon-size":new di(ke.layout_symbol["icon-size"]),"icon-text-fit":new fi(ke.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fi(ke.layout_symbol["icon-text-fit-padding"]),"icon-image":new di(ke.layout_symbol["icon-image"]),"icon-rotate":new di(ke.layout_symbol["icon-rotate"]),"icon-padding":new fi(ke.layout_symbol["icon-padding"]),"icon-keep-upright":new fi(ke.layout_symbol["icon-keep-upright"]),"icon-offset":new di(ke.layout_symbol["icon-offset"]),"icon-anchor":new di(ke.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fi(ke.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fi(ke.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fi(ke.layout_symbol["text-rotation-alignment"]),"text-field":new di(ke.layout_symbol["text-field"]),"text-font":new di(ke.layout_symbol["text-font"]),"text-size":new di(ke.layout_symbol["text-size"]),"text-max-width":new di(ke.layout_symbol["text-max-width"]),"text-line-height":new fi(ke.layout_symbol["text-line-height"]),"text-letter-spacing":new di(ke.layout_symbol["text-letter-spacing"]),"text-justify":new di(ke.layout_symbol["text-justify"]),"text-radial-offset":new di(ke.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fi(ke.layout_symbol["text-variable-anchor"]),"text-anchor":new di(ke.layout_symbol["text-anchor"]),"text-max-angle":new fi(ke.layout_symbol["text-max-angle"]),"text-writing-mode":new fi(ke.layout_symbol["text-writing-mode"]),"text-rotate":new di(ke.layout_symbol["text-rotate"]),"text-padding":new fi(ke.layout_symbol["text-padding"]),"text-keep-upright":new fi(ke.layout_symbol["text-keep-upright"]),"text-transform":new di(ke.layout_symbol["text-transform"]),"text-offset":new di(ke.layout_symbol["text-offset"]),"text-allow-overlap":new fi(ke.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new fi(ke.layout_symbol["text-ignore-placement"]),"text-optional":new fi(ke.layout_symbol["text-optional"])}),fu={paint:new gi({"icon-opacity":new di(ke.paint_symbol["icon-opacity"]),"icon-color":new di(ke.paint_symbol["icon-color"]),"icon-halo-color":new di(ke.paint_symbol["icon-halo-color"]),"icon-halo-width":new di(ke.paint_symbol["icon-halo-width"]),"icon-halo-blur":new di(ke.paint_symbol["icon-halo-blur"]),"icon-translate":new fi(ke.paint_symbol["icon-translate"]),"icon-translate-anchor":new fi(ke.paint_symbol["icon-translate-anchor"]),"text-opacity":new di(ke.paint_symbol["text-opacity"]),"text-color":new di(ke.paint_symbol["text-color"],{runtimeType:Ne,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new di(ke.paint_symbol["text-halo-color"]),"text-halo-width":new di(ke.paint_symbol["text-halo-width"]),"text-halo-blur":new di(ke.paint_symbol["text-halo-blur"]),"text-translate":new fi(ke.paint_symbol["text-translate"]),"text-translate-anchor":new fi(ke.paint_symbol["text-translate-anchor"])}),layout:pu},du=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:je,this.defaultValue=e};du.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},du.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},du.prototype.outputDefined=function(){return!1},du.prototype.serialize=function(){return null},Dr("FormatSectionOverride",du,{omit:["defaultValue"]});var hu=function(e){function t(t){e.call(this,t,fu)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.recalculate=function(t,n){if(e.prototype.recalculate.call(this,t,n),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var i=[],o=0,a=r;o",targetMapId:r,sourceMapId:o.mapId})}}},Cu.prototype.receive=function(e){var t=e.data,n=t.id;if(n&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[n];var r=this.cancelCallbacks[n];delete this.cancelCallbacks[n],r&&r()}else E()||t.mustQueue?(this.tasks[n]=t,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,t)},Cu.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},Cu.prototype.processTask=function(e,t){var n=this;if(""===t.type){var r=this.callbacks[e];delete this.callbacks[e],r&&(t.error?r(Br(t.error)):r(null,Br(t.data)))}else{var i=!1,o=T(this.globalScope)?void 0:[],a=t.hasCallback?function(t,r){i=!0,delete n.cancelCallbacks[e],n.target.postMessage({id:e,type:"",sourceMapId:n.mapId,error:t?zr(t):null,data:zr(r,o)},o)}:function(e){i=!0},s=null,l=Br(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},Cu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Au=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Au.prototype.setNorthEast=function(e){return this._ne=e instanceof Mu?new Mu(e.lng,e.lat):Mu.convert(e),this},Au.prototype.setSouthWest=function(e){return this._sw=e instanceof Mu?new Mu(e.lng,e.lat):Mu.convert(e),this},Au.prototype.extend=function(e){var t,n,r=this._sw,i=this._ne;if(e instanceof Mu)t=e,n=e;else{if(!(e instanceof Au))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(Au.convert(e)):this.extend(Mu.convert(e)):this;if(n=e._ne,!(t=e._sw)||!n)return this}return r||i?(r.lng=Math.min(t.lng,r.lng),r.lat=Math.min(t.lat,r.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new Mu(t.lng,t.lat),this._ne=new Mu(n.lng,n.lat)),this},Au.prototype.getCenter=function(){return new Mu((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Au.prototype.getSouthWest=function(){return this._sw},Au.prototype.getNorthEast=function(){return this._ne},Au.prototype.getNorthWest=function(){return new Mu(this.getWest(),this.getNorth())},Au.prototype.getSouthEast=function(){return new Mu(this.getEast(),this.getSouth())},Au.prototype.getWest=function(){return this._sw.lng},Au.prototype.getSouth=function(){return this._sw.lat},Au.prototype.getEast=function(){return this._ne.lng},Au.prototype.getNorth=function(){return this._ne.lat},Au.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Au.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Au.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Au.prototype.contains=function(e){var t=Mu.convert(e),n=t.lng,r=t.lat,i=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&i},Au.convert=function(e){return!e||e instanceof Au?e:new Au(e)};var Mu=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Mu.prototype.wrap=function(){return new Mu(u(this.lng,-180,180),this.lat)},Mu.prototype.toArray=function(){return[this.lng,this.lat]},Mu.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Mu.prototype.distanceTo=function(e){var t=Math.PI/180,n=this.lat*t,r=e.lat*t,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-this.lng)*t);return 6371008.8*Math.acos(Math.min(i,1))},Mu.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new Au(new Mu(this.lng-n,this.lat-t),new Mu(this.lng+n,this.lat+t))},Mu.convert=function(e){if(e instanceof Mu)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Mu(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Mu(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Iu=2*Math.PI*6371008.8;function ju(e){return Iu*Math.cos(e*Math.PI/180)}function Du(e){return(180+e)/360}function Ru(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Lu(e,t){return e/ju(t)}function Nu(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}var zu=function(e,t,n){void 0===n&&(n=0),this.x=+e,this.y=+t,this.z=+n};zu.fromLngLat=function(e,t){void 0===t&&(t=0);var n=Mu.convert(e);return new zu(Du(n.lng),Ru(n.lat),Lu(t,n.lat))},zu.prototype.toLngLat=function(){return new Mu(360*this.x-180,Nu(this.y))},zu.prototype.toAltitude=function(){return this.z*ju(Nu(this.y))},zu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Iu*(e=Nu(this.y),1/Math.cos(e*Math.PI/180));var e};var Bu=function(e,t,n){this.z=e,this.x=t,this.y=n,this.key=Vu(0,e,e,t,n)};Bu.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Bu.prototype.url=function(e,t){var n,r,i,o,a,s=(r=this.y,i=this.z,o=Pu(256*(n=this.x),256*(r=Math.pow(2,i)-r-1),i),a=Pu(256*(n+1),256*(r+1),i),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(e,t,n){for(var r,i="",o=e;o>0;o--)i+=(t&(r=1<this.canonical.z?new Uu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Uu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Uu.prototype.calculateScaledKey=function(e,t){var n=this.canonical.z-e;return e>this.canonical.z?Vu(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Vu(this.wrap*+t,e,e,this.canonical.x>>n,this.canonical.y>>n)},Uu.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},Uu.prototype.children=function(e){if(this.overscaledZ>=e)return[new Uu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Uu(t,this.wrap,t,n,r),new Uu(t,this.wrap,t,n+1,r),new Uu(t,this.wrap,t,n,r+1),new Uu(t,this.wrap,t,n+1,r+1)]},Uu.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Hu.prototype._unpackMapbox=function(e,t,n){return(256*e*256+256*t+n)/10-1e4},Hu.prototype._unpackTerrarium=function(e,t,n){return 256*e+t+n/256-32768},Hu.prototype.getPixels=function(){return new da({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Hu.prototype.backfillBorder=function(e,t,n){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var r=t*this.dim,i=t*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(t){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}for(var s=-t*this.dim,l=-n*this.dim,u=o;u=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},Zu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new hs.VectorTile(new Hs(this.rawTileData)).layers,this.sourceLayerCoder=new qu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Zu.prototype.query=function(e,t,n,r){var o=this;this.loadVTLayers();for(var a=e.params||{},s=8192/e.tileSize/e.scale,l=nr(a.filter),u=e.queryGeometry,c=e.queryPadding*s,p=Xu(u),f=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),d=Xu(e.cameraQueryGeometry),h=0,m=this.grid3D.query(d.minX-c,d.minY-c,d.maxX+c,d.maxY+c,function(t,n,r,o){return function(e,t,n,r,o){for(var a=0,s=e;a=l.x&&o>=l.y)return!0}var u=[new i(t,n),new i(t,o),new i(r,o),new i(r,n)];if(e.length>2)for(var c=0,p=u;c=0)return!0;return!1}(o,p)){var f=this.sourceLayerCoder.decode(n),d=this.vtLayers[f].feature(r);if(i.filter(new ri(this.tileID.overscaledZ),d))for(var h=this.getId(d,f),m=0;mr)i=!1;else if(t)if(this.expirationTimeae&&(e.getActor().send("enforceCacheSizeLimit",oe),ce=0)},e.clamp=l,e.clearTileCache=function(e){var t=self.caches.delete("mapbox-tiles");e&&t.catch(e).then(function(){return e()})},e.clipLine=Bl,e.clone=function(e){var t=new ea(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=b,e.clone$2=function(e){var t=new ea(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.collisionCircleLayout=zs,e.config=N,e.create=function(){var e=new ea(16);return ea!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=function(){var e=new ea(9);return ea!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},e.create$2=function(){var e=new ea(4);return ea!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.createCommonjsModule=t,e.createExpression=Hn,e.createLayout=wi,e.createStyleLayer=function(e){return"custom"===e.type?new bu(e):new _u[e.type](e)},e.cross=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e},e.deepEqual=function e(t,n){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var r=0;r=N.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:n,cancelled:!1,cancel:function(){this.cancelled=!0}};return de.push(r),r}he++;var i=!1,o=function(){if(!i)for(i=!0,he--;de.length&&he0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e},e.number=Ft,e.offscreenCanvasSupported=pe,e.ortho=function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*u,e[15]=1,e},e.parseGlyphPBF=function(e){return new Hs(e).readFields(sl,[])},e.pbf=Hs,e.performSymbolLayout=function(e,t,n,r,i,o,a){e.createArrays(),e.tilePixelRatio=8192/(512*e.overscaling),e.compareText={},e.iconsNeedLinear=!1;var s=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var c=e.textSizeData,p=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new ri(c.minZoom),a),l["text-size"].possiblyEvaluate(new ri(p),a)]}if("composite"===e.iconSizeData.kind){var f=e.iconSizeData,d=f.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new ri(f.minZoom),a),l["icon-size"].possiblyEvaluate(new ri(d),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new ri(e.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new ri(e.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new ri(18));for(var h=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),v=s.get("text-keep-upright"),g=s.get("text-size"),y=function(){var o=_[b],l=s.get("text-font").evaluate(o,{},a).join(","),c=g.evaluate(o,{},a),p=u.layoutTextSize.evaluate(o,{},a),f=u.layoutIconSize.evaluate(o,{},a),d={horizontal:{},vertical:void 0},y=o.text,w=[0,0];if(y){var S=y.toString(),E=24*s.get("text-letter-spacing").evaluate(o,{},a),k=function(e){for(var t=0,n=S;t=8192||p.y<0||p.y>=8192||function(e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,v,g,y,b,_,w,S,E,k){var O,T,C,P,A,M=e.addToLineVertexArray(t,n),I=0,j=0,D=0,R=0,L=-1,N=-1,z={},B=lo(""),F=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(F=(O=s.layout.get("text-offset").evaluate(_,{},E).map(function(e){return 24*e}))[0],U=O[1]):(F=24*s.layout.get("text-radial-offset").evaluate(_,{},E),U=Jl),e.allowVerticalPlacement&&r.vertical){var V=s.layout.get("text-rotate").evaluate(_,{},E)+90;P=new Gl(l,t,u,c,p,r.vertical,f,d,h,V),a&&(A=new Gl(l,t,u,c,p,a,v,g,h,V))}if(i){var H=s.layout.get("icon-rotate").evaluate(_,{}),q="none"!==s.layout.get("icon-text-fit"),G=Fl(i,H,S,q),W=a?Fl(a,H,S,q):void 0;C=new Gl(l,t,u,c,p,i,v,g,!1,H),I=4*G.length;var K=e.iconSizeData,Z=null;"source"===K.kind?(Z=[128*s.layout.get("icon-size").evaluate(_,{})])[0]>32640&&x(e.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===K.kind&&((Z=[128*w.compositeIconSizes[0].evaluate(_,{},E),128*w.compositeIconSizes[1].evaluate(_,{},E)])[0]>32640||Z[1]>32640)&&x(e.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),e.addSymbols(e.icon,G,Z,b,y,_,!1,t,M.lineStartIndex,M.lineLength,-1,E),L=e.icon.placedSymbolArray.length-1,W&&(j=4*W.length,e.addSymbols(e.icon,W,Z,b,y,_,hl.vertical,t,M.lineStartIndex,M.lineLength,-1,E),N=e.icon.placedSymbolArray.length-1)}for(var Y in r.horizontal){var X=r.horizontal[Y];if(!T){B=lo(X.text);var J=s.layout.get("text-rotate").evaluate(_,{},E);T=new Gl(l,t,u,c,p,X,f,d,h,J)}var $=1===X.positionedLines.length;if(D+=eu(e,t,X,o,s,h,_,m,M,r.vertical?hl.horizontal:hl.horizontalOnly,$?Object.keys(r.horizontal):[Y],z,L,w,E),$)break}r.vertical&&(R+=eu(e,t,r.vertical,o,s,h,_,m,M,hl.vertical,["vertical"],z,N,w,E));var Q=T?T.boxStartIndex:e.collisionBoxArray.length,ee=T?T.boxEndIndex:e.collisionBoxArray.length,te=P?P.boxStartIndex:e.collisionBoxArray.length,ne=P?P.boxEndIndex:e.collisionBoxArray.length,re=C?C.boxStartIndex:e.collisionBoxArray.length,ie=C?C.boxEndIndex:e.collisionBoxArray.length,oe=A?A.boxStartIndex:e.collisionBoxArray.length,ae=A?A.boxEndIndex:e.collisionBoxArray.length,se=-1,le=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};se=le(T,se),se=le(P,se),se=le(C,se);var ue=(se=le(A,se))>-1?1:0;ue&&(se*=k/24),e.glyphOffsetArray.length>=cu.MAX_GLYPHS&&x("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,z.right>=0?z.right:-1,z.center>=0?z.center:-1,z.left>=0?z.left:-1,z.vertical||-1,L,N,B,Q,ee,te,ne,re,ie,oe,ae,u,D,R,I,j,ue,0,f,F,U,se)}(e,p,s,n,r,i,f,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,g,w,k,l,b,S,O,h,t,o,u,c,a)};if("line"===T)for(var M=0,I=Bl(t.geometry,0,0,8192,8192);M1){var F=Nl(B,E,n.vertical||m,r,24,y);F&&A(B,F)}}else if("Polygon"===t.type)for(var U=0,V=Ja(t.geometry,0);U=C.maxzoom||"none"!==C.visibility&&(a(T,this.zoom,r),(m[C.id]=C.createBucket({index:c.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,sourceID:this.source})).populate(x,v,this.tileID.canonical),c.bucketLayerIDs.push(T.map(function(e){return e.id})))}}}var P=e.mapObject(v.glyphDependencies,function(e){return Object.keys(e).map(Number)});Object.keys(P).length?o.send("getGlyphs",{uid:this.uid,stacks:P},function(e,t){p||(p=e,f=t,I.call(l))}):f={};var A=Object.keys(v.iconDependencies);A.length?o.send("getImages",{icons:A,source:this.source,tileID:this.tileID,type:"icons"},function(e,t){p||(p=e,d=t,I.call(l))}):d={};var M=Object.keys(v.patternDependencies);function I(){if(p)return s(p);if(f&&d&&h){var t=new i(f),n=new e.ImageAtlas(d,h);for(var o in m){var l=m[o];l instanceof e.SymbolBucket?(a(l.layers,this.zoom,r),e.performSymbolLayout(l,f,t.positions,d,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof e.LineBucket||l instanceof e.FillBucket||l instanceof e.FillExtrusionBucket)&&(a(l.layers,this.zoom,r),l.addFeatures(v,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:e.values(m).filter(function(e){return!e.isEmpty()}),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:n,glyphMap:this.returnDependencies?f:null,iconMap:this.returnDependencies?d:null,glyphPositions:this.returnDependencies?t.positions:null})}}M.length?o.send("getImages",{icons:M,source:this.source,tileID:this.tileID,type:"patterns"},function(e,t){p||(p=e,h=t,I.call(l))}):h={},I.call(this)};var l=function(e,t,n,r){this.actor=e,this.layerIndex=t,this.availableImages=n,this.loadVectorData=r||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(t,n){var r=this,i=t.uid;this.loading||(this.loading={});var a=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),s=this.loading[i]=new o(t);s.abort=this.loadVectorData(t,function(t,o){if(delete r.loading[i],t||!o)return s.status="done",r.loaded[i]=s,n(t);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);var c={};if(a){var p=a.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,r.layerIndex,r.availableImages,r.actor,function(t,r){if(t||!r)return n(t);n(null,e.extend({rawTileData:l.slice(0)},r,u,c))}),r.loaded=r.loaded||{},r.loaded[i]=s})},l.prototype.reloadTile=function(e,t){var n=this,r=this.loaded,i=e.uid,o=this;if(r&&r[i]){var a=r[i];a.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,r){var i=a.reloadCallback;i&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,n.availableImages,o.actor,i)),t(e,r)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(e,t){var n=this.loading,r=e.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),t()},l.prototype.removeTile=function(e,t){var n=this.loaded,r=e.uid;n&&n[r]&&delete n[r],t()};var u=e.window.ImageBitmap,c=function(){this.loaded={}};function p(e,t){if(0!==e.length){f(e[0],t);for(var n=1;n=0!=!!t&&e.reverse()}c.prototype.loadTile=function(t,n){var r=t.uid,i=t.encoding,o=t.rawImageData,a=u&&o instanceof u?this.getImageData(o):o,s=new e.DEMData(r,a,i);this.loaded=this.loaded||{},this.loaded[r]=s,n(null,s)},c.prototype.getImageData=function(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:n.width,height:n.height},n.data)},c.prototype.removeTile=function(e){var t=this.loaded,n=e.uid;t&&t[n]&&delete t[n]};var d=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,h=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};h.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],n=0,r=this._feature.geometry;n>31}function C(e,t){for(var n=e.loadGeometry(),r=e.type,i=0,o=0,a=n.length,s=0;s>1;!function e(t,n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(t,n,r,Math.max(i,Math.floor(r-l*c/s+p)),Math.min(o,Math.floor(r+(s-l)*c/s+p)),a)}var f=n[2*r+a],d=i,h=o;for(A(t,n,i,r),n[2*o+a]>f&&A(t,n,i,o);df;)h--}n[2*i+a]===f?A(t,n,i,h):A(t,n,++h,o),h<=r&&(i=h+1),r<=h&&(o=h-1)}}(t,n,s,i,o,a%2),e(t,n,r,i,s-1,a+1),e(t,n,r,s+1,o,a+1)}}(a,s,r,0,a.length-1,0)};R.prototype.range=function(e,t,n,r){return function(e,t,n,r,i,o,a){for(var s,l,u=[0,e.length-1,0],c=[];u.length;){var p=u.pop(),f=u.pop(),d=u.pop();if(f-d<=a)for(var h=d;h<=f;h++)l=t[2*h+1],(s=t[2*h])>=n&&s<=i&&l>=r&&l<=o&&c.push(e[h]);else{var m=Math.floor((d+f)/2);l=t[2*m+1],(s=t[2*m])>=n&&s<=i&&l>=r&&l<=o&&c.push(e[m]);var v=(p+1)%2;(0===p?n<=s:r<=l)&&(u.push(d),u.push(m-1),u.push(v)),(0===p?i>=s:o>=l)&&(u.push(m+1),u.push(f),u.push(v))}}return c}(this.ids,this.coords,e,t,n,r,this.nodeSize)},R.prototype.within=function(e,t,n){return function(e,t,n,r,i,o){for(var a=[0,e.length-1,0],s=[],l=i*i;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var f=p;f<=c;f++)I(t[2*f],t[2*f+1],n,r)<=l&&s.push(e[f]);else{var d=Math.floor((p+c)/2),h=t[2*d],m=t[2*d+1];I(h,m,n,r)<=l&&s.push(e[d]);var v=(u+1)%2;(0===u?n-i<=h:r-i<=m)&&(a.push(p),a.push(d-1),a.push(v)),(0===u?n+i>=h:r+i>=m)&&(a.push(d+1),a.push(c),a.push(v))}}return s}(this.ids,this.coords,e,t,n,this.nodeSize)};var L={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},N=function(e){this.options=q(Object.create(L),e),this.trees=new Array(this.options.maxZoom+1)};function z(e,t,n,r,i){return{x:e,y:t,zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function B(e,t){var n=e.geometry.coordinates,r=n[1];return{x:V(n[0]),y:H(r),zoom:1/0,index:t,parentId:-1}}function F(e){return{type:"Feature",id:e.id,properties:U(e),geometry:{type:"Point",coordinates:[(r=e.x,360*(r-.5)),(t=e.y,n=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var t,n,r}function U(e){var t=e.numPoints,n=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return q(q({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function V(e){return e/360+.5}function H(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function q(e,t){for(var n in t)e[n]=t[n];return e}function G(e){return e.x}function W(e){return e.y}function K(e,t,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var l=((e-n)*a+(t-r)*s)/(a*a+s*s);l>1?(n=i,r=o):l>0&&(n+=a*l,r+=s*l)}return(a=e-n)*a+(s=t-r)*s}function Z(e,t,n,r){var i={id:void 0===e?null:e,type:t,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,n=e.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)Y(e,t);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r0&&(a+=r?(i*u-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-o,2))),i=l,o=u}var c=t.length-3;t[2]=1,function e(t,n,r,i){for(var o,a=i,s=r-n>>1,l=r-n,u=t[n],c=t[n+1],p=t[r],f=t[r+1],d=n+3;da)o=d,a=h;else if(h===a){var m=Math.abs(d-s);mi&&(o-n>3&&e(t,n,o,i),t[o+2]=a,r-o>3&&e(t,o,r,i))}(t,0,c,n),t[c+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function Q(e,t,n,r){for(var i=0;i1?1:n}function ne(e,t,n,r,i,o,a,s){if(r/=t,o>=(n/=t)&&a=r)return null;for(var l=[],u=0;u=n&&h=r)){var m=[];if("Point"===f||"MultiPoint"===f)re(p,m,n,r,i);else if("LineString"===f)ie(p,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===f)ae(p,m,n,r,i,!1);else if("Polygon"===f)ae(p,m,n,r,i,!0);else if("MultiPolygon"===f)for(var v=0;v=n&&a<=r&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function ie(e,t,n,r,i,o,a){for(var s,l,u=oe(e),c=0===i?le:ue,p=e.start,f=0;fn&&(l=c(u,d,h,v,g,n),a&&(u.start=p+s*l)):y>r?b=n&&(l=c(u,d,h,v,g,n),_=!0),b>r&&y<=r&&(l=c(u,d,h,v,g,r),_=!0),!o&&_&&(a&&(u.end=p+s*l),t.push(u),u=oe(e)),a&&(p+=s)}var x=e.length-3;d=e[x],h=e[x+1],m=e[x+2],(y=0===i?d:h)>=n&&y<=r&&se(u,d,h,m),x=u.length-3,o&&x>=3&&(u[x]!==u[0]||u[x+1]!==u[1])&&se(u,u[0],u[1],u[2]),u.length&&t.push(u)}function oe(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function ae(e,t,n,r,i,o){for(var a=0;aa.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function me(e,t,n,r){var i=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&t.size<(i?a:r))n.numPoints+=t.length/3;else{for(var s=[],l=0;la)&&(n.numSimplified++,s.push(t[l]),s.push(t[l+1])),n.numPoints++;i&&function(e,t){for(var n=0,r=0,i=e.length,o=i-2;r0===t)for(r=0,i=e.length;r24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(e,t){var n=[];if("FeatureCollection"===e.type)for(var r=0;r=r;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new R(s,G,W,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return n&&console.timeEnd("total time"),this},N.prototype.getClusters=function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],t),s=this.getClusters([-180,r,i,o],t);return a.concat(s)}for(var l=this.trees[this._limitZoom(t)],u=[],c=0,p=l.range(V(n),H(o),V(i),H(r));c1?this._map(s,!0):null,h=(a<<5)+(t+1)+this.points.length,m=0,v=u;m>5},N.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},N.prototype._map=function(e,t){if(e.numPoints)return t?q({},e.properties):e.properties;var n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?q({},r):r},ge.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ge.prototype.splitTile=function(e,t,n,r,i,o,a){for(var s=[e,t,n,r],l=this.options,u=l.debug;s.length;){r=s.pop(),n=s.pop(),t=s.pop(),e=s.pop();var c=1<1&&console.time("creation"),f=this.tiles[p]=he(e,t,n,r,l),this.tileCoords.push({z:t,x:n,y:r}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,n,r,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var d="z"+t;this.stats[d]=(this.stats[d]||0)+1,this.total++}if(f.source=e,i){if(t===l.maxZoom||t===i)continue;var h=1<1&&console.time("clipping");var m,v,g,y,b,_,x=.5*l.buffer/l.extent,w=.5-x,S=.5+x,E=1+x;m=v=g=y=null,b=ne(e,c,n-x,n+S,0,f.minX,f.maxX,l),_=ne(e,c,n+w,n+E,0,f.minX,f.maxX,l),e=null,b&&(m=ne(b,c,r-x,r+S,1,f.minY,f.maxY,l),v=ne(b,c,r+w,r+E,1,f.minY,f.maxY,l),b=null),_&&(g=ne(_,c,r-x,r+S,1,f.minY,f.maxY,l),y=ne(_,c,r+w,r+E,1,f.minY,f.maxY,l),_=null),u>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*n,2*r),s.push(v||[],t+1,2*n,2*r+1),s.push(g||[],t+1,2*n+1,2*r),s.push(y||[],t+1,2*n+1,2*r+1)}}},ge.prototype.getTile=function(e,t,n){var r=this.options,i=r.extent,o=r.debug;if(e<0||e>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,n);for(var l,u=e,c=t,p=n;!l&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),l=this.tiles[ye(u,c,p)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,p),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,p,e,t,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?fe(this.tiles[s],i):null):null};var _e=function(t){function n(e,n,r,i){t.call(this,e,n,r,be),i&&(this.loadGeoJSON=i)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(r&&r.request&&r.request.collectResourceTiming)&&new e.RequestPerformance(r.request);this.loadGeoJSON(r,function(o,a){if(o||!a)return n(o);if("object"!=typeof a)return n(new Error("Input data given to '"+r.source+"' is not a valid GeoJSON object."));!function e(t,n){var r,i=t&&t.type;if("FeatureCollection"===i)for(r=0;r=0?0:t.button},n.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var f=function(t){function n(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,n=this.requestors;t=0?1.2:1))}function g(e,t,n,r,i,o,a){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])t(null,{stack:n,id:i,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],b.loadGlyphRange(n,s,r.url,r.requestManager,function(e,t){if(t){for(var n in t)r._doesCharSupportLocalGlyph(+n)||(o.glyphs[+n]=t[+n]);o.ranges[s]=!0}for(var i=0,a=l;i1&&(s=e[++a]);var u=Math.abs(l-s.left),c=Math.abs(l-s.right),p=Math.min(u,c),f=void 0,d=i/n*(r+1);if(s.isDash){var h=r-Math.abs(d);f=Math.sqrt(p*p+h*h)}else f=r-Math.sqrt(p*p+d*d);this.data[o+l]=Math.max(0,Math.min(255,f+128))}},S.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var n=e[t],r=e[t+1];n.zeroLength?e.splice(t,1):r&&r.isDash===n.isDash&&(r.left=n.left,e.splice(t,1))}var i=e[0],o=e[e.length-1];i.isDash===o.isDash&&(i.left=o.left-this.width,o.right=i.right+this.width);for(var a=this.width*this.nextRow,s=0,l=e[s],u=0;u1&&(l=e[++s]);var c=Math.abs(u-l.left),p=Math.abs(u-l.right),f=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?f:-f)+128))}},S.prototype.addDash=function(t,n){var r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a=r&&t.x=i&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+10&&(r.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",r))}})},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setData=function(t){var n=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(t){if(t)n.fire(new e.ErrorEvent(t));else{var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new e.Event("data",r))}}),this},n.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},n.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},n.prototype.getClusterLeaves=function(e,t,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:n},r),this},n.prototype._updateWorkerData=function(t){var n=this;this._loaded=!1;var r=e.extend({},this.workerOptions),i=this._data;"string"==typeof i?(r.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(i),this.actor.send(this.type+".loadData",r,function(e,i){n._removed||i&&i.abandoned||(n._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[n.id]&&(n._resourceTiming=i.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:r.source},null),t(e))})},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(t,n){var r=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor,t.request=this.actor.send(i,{type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(e,o){return delete t.request,t.unloadVectorData(),t.aborted?n(null):e?n(e):(t.loadVectorData(o,r.map.painter,"reloadTile"===i),n(null))})},n.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},n.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(e.Evented),M=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),I=function(t){function n(e,n,r,i){t.call(this),this.id=e,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=n}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.load=function(t,n){var r=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),function(i,o){r._loaded=!0,i?r.fire(new e.ErrorEvent(i)):o&&(r.image=o,t&&(r.coordinates=t),n&&n(),r._finishLoading())})},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,function(){t.texture=null}),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setCoordinates=function(t){var n=this;this.coordinates=t;var r=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0,s=t;an.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=t}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,n=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,M.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(I),D=function(t){function n(n,r,i,o){t.call(this,n,r,i,o),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(function(e){return!Array.isArray(e)||2!==e.length||e.some(function(e){return"number"!=typeof e})})||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,r=n.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,M.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(n,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},B.prototype.has=function(e){return e.wrapped().key in this.data},B.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},B.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},B.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},B.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},B.prototype.remove=function(e,t){if(!this.has(e))return this;var n=e.wrapped().key,r=void 0===t?0:this.data[n].indexOf(t),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this},B.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},B.prototype.filter=function(e){var t=[];for(var n in this.data)for(var r=0,i=this.data[n];r1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,n,r),e.neighboringTiles&&e.neighboringTiles[o]&&(e.neighboringTiles[o].backfilled=!0)))}},n.prototype.getTile=function(e){return this.getTileByID(e.key)},n.prototype.getTileByID=function(e){return this._tiles[e]},n.prototype._retainLoadedChildren=function(e,t,n,r){for(var i in this._tiles){var o=this._tiles[i];if(!(r[i]||!o.hasData()||o.tileID.overscaledZ<=t||o.tileID.overscaledZ>n)){for(var a=o.tileID;o&&o.tileID.overscaledZ>t+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){r[a.key]=a;break}}}},n.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var n=this._loadedParentTiles[e.key];return n&&n.tileID.overscaledZ>=t?n:null}for(var r=e.overscaledZ-1;r>=t;r--){var i=e.scaledTo(r),o=this._getLoadedTile(i);if(o)return o}},n.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},n.prototype.updateCacheSize=function(e){var t=Math.ceil(e.width/this._source.tileSize)+1,n=Math.ceil(e.height/this._source.tileSize)+1,r=Math.floor(t*n*5),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},n.prototype.handleWrapJump=function(e){var t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){var n={};for(var r in this._tiles){var i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+t),n[i.tileID.key]=i}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},n.prototype.update=function(t){var r=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)}):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter(function(e){return r._source.hasTile(e)}))):i=[];var o=t.coveringZoomLevel(this._source),a=Math.max(o-n.maxOverzooming,this._source.minzoom),s=Math.max(o+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(Ie(this._source.type)){for(var u={},c={},p=0,f=Object.keys(l);pthis._source.maxzoom){var v=h.children(this._source.maxzoom)[0],g=this.getTile(v);if(g&&g.hasData()){r[v.key]=v;continue}}else{var y=h.children(this._source.maxzoom);if(r[y[0].key]&&r[y[1].key]&&r[y[2].key]&&r[y[3].key])continue}for(var b=m.wasRequested(),_=h.overscaledZ-1;_>=o;--_){var x=h.scaledTo(_);if(i[x.key])break;if(i[x.key]=!0,!(m=this.getTile(x))&&b&&(m=this._addTile(x)),m&&(r[x.key]=x,b=m.wasRequested(),m.hasData()))break}}}return r},n.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],n=void 0,r=this._tiles[e].tileID;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}t.push(r.key);var i=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(i))break;r=i}for(var o=0,a=t;o0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},n.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},n.prototype.tilesIn=function(t,n,r){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=r?a.getCameraQueryGeometry(t):t,l=t.map(function(e){return a.pointCoordinate(e)}),u=s.map(function(e){return a.pointCoordinate(e)}),c=this.getIds(),p=1/0,f=1/0,d=-1/0,h=-1/0,m=0,v=u;m=0&&g[1].y+v>=0){var y=l.map(function(e){return s.getTilePoint(e)}),b=u.map(function(e){return s.getTilePoint(e)});o.push({tile:r,tileID:s,queryGeometry:y,cameraQueryGeometry:b,scale:m})}}},b=0;b=e.browser.now())return!0}return!1},n.prototype.setFeatureState=function(e,t,n){this._state.updateState(e=e||"_geojsonTileLayer",t,n)},n.prototype.removeFeatureState=function(e,t,n){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,n)},n.prototype.getFeatureState=function(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)},n.prototype.setDependencies=function(e,t,n){var r=this._tiles[e];r&&r.setDependencies(t,n)},n.prototype.reloadTilesForDependencies=function(e,t){for(var n in this._tiles)this._tiles[n].hasDependency(e,t)&&this._reloadTile(n,"reloading");this._cache.filter(function(n){return!n.hasDependency(e,t)})},n}(e.Evented);function Me(e,t){var n=Math.abs(2*e.wrap)-+(e.wrap<0),r=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||r-n||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Ie(e){return"raster"===e||"image"===e||"video"===e}function je(){return new e.window.Worker(Wi.workerUrl)}Ae.maxOverzooming=10,Ae.maxUnderzooming=3;var De="mapboxgl_preloaded_worker_pool",Re=function(){this.active={}};Re.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))};var Xe=function(e,t,n){var r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/n),this.yCellCount=Math.ceil(t/n);for(var o=0;o=-t[0]&&n<=t[0]&&r>=-t[1]&&r<=t[1]}function nt(t,n,r,i,o,a,s,l){var u=i?t.textSizeData:t.iconSizeData,c=e.evaluateSizeForZoom(u,r.transform.zoom),p=[256/r.width*2+1,256/r.height*2+1],f=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;f.clear();for(var d=t.lineVertexArray,h=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=r.transform.width/r.transform.height,v=!1,g=0;gMath.abs(r.x-n.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?n.yr.x)?{needsFlipping:!0}:null}function ot(t,n,r,i,o,a,s,l,u,c,p,f,d,h){var m,v=n/24,g=t.lineOffsetX*v,y=t.lineOffsetY*v;if(t.numGlyphs>1){var b=t.glyphStartIndex+t.numGlyphs,_=t.lineStartIndex,x=t.lineStartIndex+t.lineLength,w=rt(v,l,g,y,r,p,f,t,u,a,d);if(!w)return{notEnoughRoom:!0};var S=Qe(w.first.point,s).point,E=Qe(w.last.point,s).point;if(i&&!r){var k=it(t.writingMode,S,E,h);if(k)return k}m=[w.first];for(var O=t.glyphStartIndex+1;O0?A.point:at(f,P,T,1,o),I=it(t.writingMode,T,M,h);if(I)return I}var j=st(v*l.getoffsetX(t.glyphStartIndex),g,y,r,p,f,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,u,a,d);if(!j)return{notEnoughRoom:!0};m=[j]}for(var D=0,R=m;D0?1:-1,m=0;i&&(h*=-1,m=Math.PI),h<0&&(m+=Math.PI);for(var v=h>0?l+s:l+s+1,g=o,y=o,b=0,_=0,x=Math.abs(d),w=[];b+_<=x;){if((v+=h)=u)return null;if(y=g,w.push(g),void 0===(g=f[v])){var S=new e.Point(c.getx(v),c.gety(v)),E=Qe(S,p);if(E.signedDistanceFromCamera>0)g=f[v]=E.point;else{var k=v-h;g=at(0===b?a:new e.Point(c.getx(k),c.gety(k)),S,y,x-b+1,p)}}b+=_,_=y.dist(g)}var O=(x-b)/_,T=g.sub(y),C=T.mult(O)._add(y);C._add(T._unit()._perp()._mult(r*h));var P=m+Math.atan2(g.y-y.y,g.x-y.x);return w.push(C),{point:C,angle:P,path:w}}Xe.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Xe.prototype.insert=function(e,t,n,r,i){this._forEachCell(t,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Xe.prototype.insertCircle=function(e,t,n,r){this._forEachCell(t-r,n-r,t+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(n),this.circles.push(r)},Xe.prototype._insertBoxCell=function(e,t,n,r,i,o){this.boxCells[i].push(o)},Xe.prototype._insertCircleCell=function(e,t,n,r,i,o){this.circleCells[i].push(o)},Xe.prototype._query=function(e,t,n,r,i,o){if(n<0||e>this.width||r<0||t>this.height)return!i&&[];var a=[];if(e<=0&&t<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var s=0;s0:a},Xe.prototype._queryCircle=function(e,t,n,r,i){var o=e-n,a=e+n,s=t-n,l=t+n;if(a<0||o>this.width||l<0||s>this.height)return!r&&[];var u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:r,circle:{x:e,y:t,radius:n},seenUids:{box:{},circle:{}}},i),r?u.length>0:u},Xe.prototype.query=function(e,t,n,r,i){return this._query(e,t,n,r,!1,i)},Xe.prototype.hitTest=function(e,t,n,r,i){return this._query(e,t,n,r,!0,i)},Xe.prototype.hitTestCircle=function(e,t,n,r){return this._queryCircle(e,t,n,!0,r)},Xe.prototype._queryCell=function(e,t,n,r,i,o,a,s){var l=a.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,p=0,f=u;p=c[h+0]&&r>=c[h+1]&&(!s||s(this.boxKeys[d]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[d],x1:c[h],y1:c[h+1],x2:c[h+2],y2:c[h+3]})}}}var m=this.circleCells[i];if(null!==m)for(var v=this.circles,g=0,y=m;ga*a+s*s},Xe.prototype._circleAndRectCollide=function(e,t,n,r,i,o,a){var s=(o-r)/2,l=Math.abs(e-(r+s));if(l>s+n)return!1;var u=(a-i)/2,c=Math.abs(t-(i+u));if(c>u+n)return!1;if(l<=s||c<=u)return!0;var p=l-s,f=c-u;return p*p+f*f<=n*n};var lt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ut(e,t){for(var n=0;n=1;M--)A.push(C.path[M]);for(var I=1;I0){for(var L=A[0].clone(),N=A[0].clone(),z=1;z=k.x&&N.x<=O.x&&L.y>=k.y&&N.y<=O.y?[A]:N.xO.x||N.yO.y?[]:e.clipLine([A],k.x,k.y,O.x,O.y)}for(var B=0,F=R;B=this.screenRightBoundary||r<100||t>this.screenBottomBoundary},pt.prototype.isInsideGrid=function(e,t,n,r){return n>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(m=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={textOffset:v,width:n,height:r,anchor:e,textBoxScale:i,prevAnchor:m},this.markUsedJustification(f,e,p,d),f.allowVerticalPlacement&&(this.markUsedOrientation(f,d,p),this.placedOrientations[p.crossTileID]=d),{shift:g,placedGlyphBoxes:y}):void 0},xt.prototype.placeLayerBucketPart=function(t,n,r){var i=this,o=t.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,f=o.holdingForFade,d=o.collisionBoxArray,h=o.partiallyEvaluatedTextSize,m=o.collisionGroup,v=s.get("text-optional"),g=s.get("icon-optional"),y=s.get("text-allow-overlap"),b=s.get("icon-allow-overlap"),_="map"===s.get("text-rotation-alignment"),x="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),S="viewport-y"===s.get("symbol-z-order"),E=y&&(b||!a.hasIconData()||g),k=b&&(y||!a.hasTextData()||v);!a.collisionArrays&&d&&a.deserializeCollisionBoxes(d);var O=function(t,o){if(!n[t.crossTileID])if(f)i.placements[t.crossTileID]=new mt(!1,!1,!1);else{var d,S=!1,O=!1,T=!0,C=null,P={box:null,offscreen:null},A={box:null,offscreen:null},M=null,I=null,j=0,D=0,R=0;o.textFeatureIndex?j=o.textFeatureIndex:t.useRuntimeCollisionCircles&&(j=t.featureIndex),o.verticalTextFeatureIndex&&(D=o.verticalTextFeatureIndex);var L=o.textBox;if(L){var N=function(n){var r=e.WritingMode.horizontal;if(a.allowVerticalPlacement&&!n&&i.prevPlacement){var o=i.prevPlacement.placedOrientations[t.crossTileID];o&&(i.placedOrientations[t.crossTileID]=o,i.markUsedOrientation(a,r=o,t))}return r},z=function(n,r){if(a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var i=0,s=a.writingModes;i0&&(B=B.filter(function(e){return e!==F.anchor})).unshift(F.anchor)}var U=function(e,n,r){for(var o=e.x2-e.x1,s=e.y2-e.y1,u=t.textBoxScale,c=w&&!b?n:null,f={box:[],offscreen:!1},d=y?2*B.length:B.length,h=0;h=B.length,t,a,r,c);if(v&&(f=v.placedGlyphBoxes)&&f.box&&f.box.length){S=!0,C=v.shift;break}}return f};z(function(){return U(L,o.iconBox,e.WritingMode.horizontal)},function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&!(P&&P.box&&P.box.length)&&t.numVerticalGlyphVertices>0&&n?U(n,o.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}}),P&&(S=P.box,T=P.offscreen);var V=N(P&&P.box);if(!S&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[t.crossTileID];H&&(i.variableOffsets[t.crossTileID]=H,i.markUsedJustification(a,H.anchor,t,V))}}else{var q=function(e,n){var r=i.collisionIndex.placeCollisionBox(e,y,p,l,m.predicate);return r&&r.box&&r.box.length&&(i.markUsedOrientation(a,n,t),i.placedOrientations[t.crossTileID]=n),r};z(function(){return q(L,e.WritingMode.horizontal)},function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&n?q(n,e.WritingMode.vertical):{box:null,offscreen:null}}),N(P&&P.box&&P.box.length)}}if(S=(d=P)&&d.box&&d.box.length>0,T=d&&d.offscreen,t.useRuntimeCollisionCircles){var G=a.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),W=e.evaluateSizeForFeature(a.textSizeData,h,G),K=s.get("text-padding");M=i.collisionIndex.placeCollisionCircles(y,G,a.lineVertexArray,a.glyphOffsetArray,W,l,u,c,r,x,m.predicate,t.collisionCircleDiameter,K),S=y||M.circles.length>0&&!M.collisionDetected,T=T&&M.offscreen}if(o.iconFeatureIndex&&(R=o.iconFeatureIndex),o.iconBox){var Z=function(e){var t=w&&C?_t(e,C.x,C.y,_,x,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,b,p,l,m.predicate)};O=A&&A.box&&A.box.length&&o.verticalIconBox?(I=Z(o.verticalIconBox)).box.length>0:(I=Z(o.iconBox)).box.length>0,T=T&&I.offscreen}var Y=v||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,X=g||0===t.numIconVertices;if(Y||X?X?Y||(O=O&&S):S=O&&S:O=S=O&&S,S&&d&&d.box&&i.collisionIndex.insertCollisionBox(d.box,s.get("text-ignore-placement"),a.bucketInstanceId,A&&A.box&&D?D:j,m.ID),O&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get("icon-ignore-placement"),a.bucketInstanceId,R,m.ID),M&&(S&&i.collisionIndex.insertCollisionCircles(M.circles,s.get("text-ignore-placement"),a.bucketInstanceId,j,m.ID),r)){var J=a.bucketInstanceId,$=i.collisionCircleArrays[J];void 0===$&&($=i.collisionCircleArrays[J]=new vt);for(var Q=0;Q=0;--C){var P=T[C];O(a.symbolInstances.get(P),a.collisionArrays[P])}else for(var A=t.symbolInstanceStart;A=0&&(t.text.placedSymbolArray.get(l).crossTileID=o>=0&&l!==o?0:r.crossTileID)}},xt.prototype.markUsedOrientation=function(t,n,r){for(var i=n===e.WritingMode.horizontal||n===e.WritingMode.horizontalOnly?n:0,o=n===e.WritingMode.vertical?n:0,a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];a0,y=i.placedOrientations[o.crossTileID],b=y===e.WritingMode.vertical,_=y===e.WritingMode.horizontal||y===e.WritingMode.horizontalOnly;if(s>0||l>0){var x=At(v.text);h(t.text,s,b?Mt:x),h(t.text,l,_?Mt:x);var w=v.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach(function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=w||b?1:0)}),o.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||_?1:0);var S=i.variableOffsets[o.crossTileID];S&&i.markUsedJustification(t,S.anchor,o,y);var E=i.placedOrientations[o.crossTileID];E&&(i.markUsedJustification(t,"left",o,E),i.markUsedOrientation(t,E,o))}if(g){var k=At(v.icon),O=!(f&&o.verticalPlacedIconSymbolIndex&&b);o.placedIconSymbolIndex>=0&&(h(t.icon,o.numIconVertices,O?k:Mt),t.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=v.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(h(t.icon,o.numVerticalIconVertices,O?Mt:k),t.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var T=t.collisionArrays[r];if(T){var C=new e.Point(0,0);if(T.textBox||T.verticalTextBox){var P=!0;if(u){var A=i.variableOffsets[m];A?(C=bt(A.anchor,A.width,A.height,A.textOffset,A.textBoxScale),c&&C._rotate(p?i.transform.angle:-i.transform.angle)):P=!1}T.textBox&&wt(t.textCollisionBox.collisionVertexArray,v.text.placed,!P||b,C.x,C.y),T.verticalTextBox&&wt(t.textCollisionBox.collisionVertexArray,v.text.placed,!P||_,C.x,C.y)}var M=Boolean(!_&&T.verticalIconBox);T.iconBox&&wt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,M,f?C.x:0,f?C.y:0),T.verticalIconBox&&wt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,!M,f?C.x:0,f?C.y:0)}}},v=0;ve},xt.prototype.setStale=function(){this.stale=!0};var St=Math.pow(2,25),Et=Math.pow(2,24),kt=Math.pow(2,17),Ot=Math.pow(2,16),Tt=Math.pow(2,9),Ct=Math.pow(2,8),Pt=Math.pow(2,1);function At(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,n=Math.floor(127*e.opacity);return n*St+t*Et+n*kt+t*Ot+n*Tt+t*Ct+n*Pt+t}var Mt=0,It=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};It.prototype.continuePlacement=function(e,t,n,r,i){for(var o=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=n[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new It(s)),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},jt.prototype.commit=function(e){return this.placement.commit(e),this.placement};var Dt=512/e.EXTENT/2,Rt=function(e,t,n){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0;re.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var u=a[e.scaledTo(Number(o)).key];u&&u.findMatches(t.symbolInstances,e,i)}}for(var c=0;c1?"@2x":"",l=e.getJSON(n.transformRequest(n.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),function(e,t){l=null,a||(a=e,i=t,c())}),u=e.getImage(n.transformRequest(n.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),function(e,t){u=null,a||(a=e,o=t,c())});function c(){if(a)r(a);else if(i&&o){var t=e.browser.getImageData(o),n={};for(var s in i){var l=i[s],u=l.width,c=l.height,p=l.x,f=l.y,d=l.sdf,h=l.pixelRatio,m=l.stretchX,v=l.stretchY,g=l.content,y=new e.RGBAImage({width:u,height:c});e.RGBAImage.copy(t,y,{x:p,y:f},{x:0,y:0},{width:u,height:c}),n[s]={data:y,pixelRatio:h,sdf:d,stretchX:m,stretchY:v,content:g}}r(null,n)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(t,this.map._requestManager,function(t,r){if(n._spriteRequest=null,t)n.fire(new e.ErrorEvent(t));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n._availableImages=n.imageManager.listImages(),n.dispatcher.broadcast("setImages",n._availableImages),n.fire(new e.Event("data",{dataType:"style"}))})},n.prototype._validateLayer=function(t){var n=this.sourceCaches[t.source];if(n){var r=t.sourceLayer;if(r){var i=n.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new e.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"')))}}},n.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},n.prototype._serializeLayers=function(e){for(var t=[],n=0,r=e;n0)throw new Error("Unimplemented: "+i.map(function(e){return e.command}).join(", ")+".");return r.forEach(function(e){"setTransition"!==e.command&&n[e.command].apply(n,e.args)}),this.stylesheet=t,!0},n.prototype.addImage=function(t,n){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,n),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},n.prototype.getImage=function(e){return this.imageManager.getImage(e)},n.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(t,n,r){var i=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,n,null,r))){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var o=this.sourceCaches[t]=new Ae(t,n,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:t}}),o.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],r.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},n.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},n.prototype.addLayer=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var o;if("custom"===t.type){if(Bt(this,e.validateCustomStyleLayer(t)))return;o=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},r))return;o=e.createStyleLayer(t),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}var a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},n.prototype.moveLayer=function(t,n){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==n){var r=this._order.indexOf(t);this._order.splice(r,1);var i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(t){this._checkLoaded();var n=this._layers[t];if(n){n.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(e){return this._layers[e]},n.prototype.hasLayer=function(e){return e in this._layers},n.prototype.setLayerZoomRange=function(t,n,r){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,n))return null==n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateStyle.filter,"layers."+i.id+".filter",n,null,r)||(i.filter=e.clone$1(n),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},n.prototype.setLayoutProperty=function(t,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getLayoutProperty(n),r)||(o.setLayoutProperty(n,r,i),this._updateLayer(o)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(t,n){var r=this.getLayer(t);if(r)return r.getLayoutProperty(n);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(t,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getPaintProperty(n),r)||(o.setPaintProperty(n,r,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},n.prototype.setFeatureState=function(t,n){this._checkLoaded();var r=t.source,i=t.sourceLayer,o=this.sourceCaches[r];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,t.id,n)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(t,n){this._checkLoaded();var r=t.source,i=this.sourceCaches[r];if(void 0!==i){var o=i.getSource().type,a="vector"===o?t.sourceLayer:void 0;"vector"!==o||a?n&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(a,t.id,n):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(t){this._checkLoaded();var n=t.source,r=t.sourceLayer,i=this.sourceCaches[n];if(void 0!==i){if("vector"!==i.getSource().type||r)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,function(e){return e.serialize()}),layers:this._serializeLayers(this._order)},function(e){return void 0!==e})},n.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,n=function(e){return"fill-extrusion"===t._layers[e].type},r={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(n(a)){r[a]=o;for(var s=0,l=e;s=0;d--){var h=this._order[d];if(n(h))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(r[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Qt=yn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),en=yn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),tn=yn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),nn=yn("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),rn=yn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),on=yn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),an=yn("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),sn=yn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),ln=yn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),un=yn("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),cn=yn("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pn=yn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),fn=yn("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),dn=yn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),hn=yn("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),mn=yn("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),vn=yn("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),gn=yn("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function yn(e,t){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r={};return{fragmentSource:e=e.replace(n,function(e,t,n,i,o){return r[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+n+" "+i+" "+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n"}),vertexSource:t=t.replace(n,function(e,t,n,i,o){var a="float"===i?"vec2":"vec4",s=o.match(/color/)?"color":a;return r[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\nvarying "+n+" "+i+" "+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = a_"+o+";\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n"})}}var bn=Object.freeze({__proto__:null,prelude:Gt,background:Wt,backgroundPattern:Kt,circle:Zt,clippingMask:Yt,heatmap:Xt,heatmapTexture:Jt,collisionBox:$t,collisionCircle:Qt,debug:en,fill:tn,fillOutline:nn,fillOutlinePattern:rn,fillPattern:on,fillExtrusion:an,fillExtrusionPattern:sn,hillshadePrepare:ln,hillshade:un,line:cn,lineGradient:pn,linePattern:fn,lineSDF:dn,raster:hn,symbolIcon:mn,symbolSDF:vn,symbolTextAndIcon:gn}),_n=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};_n.prototype.bind=function(e,t,n,r,i,o,a,s){this.context=e;for(var l=this.boundPaintVertexBuffers.length!==r.length,u=0;!l&&u>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}xn.prototype.draw=function(e,t,n,r,i,o,a,s,l,u,c,p,f,d,h,m){var v,g=e.gl;if(!this.failedToCreate){for(var y in e.program.set(this.program),e.setDepthMode(n),e.setStencilMode(r),e.setColorMode(i),e.setCullFace(o),this.fixedUniforms)this.fixedUniforms[y].set(a[y]);d&&d.setUniforms(e,this.binderUniforms,p,{zoom:f});for(var b=(v={},v[g.LINES]=2,v[g.TRIANGLES]=3,v[g.LINE_STRIP]=1,v)[t],_=0,x=c.get();_0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Vn(i.paint.get("raster-hue-rotate"))};var o,a};function Vn(e){e*=Math.PI/180;var t=Math.sin(e),n=Math.cos(e);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}var Hn,qn=function(e,t,n,r,i,o,a,s,l,u){var c=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:u,u_texture:0}},Gn=function(t,n,r,i,o,a,s,l,u,c,p){var f=o.transform;return e.extend(qn(t,n,r,i,o,a,s,l,u,c),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+p})},Wn=function(t,n,r,i,o,a,s,l,u,c){return e.extend(Gn(t,n,r,i,o,a,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Kn=function(e,t,n){return{u_matrix:e,u_opacity:t,u_color:n}},Zn=function(t,n,r,i,o,a){return e.extend(function(e,t,n,r){var i=n.imageManager.getPattern(e.from.toString()),o=n.imageManager.getPattern(e.to.toString()),a=n.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,r.tileID.overscaledZ),c=r.tileSize*Math.pow(2,n.transform.tileZoom)/u,p=c*(r.tileID.canonical.x+r.tileID.wrap*u),f=c*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/ft(r,1,n.transform.tileZoom),u_pixel_coord_upper:[p>>16,f>>16],u_pixel_coord_lower:[65535&p,65535&f]}}(i,a,r,o),{u_matrix:t,u_opacity:n})},Yn={fillExtrusion:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fillExtrusionPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,n.u_height_factor),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fill:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},fillPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},fillOutline:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world)}},fillOutlinePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},circle:function(t,n){return{u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,n.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},collisionBox:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,n.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,n.u_overscale_factor)}},collisionCircle:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,n.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,n.u_viewport_size)}},debug:function(t,n){return{u_color:new e.UniformColor(t,n.u_color),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_overlay:new e.Uniform1i(t,n.u_overlay),u_overlay_scale:new e.Uniform1f(t,n.u_overlay_scale)}},clippingMask:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmap:function(t,n){return{u_extrude_scale:new e.Uniform1f(t,n.u_extrude_scale),u_intensity:new e.Uniform1f(t,n.u_intensity),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmapTexture:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_color_ramp:new e.Uniform1i(t,n.u_color_ramp),u_opacity:new e.Uniform1f(t,n.u_opacity)}},hillshade:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_latrange:new e.Uniform2f(t,n.u_latrange),u_light:new e.Uniform2f(t,n.u_light),u_shadow:new e.UniformColor(t,n.u_shadow),u_highlight:new e.UniformColor(t,n.u_highlight),u_accent:new e.UniformColor(t,n.u_accent)}},hillshadePrepare:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_dimension:new e.Uniform2f(t,n.u_dimension),u_zoom:new e.Uniform1f(t,n.u_zoom),u_maxzoom:new e.Uniform1f(t,n.u_maxzoom),u_unpack:new e.Uniform4f(t,n.u_unpack)}},line:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels)}},lineGradient:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_image:new e.Uniform1i(t,n.u_image)}},linePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texsize:new e.Uniform2f(t,n.u_texsize),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_image:new e.Uniform1i(t,n.u_image),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},lineSDF:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,n.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,n.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,n.u_sdfgamma),u_image:new e.Uniform1i(t,n.u_image),u_tex_y_a:new e.Uniform1f(t,n.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,n.u_tex_y_b),u_mix:new e.Uniform1f(t,n.u_mix)}},raster:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_tl_parent:new e.Uniform2f(t,n.u_tl_parent),u_scale_parent:new e.Uniform1f(t,n.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,n.u_buffer_scale),u_fade_t:new e.Uniform1f(t,n.u_fade_t),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image0:new e.Uniform1i(t,n.u_image0),u_image1:new e.Uniform1i(t,n.u_image1),u_brightness_low:new e.Uniform1f(t,n.u_brightness_low),u_brightness_high:new e.Uniform1f(t,n.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,n.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,n.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,n.u_spin_weights)}},symbolIcon:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture)}},symbolSDF:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}},symbolTextAndIcon:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texsize_icon:new e.Uniform2f(t,n.u_texsize_icon),u_texture:new e.Uniform1i(t,n.u_texture),u_texture_icon:new e.Uniform1i(t,n.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}},background:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_color:new e.UniformColor(t,n.u_color)}},backgroundPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image:new e.Uniform1i(t,n.u_image),u_pattern_tl_a:new e.Uniform2f(t,n.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,n.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,n.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,n.u_pattern_br_b),u_texsize:new e.Uniform2f(t,n.u_texsize),u_mix:new e.Uniform1f(t,n.u_mix),u_pattern_size_a:new e.Uniform2f(t,n.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,n.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,n.u_scale_a),u_scale_b:new e.Uniform1f(t,n.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,n.u_tile_units_to_pixels)}}};function Xn(t,n,r,i,o,a,s){for(var l=t.context,u=l.gl,c=t.useProgram("collisionBox"),p=[],f=0,d=0,h=0;h0){var x=e.create(),w=y;e.mul(x,g.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(x,x,g.placementViewportMatrix),p.push({circleArray:_,circleOffset:d,transform:w,invTransform:x}),d=f+=_.length/4}b&&c.draw(l,u.LINES,ke.disabled,Oe.disabled,t.colorModeForRenderPass(),Ce.disabled,An(y,t.transform,v),r.id,b.layoutVertexBuffer,b.indexBuffer,b.segments,null,t.transform.zoom,null,null,b.collisionVertexBuffer)}}if(s&&p.length){var S=t.useProgram("collisionCircle"),E=new e.StructArrayLayout2f1f2i16;E.resize(4*f),E._trim();for(var k=0,O=0,T=p;O=0&&(m[g.associatedIconIndex]={shiftedAnchor:E,angle:k})}else ut(g.numGlyphs,d)}if(p){h.clear();for(var T=t.icon.placedSymbolArray,C=0;C0){var s=e.browser.now(),l=(s-t.timeAdded)/a,u=n?(s-n.timeAdded)/a:-1,c=r.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),f=!n||Math.abs(n.tileID.overscaledZ-p)>Math.abs(t.tileID.overscaledZ-p),d=f&&t.refreshedUponExpiration?1:e.clamp(f?l:1-u,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),n?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}var lr=new e.Color(1,0,0,1),ur=new e.Color(0,1,0,1),cr=new e.Color(0,0,1,1),pr=new e.Color(1,0,1,1),fr=new e.Color(0,1,1,1);function dr(e,t,n,r){mr(e,0,t+n/2,e.transform.width,n,r)}function hr(e,t,n,r){mr(e,t-n/2,0,n,e.transform.height,r)}function mr(t,n,r,i,o,a){var s=t.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(n*e.browser.devicePixelRatio,r*e.browser.devicePixelRatio,i*e.browser.devicePixelRatio,o*e.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function vr(t,n,r){var i=t.context,o=i.gl,a=r.posMatrix,s=t.useProgram("debug"),l=ke.disabled,u=Oe.disabled,c=t.colorModeForRenderPass();i.activeTexture.set(o.TEXTURE0),t.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(i,o.LINE_STRIP,l,u,c,Ce.disabled,In(a,e.Color.red),"$debug",t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);var p=n.getTileByID(r.key).latestRawTileData,f=Math.floor((p&&p.byteLength||0)/1024),d=n.getTile(r).tileSize,h=512/Math.min(d,512)*(r.overscaledZ/t.transform.zoom)*.5,m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=" => "+r.overscaledZ),function(e,t){e.initDebugOverlayCanvas();var n=e.debugOverlayCanvas,r=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(n),e.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(t,m+" "+f+"kb"),s.draw(i,o.TRIANGLES,l,u,Te.alphaBlended,Ce.disabled,In(a,e.Color.transparent,h),"$debug",t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}var gr={symbol:function(t,n,r,i,o){if("translucent"===t.renderPass){var a=Oe.disabled,s=t.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(t,n,r,i,o,a,s){for(var l=n.transform,u="map"===o,c="map"===a,p=0,f=t;p256&&this.clearStencil(),n.setColorMode(Te.disabled),n.setDepthMode(ke.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=t;o256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Oe({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},yr.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Oe({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},yr.prototype.stencilConfigForOverlap=function(e){var t,n=this.context.gl,r=e.sort(function(e,t){return t.overscaledZ-e.overscaledZ}),i=r[r.length-1].overscaledZ,o=r[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s=0;this.currentLayer--){var _=this.style._layers[i[this.currentLayer]],x=o[_.source],w=c[_.source];this._renderTileClippingMasks(_,w),this.renderLayer(this,x,_,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},yr.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),n=this.imageManager.getPattern(e.to.toString());return!t||!n},yr.prototype.useProgram=function(e,t){this.cache=this.cache||{};var n=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new xn(this.context,bn[e],t,Yn[e],this._showOverdrawInspector)),this.cache[n]},yr.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},yr.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},yr.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},yr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var br=function(e,t){this.points=e,this.planes=t};br.fromInvProjectionMatrix=function(t,n,r){var i=Math.pow(2,r),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(n){return e.transformMat4([],n,t)}).map(function(t){return e.scale$1([],t,1/t[3]/n*i)}),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(t){var n=e.sub([],o[t[0]],o[t[1]]),r=e.sub([],o[t[2]],o[t[1]]),i=e.normalize([],e.cross([],n,r)),a=-e.dot(i,o[t[1]]);return i.concat(a)});return new br(o,a)};var _r=function(t,n){this.min=t,this.max=n,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};_r.prototype.quadrant=function(t){for(var n=[t%2==0,t<2],r=e.clone$2(this.min),i=e.clone$2(this.max),o=0;o=0;if(0===a)return 0;a!==n.length&&(r=!1)}if(r)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;pthis.max[l]-this.min[l])return 0}return 1};var xr=function(e,t,n,r){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),isNaN(e)||e<0||isNaN(t)||t<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=n,this.right=r};xr.prototype.interpolate=function(t,n,r){return null!=n.top&&null!=t.top&&(this.top=e.number(t.top,n.top,r)),null!=n.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,n.bottom,r)),null!=n.left&&null!=t.left&&(this.left=e.number(t.left,n.left,r)),null!=n.right&&null!=t.right&&(this.right=e.number(t.right,n.right,r)),this},xr.prototype.getCenter=function(t,n){var r=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+n-this.bottom)/2,0,n);return new e.Point(r,i)},xr.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},xr.prototype.clone=function(){return new xr(this.top,this.bottom,this.left,this.right)},xr.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wr=function(t,n,r,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new xr,this._posMatrixCache={},this._alignedPosMatrixCache={}},Sr={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wr.prototype.clone=function(){var e=new wr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},Sr.minZoom.get=function(){return this._minZoom},Sr.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},Sr.maxZoom.get=function(){return this._maxZoom},Sr.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},Sr.minPitch.get=function(){return this._minPitch},Sr.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},Sr.maxPitch.get=function(){return this._maxPitch},Sr.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},Sr.renderWorldCopies.get=function(){return this._renderWorldCopies},Sr.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},Sr.worldSize.get=function(){return this.tileSize*this.scale},Sr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Sr.size.get=function(){return new e.Point(this.width,this.height)},Sr.bearing.get=function(){return-this.angle/Math.PI*180},Sr.bearing.set=function(t){var n=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Sr.pitch.get=function(){return this._pitch/Math.PI*180},Sr.pitch.set=function(t){var n=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},Sr.fov.get=function(){return this._fov/Math.PI*180},Sr.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},Sr.zoom.get=function(){return this._zoom},Sr.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},Sr.center.get=function(){return this._center},Sr.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},Sr.padding.get=function(){return this._edgeInsets.toJSON()},Sr.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},Sr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wr.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},wr.prototype.interpolatePadding=function(e,t,n){this._unmodified=!1,this._edgeInsets.interpolate(e,t,n),this._constrain(),this._calcMatrices()},wr.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},wr.prototype.getVisibleUnwrappedCoordinates=function(t){var n=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),o=this.pointCoordinate(new e.Point(this.width,this.height)),a=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),l=Math.floor(Math.max(r.x,i.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&n.push(new e.UnwrappedTileID(u,t));return n},wr.prototype.coveringTiles=function(t){var n=this.coveringZoomLevel(t),r=n;if(void 0!==t.minzoom&&nt.maxzoom&&(n=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,n),a=[o*i.x,o*i.y,0],s=br.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=n);var u=function(e){return{aabb:new _r([e*o,0,0],[(e+1)*o,o,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},c=[],p=[],f=n,d=t.reparseOverscaled?r:n;if(this._renderWorldCopies)for(var h=1;h<=3;h++)c.push(u(-h)),c.push(u(h));for(c.push(u(0));c.length>0;){var m=c.pop(),v=m.x,g=m.y,y=m.fullyVisible;if(!y){var b=m.aabb.intersects(s);if(0===b)continue;y=2===b}var _=m.aabb.distanceX(a),x=m.aabb.distanceY(a),w=Math.max(Math.abs(_),Math.abs(x));if(m.zoom===f||w>3+(1<=l)p.push({tileID:new e.OverscaledTileID(m.zoom===f?d:m.zoom,m.wrap,m.zoom,v,g),distanceSq:e.sqrLen([a[0]-.5-v,a[1]-.5-g])});else for(var S=0;S<4;S++){var E=(v<<1)+S%2,k=(g<<1)+(S>>1);c.push({aabb:m.aabb.quadrant(S),zoom:m.zoom+1,x:E,y:k,wrap:m.wrap,fullyVisible:y})}}return p.sort(function(e,t){return e.distanceSq-t.distanceSq}).map(function(e){return e.tileID})},wr.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},Sr.unmodified.get=function(){return this._unmodified},wr.prototype.zoomScale=function(e){return Math.pow(2,e)},wr.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},wr.prototype.project=function(t){var n=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(n)*this.worldSize)},wr.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},Sr.point.get=function(){return this.project(this.center)},wr.prototype.setLocationAtPoint=function(t,n){var r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(t),a=new e.MercatorCoordinate(o.x-(r.x-i.x),o.y-(r.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},wr.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},wr.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},wr.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},wr.prototype.coordinateLocation=function(e){return e.toLngLat()},wr.prototype.pointCoordinate=function(t){var n=[t.x,t.y,0,1],r=[t.x,t.y,1,1];e.transformMat4(n,n,this.pixelMatrixInverse),e.transformMat4(r,r,this.pixelMatrixInverse);var i=n[3],o=r[3],a=n[1]/i,s=r[1]/o,l=n[2]/i,u=r[2]/o,c=l===u?0:(0-l)/(u-l);return new e.MercatorCoordinate(e.number(n[0]/i,r[0]/o,c)/this.worldSize,e.number(a,s,c)/this.worldSize)},wr.prototype.coordinatePoint=function(t){var n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix),new e.Point(n[0]/n[3],n[1]/n[3])},wr.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},wr.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},wr.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wr.prototype.calculatePosMatrix=function(t,n){void 0===n&&(n=!1);var r=t.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];var o=t.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*a,o.y*a,0]),e.scale(l,l,[a/e.EXTENT,a/e.EXTENT,1]),e.multiply(l,n?this.alignedProjMatrix:this.projMatrix,l),i[r]=new Float32Array(l),i[r]},wr.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,n,r,i,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=e.mercatorYfromLat(p[1])*this.worldSize,t=(a=e.mercatorYfromLat(p[0])*this.worldSize)-oa&&(i=a-v)}if(this.lngRange){var g=d.x,y=u.x/2;g-yl&&(r=l-y)}void 0===r&&void 0===i||(this.center=this.unproject(new e.Point(void 0!==r?r:d.x,void 0!==i?i:d.y))),this._unmodified=c,this._constraining=!1}},wr.prototype._calcMatrices=function(){if(this.height){var t=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var n=Math.PI/2+this._pitch,r=this._fov*(.5+t.y/this.height),i=Math.sin(r)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-n-r,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);e.perspective(c,this._fov,this.width/this.height,u,l),c[8]=2*-t.x/this.width,c[9]=2*t.y/this.height,e.scale(c,c,[1,-1,1]),e.translate(c,c,[0,0,-this.cameraToCenterDistance]),e.rotateX(c,c,this._pitch),e.rotateZ(c,c,this.angle),e.translate(c,c,[-a,-s,0]),this.mercatorMatrix=e.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),e.scale(c,c,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=e.invert([],this.projMatrix);var p=this.width%2/2,f=this.height%2/2,d=Math.cos(this.angle),h=Math.sin(this.angle),m=a-Math.round(a)+d*p+h*f,v=s-Math.round(s)+d*f+h*p,g=new Float64Array(c);if(e.translate(g,g,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=g,c=e.create(),e.scale(c,c,[this.width/2,-this.height/2,1]),e.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=e.create(),e.scale(c,c,[1,-1,1]),e.translate(c,c,[-1,-1,0]),e.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},wr.prototype.getCameraPoint=function(){var t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,t))},wr.prototype.getCameraQueryGeometry=function(t){var n=this.getCameraPoint();if(1===t.length)return[t[0],n];for(var r=n.x,i=n.y,o=n.x,a=n.y,s=0,l=t;s=3&&!e.some(function(e){return isNaN(e)})){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},Er.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(e){}};var kr={linearity:.3,easing:e.bezier(0,0,.3,1)},Or=e.extend({deceleration:2500,maxSpeed:1400},kr),Tr=e.extend({deceleration:20,maxSpeed:1400},kr),Cr=e.extend({deceleration:1e3,maxSpeed:360},kr),Pr=e.extend({deceleration:1e3,maxSpeed:90},kr),Ar=function(e){this._map=e,this.clear()};function Mr(e,t){(!e.duration||e.duration0&&n-t[0].time>160;)t.shift()},Ar.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},r=0,i=this._inertiaBuffer;r=this._clickTolerance||this._map.fire(new jr(e.type,this._map,e))},Lr.prototype.dblclick=function(e){return this._firePreventable(new jr(e.type,this._map,e))},Lr.prototype.mouseover=function(e){this._map.fire(new jr(e.type,this._map,e))},Lr.prototype.mouseout=function(e){this._map.fire(new jr(e.type,this._map,e))},Lr.prototype.touchstart=function(e){return this._firePreventable(new Dr(e.type,this._map,e))},Lr.prototype.touchmove=function(e){this._map.fire(new Dr(e.type,this._map,e))},Lr.prototype.touchend=function(e){this._map.fire(new Dr(e.type,this._map,e))},Lr.prototype.touchcancel=function(e){this._map.fire(new Dr(e.type,this._map,e))},Lr.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Lr.prototype.isEnabled=function(){return!0},Lr.prototype.isActive=function(){return!1},Lr.prototype.enable=function(){},Lr.prototype.disable=function(){};var Nr=function(e){this._map=e};Nr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Nr.prototype.mousemove=function(e){this._map.fire(new jr(e.type,this._map,e))},Nr.prototype.mousedown=function(){this._delayContextMenu=!0},Nr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Nr.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new jr(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},Nr.prototype.isEnabled=function(){return!0},Nr.prototype.isActive=function(){return!1},Nr.prototype.enable=function(){},Nr.prototype.disable=function(){};var zr=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function Br(e,t){for(var n={},r=0;rthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),r.length===this.numTouches&&(this.centroid=function(t){for(var n=new e.Point(0,0),r=0,i=t;r30)&&(this.aborted=!0)}}},Fr.prototype.touchend=function(e,t,n){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}};var Ur=function(e){this.singleTap=new Fr(e),this.numTaps=e.numTaps,this.reset()};Ur.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ur.prototype.touchstart=function(e,t,n){this.singleTap.touchstart(e,t,n)},Ur.prototype.touchmove=function(e,t,n){this.singleTap.touchmove(e,t,n)},Ur.prototype.touchend=function(e,t,n){var r=this.singleTap.touchend(e,t,n);if(r){var i=e.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(r)<30;if(i&&o||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}};var Vr=function(){this._zoomIn=new Ur({numTouches:1,numTaps:2}),this._zoomOut=new Ur({numTouches:2,numTaps:1}),this.reset()};Vr.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Vr.prototype.touchstart=function(e,t,n){this._zoomIn.touchstart(e,t,n),this._zoomOut.touchstart(e,t,n)},Vr.prototype.touchmove=function(e,t,n){this._zoomIn.touchmove(e,t,n),this._zoomOut.touchmove(e,t,n)},Vr.prototype.touchend=function(e,t,n){var r=this,i=this._zoomIn.touchend(e,t,n),o=this._zoomOut.touchend(e,t,n);return i?(this._active=!0,e.preventDefault(),setTimeout(function(){return r.reset()},0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(i)},{originalEvent:e})}}):o?(this._active=!0,e.preventDefault(),setTimeout(function(){return r.reset()},0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(o)},{originalEvent:e})}}):void 0},Vr.prototype.touchcancel=function(){this.reset()},Vr.prototype.enable=function(){this._enabled=!0},Vr.prototype.disable=function(){this._enabled=!1,this.reset()},Vr.prototype.isEnabled=function(){return this._enabled},Vr.prototype.isActive=function(){return this._active};var Hr=function(e){this.reset(),this._clickTolerance=e.clickTolerance||1};Hr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Hr.prototype._correctButton=function(e,t){return!1},Hr.prototype._move=function(e,t){return{}},Hr.prototype.mousedown=function(e,t){if(!this._lastPoint){var r=n.mouseButton(e);this._correctButton(e,r)&&(this._lastPoint=t,this._eventButton=r)}},Hr.prototype.mousemoveWindow=function(e,t){var n=this._lastPoint;if(n&&(e.preventDefault(),this._moved||!(t.dist(n)0&&(this._active=!0);var i=Br(r,n),o=new e.Point(0,0),a=new e.Point(0,0),s=0;for(var l in i){var u=i[l],c=this._touches[l];c&&(o._add(u),a._add(u.sub(c)),s++,i[l]=u)}if(this._touches=i,!(sMath.abs(e.x)}var ti=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,ei(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,n){var r=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,n){if(void 0!==this._valid)return this._valid;var r=e.mag()>=2,i=t.mag()>=2;if(r||i){if(!r||!i)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;var o=e.y>0==t.y>0;return ei(e)&&ei(t)&&o}},t}(Zr),ni={panStep:100,bearingStep:15,pitchStep:10},ri=function(){var e=ni;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep};function ii(e){return e*(2-e)}ri.prototype.reset=function(){this._active=!1},ri.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var n=0,r=0,i=0,o=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),o=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),o=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ii,zoom:n?Math.round(l)+n*(e.shiftKey?2:1):l,bearing:s.getBearing()+r*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-o*t._panStep,-a*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},ri.prototype.enable=function(){this._enabled=!0},ri.prototype.disable=function(){this._enabled=!1,this.reset()},ri.prototype.isEnabled=function(){return this._enabled},ri.prototype.isActive=function(){return this._active};var oi=function(t,n){this._map=t,this._el=t.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};oi.prototype.setZoomRate=function(e){this._defaultZoomRate=e},oi.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},oi.prototype.isEnabled=function(){return!!this._enabled},oi.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},oi.prototype.isZooming=function(){return!!this._zooming},oi.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},oi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},oi.prototype.wheel=function(t){if(this.isEnabled()){var n=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,r=e.browser.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%4.000244140625==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}},oi.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},oi.prototype._start=function(t){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=n.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},oi.prototype.renderFrame=function(){return this._onScrollFrame()},oi.prototype._onScrollFrame=function(){var t=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:n.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var p=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),f=u(p);a=e.number(l,s,f),p<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout(function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},oi.prototype._smoothOutEasing=function(t){var n=e.ease;if(this._prevEase){var r=this._prevEase,i=(e.browser.now()-r.start)/r.duration,o=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);n=e.bezier(a,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:n},n},oi.prototype.reset=function(){this._active=!1};var ai=function(e,t){this._clickZoom=e,this._tapZoom=t};ai.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ai.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ai.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ai.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var si=function(){this.reset()};si.prototype.reset=function(){this._active=!1},si.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(e.shiftKey?-1:1),around:n.unproject(t)},{originalEvent:e})}}},si.prototype.enable=function(){this._enabled=!0},si.prototype.disable=function(){this._enabled=!1,this.reset()},si.prototype.isEnabled=function(){return this._enabled},si.prototype.isActive=function(){return this._active};var li=function(){this._tap=new Ur({numTouches:1,numTaps:1}),this.reset()};li.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},li.prototype.touchstart=function(e,t,n){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=t[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(e,t,n))},li.prototype.touchmove=function(e,t,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var r=t[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,n)},li.prototype.touchend=function(e,t,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(e,t,n)&&(this._tapTime=e.timeStamp)},li.prototype.touchcancel=function(){this.reset()},li.prototype.enable=function(){this._enabled=!0},li.prototype.disable=function(){this._enabled=!1,this.reset()},li.prototype.isEnabled=function(){return this._enabled},li.prototype.isActive=function(){return this._active};var ui=function(e,t,n){this._el=e,this._mousePan=t,this._touchPan=n};ui.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ui.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ui.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ui.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ci=function(e,t,n){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=n};ci.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ci.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ci.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ci.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var pi=function(e,t,n,r){this._el=e,this._touchZoom=t,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0};pi.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},pi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},pi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},pi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},pi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},pi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var fi=function(e){return e.zoom||e.drag||e.pitch||e.rotate},di=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t}(e.Event);function hi(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var mi=function(t,r){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ar(t),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),e.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!1}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[e.window,"blur",void 0]];for(var o=0,a=this._listeners;oo?Math.min(2,x):Math.max(.5,x),w=Math.pow(v,1-t),S=i.unproject(b.add(_.mult(t*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?S.wrap():S,h)}r._fireMoveEvents(n)},function(e){r._afterEase(n,e)},t),this},n.prototype._prepareEase=function(t,n,r){void 0===r&&(r={}),this._moving=!0,n||r.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!r.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!r.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!r.pitching&&this.fire(new e.Event("pitchstart",t))},n.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},n.prototype._afterEase=function(t,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),o&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},n.prototype.flyTo=function(t,n){var r=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,n)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in t?e.clamp(+t.zoom,o.minZoom,o.maxZoom):a,p="bearing"in t?this._normalizeBearing(t.bearing,s):s,f="pitch"in t?+t.pitch:l,d="padding"in t?t.padding:o.padding,h=o.zoomScale(c-a),m=e.Point.convert(t.offset),v=o.centerPoint.add(m),g=o.pointLocation(v),y=e.LngLat.convert(t.center||g);this._normalizeCenter(y);var b=o.project(g),_=o.project(y).sub(b),x=t.curve,w=Math.max(o.width,o.height),S=w/h,E=_.mag();if("minZoom"in t){var k=e.clamp(Math.min(t.minZoom,a,c),o.minZoom,o.maxZoom),O=w/o.zoomScale(k-a);x=Math.sqrt(O/E*2)}var T=x*x;function C(e){var t=(S*S-w*w+(e?-1:1)*T*T*E*E)/(2*(e?S:w)*T*E);return Math.log(Math.sqrt(t*t+1)-t)}function P(e){return(Math.exp(e)-Math.exp(-e))/2}function A(e){return(Math.exp(e)+Math.exp(-e))/2}var M=C(0),I=function(e){return A(M)/A(M+x*e)},j=function(e){return w*((A(M)*(P(t=M+x*e)/A(t))-P(M))/T)/E;var t},D=(C(1)-M)/x;if(Math.abs(E)<1e-6||!isFinite(D)){if(Math.abs(w-S)<1e-6)return this.easeTo(t,n);var R=St.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=f!==l,this._padding=!o.isPaddingEqual(d),this._prepareEase(n,!1),this._ease(function(t){var i=t*D,h=1/I(i);o.zoom=1===t?c:a+o.scaleZoom(h),r._rotating&&(o.bearing=e.number(s,p,t)),r._pitching&&(o.pitch=e.number(l,f,t)),r._padding&&(o.interpolatePadding(u,d,t),v=o.centerPoint.add(m));var g=1===t?y:o.unproject(b.add(_.mult(j(i))).mult(h));o.setLocationAtPoint(o.renderWorldCopies?g.wrap():g,v),r._fireMoveEvents(n)},function(){return r._afterEase(n)},t),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,t)}if(!e){var r=this.handlers;r&&r.stop()}return this},n.prototype._ease=function(t,n,r){!1===r.animate||0===r.duration?(t(1),n()):(this._easeStart=e.browser.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(t,n){t=e.wrap(t,-180,180);var r=Math.abs(t-n);return Math.abs(t-360-n)180?-360:n<-180?360:0}},n}(e.Evented),gi=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};gi.prototype.getDefaultPosition=function(){return"bottom-right"},gi.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},gi.prototype.onRemove=function(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},gi.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var r=n.reduce(function(e,t,r){return t.value&&(e+=t.key+"="+t.value+(r=0)return!1;return!0})).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,e.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},gi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var yi=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};yi.prototype.onAdd=function(e){this._map=e,this._container=n.create("div","mapboxgl-ctrl");var t=n.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},yi.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},yi.prototype.getDefaultPosition=function(){return"bottom-left"},yi.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},yi.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},yi.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var bi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};bi.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},bi.prototype.remove=function(e){for(var t=this._currentlyRunning,n=0,r=t?this._queue.concat(t):this._queue;nt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var i=new wr(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(r.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new bi,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},_i,t.locale),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof wi))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return n._update(!1)}),this.on("moveend",function(){return n._update(!1)}),this.on("zoom",function(){return n._update(!0)}),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new mi(this,t),this._hash=t.hash&&new Er("string"==typeof t.hash&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new gi({customAttribution:t.customAttribution})),this.addControl(new yi,t.logoPosition),this.on("style.load",function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)}),this.on("data",function(t){n._update("style"===t.dataType),n.fire(new e.Event(t.dataType+"data",t))}),this.on("dataloading",function(t){n.fire(new e.Event(t.dataType+"dataloading",t))})}r&&(i.__proto__=r),(i.prototype=Object.create(r&&r.prototype)).constructor=i;var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(t,n){if(void 0===n&&t.getDefaultPosition&&(n=t.getDefaultPosition()),void 0===n&&(n="top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var r=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(t);return n>-1&&this._controls.splice(n,1),t.onRemove(this),this},i.prototype.resize=function(t){var n=this._containerDimensions(),r=n[0],i=n[1];this._resizeCanvas(r,i),this.transform.resize(r,i),this.painter.resize(r,i);var o=!this._moving;return o&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),o&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(e,t,n){var r,i=this;if("mouseenter"===e||"mouseover"===e){var o=!1;return{layer:t,listener:n,delegates:{mousemove:function(r){var a=i.getLayer(t)?i.queryRenderedFeatures(r.point,{layers:[t]}):[];a.length?o||(o=!0,n.call(i,new jr(e,i,r.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===e||"mouseout"===e){var a=!1;return{layer:t,listener:n,delegates:{mousemove:function(r){(i.getLayer(t)?i.queryRenderedFeatures(r.point,{layers:[t]}):[]).length?a=!0:a&&(a=!1,n.call(i,new jr(e,i,r.originalEvent)))},mouseout:function(t){a&&(a=!1,n.call(i,new jr(e,i,t.originalEvent)))}}}}return{layer:t,listener:n,delegates:(r={},r[e]=function(e){var r=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];r.length&&(e.features=r,n.call(i,e),delete e.features)},r)}},i.prototype.on=function(e,t,n){if(void 0===n)return r.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,n);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(o,i.delegates[o]);return this},i.prototype.once=function(e,t,n){if(void 0===n)return r.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,n);for(var o in i.delegates)this.once(o,i.delegates[o]);return this},i.prototype.off=function(e,t,n){var i=this;return void 0===n?r.prototype.off.call(this,e,t):(this._delegatedListeners&&this._delegatedListeners[e]&&function(r){for(var o=r[e],a=0;a180;){var s=r.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}Pi.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),n.disableDrag()},Pi.prototype.move=function(e,t){var n=this.map,r=this.mouseRotate.mousemoveWindow(e,t);if(r&&r.bearingDelta&&n.setBearing(n.getBearing()+r.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&n.setPitch(n.getPitch()+i.pitchDelta)}},Pi.prototype.off=function(){var e=this.element;n.removeEventListener(e,"mousedown",this.mousedown),n.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(e,"touchmove",this.touchmove),n.removeEventListener(e,"touchend",this.touchend),n.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Pi.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(e.window,"mousemove",this.mousemove),n.removeEventListener(e.window,"mouseup",this.mouseup)},Pi.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),n.mousePos(this.element,t)),n.addEventListener(e.window,"mousemove",this.mousemove),n.addEventListener(e.window,"mouseup",this.mouseup)},Pi.prototype.mousemove=function(e){this.move(e,n.mousePos(this.element,e))},Pi.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Pi.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Pi.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Pi.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)t.getEast()||n.latitudet.getNorth())},r.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},r.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},r.prototype._updateCamera=function(t){var n=new e.LngLat(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,i=this._map.getBearing(),o=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),o,{geolocateSource:!0})},r.prototype._updateMarker=function(t){if(t){var n=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},r.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),n=this._map.unproject([1,e]),r=t.distanceTo(n),i=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},r.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},r.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Ni)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(t){var r=this;if(this._container.addEventListener("contextmenu",function(e){return e.preventDefault()}),this._geolocateButton=n.create("button","mapboxgl-ctrl-geolocate",this._container),n.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Di(this._dotElement),this._circleElement=n.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Di({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(t){t.geolocateSource||"ACTIVE_LOCK"!==r._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new e.Event("trackuserlocationend")))})},r.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Li--,Ni=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Li>1?(t={maximumAge:6e5,timeout:0},Ni=!0):(t=this.options.positionOptions,Ni=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},r}(e.Evented),Bi={maxWidth:100,unit:"metric"},Fi=function(t){this.options=e.extend({},Bi,t),e.bindAll(["_onMove","setUnit"],this)};function Ui(e,t,n){var r=n&&n.maxWidth||100,i=e._container.clientHeight/2,o=e.unproject([0,i]),a=e.unproject([r,i]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){var l=3.2808*s;l>5280?Vi(t,r,l/5280,e._getUIString("ScaleControl.Miles")):Vi(t,r,l,e._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?Vi(t,r,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Vi(t,r,s/1e3,e._getUIString("ScaleControl.Kilometers")):Vi(t,r,s,e._getUIString("ScaleControl.Meters"))}function Vi(e,t,n,r){var i,o,a,s=(i=n,(o=Math.pow(10,(""+Math.floor(i)).length-1))*(a=(a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(a)));e.style.width=t*(s/n)+"px",e.innerHTML=s+" "+r}Fi.prototype.getDefaultPosition=function(){return"bottom-left"},Fi.prototype._onMove=function(){Ui(this._map,this._container,this.options)},Fi.prototype.onAdd=function(e){return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Fi.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Fi.prototype.setUnit=function(e){this.options.unit=e,Ui(this._map,this._container,this.options)};var Hi=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Hi.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Hi.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Hi.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Hi.prototype._setupUI=function(){var t=this._fullscreenButton=n.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);n.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Hi.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},Hi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Hi.prototype._isFullscreen=function(){return this._fullscreen},Hi.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Hi.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var qi={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Gi=function(t){function r(n){t.call(this),this.options=e.extend(Object.create(qi),n),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},r.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},r.prototype.setHTML=function(t){var n,r=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;n=i.firstChild;)r.appendChild(n);return this.setDOMContent(r)},r.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},r.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},r.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},r.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},r.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},r.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},r.prototype._createContent=function(){this._content&&n.remove(this._content),this._content=n.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},r.prototype._onMouseUp=function(e){this._update(e.point)},r.prototype._onMouseMove=function(e){this._update(e.point)},r.prototype._onDrag=function(e){this._update(e.point)},r.prototype._update=function(t){var r=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(e){return r._container.classList.add(e)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ai(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)){var i=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),o=this.options.anchor,a=function t(n){if(n){if("number"==typeof n){var r=Math.round(Math.sqrt(.5*Math.pow(n,2)));return{center:new e.Point(0,0),top:new e.Point(0,n),"top-left":new e.Point(r,r),"top-right":new e.Point(-r,r),bottom:new e.Point(0,-n),"bottom-left":new e.Point(r,-r),"bottom-right":new e.Point(-r,-r),left:new e.Point(n,0),right:new e.Point(-n,0)}}if(n instanceof e.Point||Array.isArray(n)){var i=e.Point.convert(n);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:e.Point.convert(n.center||[0,0]),top:e.Point.convert(n.top||[0,0]),"top-left":e.Point.convert(n["top-left"]||[0,0]),"top-right":e.Point.convert(n["top-right"]||[0,0]),bottom:e.Point.convert(n.bottom||[0,0]),"bottom-left":e.Point.convert(n["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(n["bottom-right"]||[0,0]),left:e.Point.convert(n.left||[0,0]),right:e.Point.convert(n.right||[0,0])}}return t(new e.Point(0,0))}(this.options.offset);if(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=i.y+a.bottom.ythis._map.transform.height-u?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=i.add(a[o]).round();n.setTransform(this._container,Mi[o]+" translate("+c.x+"px,"+c.y+"px)"),Ii(this._container,o,"popup")}},r.prototype._onClose=function(){this.remove()},r}(e.Evented),Wi={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:ki,NavigationControl:Ci,GeolocateControl:zi,AttributionControl:gi,ScaleControl:Fi,FullscreenControl:Hi,Popup:Gi,Marker:Di,Style:Ht,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:function(){ze().acquire(De)},clearPrewarmedResources:function(){var e=Le;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(De),Le=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Re.workerCount},set workerCount(e){Re.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return Wi}),n}()},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"===typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(64).compose;t.__esModule=!0,t.composeWithDevTools="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?r:r.apply(null,arguments)},t.devToolsEnhancer="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}}},,,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(n){}}return function(n,r,i,o,a,s,l,u,c,p){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(i[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}}()},function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");t.default=o},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");t.default=o},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");t.default=o},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;l.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),p=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),S="undefined"!==typeof WeakMap?new WeakMap:new n,E=function(){return function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new w(t,n,this);S.set(this,r)}}();["observe","unobserve","disconnect"].forEach(function(e){E.prototype[e]=function(){var t;return(t=S.get(this))[e].apply(t,arguments)}});var k="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:E;t.a=k}).call(this,n(63))},function(e,t,n){var r=n(330),i=n(338),o={decodeEntities:!0,lowerCaseAttributeNames:!1};function a(e,t){if("string"!==typeof e)throw new TypeError("First argument must be a string");return r(i(e,o),t)}a.domToReact=r,a.htmlToDOM=i,e.exports=a,e.exports.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=(0,i.default)();if(l||(l=(0,o.default)(s)),t.events)throw new Error("Event handlers cannot be overwritten.");if("string"===typeof e&&!document.getElementById(e))throw new Error('Element "'+e+'" does not exist.');t.events=a.default.proxyEvents(s);var u=new Promise(function(n){"object"===("undefined"===typeof e?"undefined":r(e))&&e.playVideo instanceof Function?n(e):l.then(function(r){var i=new r.Player(e,t);return s.on("ready",function(){n(i)}),null})}),c=a.default.promisifyPlayer(u,n);return c.on=s.on,c.off=s.off,c},e.exports=t.default},function(e,t,n){"use strict";(function(e){var n="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},r))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:l(s(e))}function u(e){return e&&e.referenceNode?e.referenceNode:e}var c=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?c:10===e?p:c||p}function d(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function h(e){return null!==e.parentNode?h(e.parentNode):e}function m(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||r.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||d(e.firstElementChild)===e)}(a)?a:d(a);var s=h(e);return s.host?m(s.host,t):m(e,h(t).host)}function v(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function g(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function b(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var _=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},x=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=f(10),i="HTML"===t.nodeName,o=k(e),s=k(t),u=l(e),c=a(t),p=parseFloat(c.borderTopWidth),d=parseFloat(c.borderLeftWidth);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=E({top:o.top-s.top-p,left:o.left-s.left-d,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!r&&i){var m=parseFloat(c.marginTop),g=parseFloat(c.marginLeft);h.top-=p-m,h.bottom-=p-m,h.left-=d-g,h.right-=d-g,h.marginTop=m,h.marginLeft=g}return(r&&!n?t.contains(u):t===u&&"BODY"!==u.nodeName)&&(h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=v(t,"top"),i=v(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}(h,t)),h}function T(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function C(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},c=i?T(e):m(e,u(t));if("viewport"===r)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=O(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:v(n),s=t?0:v(n,"left");return E({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}(c,i);else{var p=void 0;"scrollParent"===r?"BODY"===(p=l(s(t))).nodeName&&(p=e.ownerDocument.documentElement):p="window"===r?e.ownerDocument.documentElement:r;var f=O(p,c,i);if("HTML"!==p.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===a(t,"position"))return!0;var r=s(t);return!!r&&e(r)}(c))o=f;else{var d=b(e.ownerDocument),h=d.height,g=d.width;o.top+=f.top-f.marginTop,o.bottom=h+f.top,o.left+=f.left-f.marginLeft,o.right=g+f.left}}var y="number"===typeof(n=n||0);return o.left+=y?n:n.left||0,o.top+=y?n:n.top||0,o.right-=y?n:n.right||0,o.bottom-=y?n:n.bottom||0,o}function P(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=C(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map(function(e){return S({key:e},s[e],{area:(t=s[e],t.width*t.height)});var t}).sort(function(e,t){return t.area-e.area}),u=l.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),c=u.length>0?u[0].key:l[0].key,p=e.split("-")[1];return c+(p?"-"+p:"")}function A(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return O(n,r?T(t):m(t,u(n)),r)}function M(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function I(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function j(e,t,n){n=n.split("-")[0];var r=M(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",u=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[u]:t[I(s)],i}function D(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function R(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=D(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=E(t.offsets.popper),t.offsets.reference=E(t.offsets.reference),t=n(t,e))}),t}function L(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function N(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=W.indexOf(e),r=W.slice(n+1).concat(W.slice(0,n));return t?r.reverse():r}var Z={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Y(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(D(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(u=u.map(function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return E(s)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)})})).forEach(function(e,t){e.forEach(function(n,r){U(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))})}),i}var X={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",c={start:w({},l,o[l]),end:w({},l,o[l]+o[u]-a[u])};e.offsets.popper=S({},a,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=U(+n)?[+n,0]:Y(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||d(e.instance.popper);e.instance.reference===n&&(n=d(n));var r=N("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=C(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,p={primary:function(e){var n=c[e];return c[e]l[e]&&!t.escapeWithReference&&(r=Math.min(c[n],l[e]-("right"===e?c.width:c.height))),w({},n,r)}};return u.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=S({},c,p[t](e))}),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,s=o.popper,l=o.reference,u=-1!==["left","right"].indexOf(i),c=u?"height":"width",p=u?"Top":"Left",f=p.toLowerCase(),d=u?"left":"top",h=u?"bottom":"right",m=M(r)[c];l[h]-ms[h]&&(e.offsets.popper[f]+=l[f]+m-s[h]),e.offsets.popper=E(e.offsets.popper);var v=l[f]+l[c]/2-m/2,g=a(e.instance.popper),y=parseFloat(g["margin"+p]),b=parseFloat(g["border"+p+"Width"]),_=v-e.offsets.popper[f]-y-b;return _=Math.max(Math.min(s[c]-m,_),0),e.arrowElement=r,e.offsets.arrow=(w(n={},f,Math.round(_)),w(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(L(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=C(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=I(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Z.FLIP:a=[r,i];break;case Z.CLOCKWISE:a=K(r);break;case Z.COUNTERCLOCKWISE:a=K(r,!0);break;default:a=t.behavior}return a.forEach(function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=I(r);var u=e.offsets.popper,c=e.offsets.reference,p=Math.floor,f="left"===r&&p(u.right)>p(c.left)||"right"===r&&p(u.left)p(c.top)||"bottom"===r&&p(u.top)p(n.right),m=p(u.top)p(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===o&&d||y&&"end"===o&&h||!y&&"start"===o&&m||!y&&"end"===o&&v),_=!!t.flipVariationsByContent&&(y&&"start"===o&&h||y&&"end"===o&&d||!y&&"start"===o&&v||!y&&"end"===o&&m),x=b||_;(f||g||x)&&(e.flipped=!0,(f||g)&&(r=a[l+1]),x&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=S({},e.offsets.popper,j(e.instance.popper,e.offsets.reference,e.placement)),e=R(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=I(t),e.offsets.popper=E(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=D(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};_(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=S({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(S({},e.Defaults.modifiers,a.modifiers)).forEach(function(t){r.options.modifiers[t]=S({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return S({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return x(e,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=A(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=P(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=j(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=R(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,L(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[N("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=B(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),e}();J.Utils=("undefined"!==typeof window?window:e).PopperUtils,J.placements=G,J.Defaults=X,t.a=J}).call(this,n(63))},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.default=o},function(e,t,n){"use strict";var r=n(43);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(49)).default)(i.default.createElement("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"}),"FavoriteBorder");t.default=o},function(e,t,n){"use strict";var r=n(4),i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n'+Object(r.rb)(n)+""),i=''+(Object(r.rb)(s.title||"")||" ")+"",'
'+("rtl"===o.options.dir?i+" "+m:m+" "+i)+"
"+(p?'
':"")+(f?'
':"")+"
"},t.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"}},t.prototype.computeDisplayEventEnd=function(){return!1},t}(r.j),c=function(e){function t(t){var n=e.call(this)||this;return n.dayGrid=t,n}return o(t,e),t.prototype.attachSegs=function(e,t){var n=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.forEach(function(e,t){e.querySelector(".fc-content-skeleton > table").appendChild(n[t].tbodyEl)}),t||this.dayGrid.removeSegPopover()},t.prototype.detachSegs=function(){for(var e,t=this.rowStructs||[];e=t.pop();)Object(r.Pb)(e.tbodyEl);this.rowStructs=null},t.prototype.renderSegRows=function(e){var t,n,r=[];for(t=this.groupSegRows(e),n=0;n=e.firstCol)return!0;return!1}function f(e,t){return e.leftCol-t.leftCol}var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.attachSegs=function(e,t){var n=t.sourceSeg,i=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.forEach(function(e,t){var o,a,s=Object(r.sb)('
');n&&n.row===t?o=n.el:(o=e.querySelector(".fc-content-skeleton tbody"))||(o=e.querySelector(".fc-content-skeleton table")),a=o.getBoundingClientRect().top-e.getBoundingClientRect().top,s.style.top=a+"px",s.querySelector("table").appendChild(i[t].tbodyEl),e.appendChild(s)})},t}(c),h=function(e){function t(t){var n=e.call(this)||this;return n.fillSegTag="td",n.dayGrid=t,n}return o(t,e),t.prototype.renderSegs=function(t,n,r){"bgEvent"===t&&(r=r.filter(function(e){return e.eventRange.def.allDay})),e.prototype.renderSegs.call(this,t,n,r)},t.prototype.attachSegs=function(e,t){var n,r,i,o=[];for(n=0;n
')).getElementsByTagName("tr")[0],u>0&&Object(r.y)(o,new Array(u+1).join('')),t.el.colSpan=c-u,o.appendChild(t.el),c'));var p=a.renderProps.renderIntroHtml();return p&&(s?Object(r.y)(o,p):Object(r.Kb)(o,p)),i},t}(r.k),m=function(e){function t(t){var n=e.call(this,t)||this,i=n.eventRenderer=new v(n),o=n.renderFrame=Object(r.Fb)(n._renderFrame);return n.renderFgEvents=Object(r.Fb)(i.renderSegs.bind(i),i.unrender.bind(i),[o]),n.renderEventSelection=Object(r.Fb)(i.selectByInstanceId.bind(i),i.unselectByInstanceId.bind(i),[n.renderFgEvents]),n.renderEventDrag=Object(r.Fb)(i.hideByHash.bind(i),i.showByHash.bind(i),[o]),n.renderEventResize=Object(r.Fb)(i.hideByHash.bind(i),i.showByHash.bind(i),[o]),n}return o(t,e),t.prototype.firstContext=function(e){e.calendar.registerInteractiveComponent(this,{el:this.el,useEventCenter:!1})},t.prototype.render=function(e,t){this.renderFrame(e.date),this.renderFgEvents(t,e.fgSegs),this.renderEventSelection(e.eventSelection),this.renderEventDrag(e.eventDragInstances),this.renderEventResize(e.eventResizeInstances)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderFrame.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},t.prototype._renderFrame=function(e){var t=this.context,n=t.theme,i=t.dateEnv,o=t.options,a=i.format(e,Object(r.T)(o.dayPopoverFormat));this.el.innerHTML='
'+Object(r.rb)(a)+'
',this.segContainerEl=this.el.querySelector(".fc-event-container")},t.prototype.queryHit=function(e,t,n,i){var o=this.props.date;if(e'),"rtl"===this.context.options.dir&&t.reverse(),""+t.join("")+""},e}();function y(e,t,n,i){var o=n.dateEnv,a=n.theme,s=Object(r.Nb)(t.activeRange,e),l=Object(r.lb)(e,t,n);return l.unshift("fc-day",a.getClass("widgetContent")),'"}var b=Object(r.T)({day:"numeric"}),_=Object(r.T)({week:"numeric"}),x=function(e){function t(t,n){var i=e.call(this,t)||this;i.bottomCoordPadding=0,i.isCellSizesDirty=!1,i.renderProps=n;var o=i.eventRenderer=new c(i),a=i.fillRenderer=new h(i);i.mirrorRenderer=new d(i);var s=i.renderCells=Object(r.Fb)(i._renderCells,i._unrenderCells);return i.renderBusinessHours=Object(r.Fb)(a.renderSegs.bind(a,"businessHours"),a.unrender.bind(a,"businessHours"),[s]),i.renderDateSelection=Object(r.Fb)(a.renderSegs.bind(a,"highlight"),a.unrender.bind(a,"highlight"),[s]),i.renderBgEvents=Object(r.Fb)(a.renderSegs.bind(a,"bgEvent"),a.unrender.bind(a,"bgEvent"),[s]),i.renderFgEvents=Object(r.Fb)(o.renderSegs.bind(o),o.unrender.bind(o),[s]),i.renderEventSelection=Object(r.Fb)(o.selectByInstanceId.bind(o),o.unselectByInstanceId.bind(o),[i.renderFgEvents]),i.renderEventDrag=Object(r.Fb)(i._renderEventDrag,i._unrenderEventDrag,[s]),i.renderEventResize=Object(r.Fb)(i._renderEventResize,i._unrenderEventResize,[s]),i}return o(t,e),t.prototype.render=function(e,t){var n=e.cells;this.rowCnt=n.length,this.colCnt=n[0].length,this.renderCells(n,e.isRigid),this.renderBusinessHours(t,e.businessHourSegs),this.renderDateSelection(t,e.dateSelectionSegs),this.renderBgEvents(t,e.bgEventSegs),this.renderFgEvents(t,e.fgEventSegs),this.renderEventSelection(e.eventSelection),this.renderEventDrag(e.eventDrag),this.renderEventResize(e.eventResize),this.segPopoverTile&&this.updateSegPopoverTile()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderCells.unrender()},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:Object(r.t)(n,1)}},t.prototype.updateSegPopoverTile=function(e,t){var n=this.props;this.segPopoverTile.receiveProps({date:e||this.segPopoverTile.props.date,fgSegs:t||this.segPopoverTile.props.fgSegs,eventSelection:n.eventSelection,eventDragInstances:n.eventDrag?n.eventDrag.affectedInstances:null,eventResizeInstances:n.eventResize?n.eventResize.affectedInstances:null},this.context)},t.prototype._renderCells=function(e,t){var n,i,o=this.context,a=o.calendar,s=o.view,l=o.isRtl,u=o.dateEnv,c=this.rowCnt,p=this.colCnt,f="";for(n=0;n
'+i.renderHtml({cells:this.props.cells[e],dateProfile:this.props.dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+'
'+(this.getIsNumbersVisible()?""+this.renderNumberTrHtml(e)+"":"")+"
"},t.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.renderProps.cellWeekNumbersVisible||this.renderProps.colWeekNumbersVisible},t.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},t.prototype.renderNumberTrHtml=function(e){var t=this.context.isRtl,n=this.renderProps.renderNumberIntroHtml(e,this);return""+(t?"":n)+this.renderNumberCellsHtml(e)+(t?n:"")+""},t.prototype.renderNumberCellsHtml=function(e){var t,n,r=[];for(t=0;t",this.renderProps.cellWeekNumbersVisible&&e.getUTCDay()===n&&(s+=Object(r.C)(a,o,{date:e,type:"week"},{class:"fc-week-number"},o.format(e,_))),u&&(s+=Object(r.C)(a,o,e,{class:"fc-day-number"},o.format(e,b))),s+=""):""},t.prototype.updateSize=function(e){var t=this.context.calendar,n=this.fillRenderer,r=this.eventRenderer,i=this.mirrorRenderer;(e||this.isCellSizesDirty||t.isEventsUpdated)&&(this.buildPositionCaches(),this.isCellSizesDirty=!1),n.computeSizes(e),r.computeSizes(e),i.computeSizes(e),n.assignSizes(e),r.assignSizes(e),i.assignSizes(e)},t.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildRowPositions()},t.prototype.buildColPositions=function(){this.colPositions.build()},t.prototype.buildRowPositions=function(){this.rowPositions.build(),this.rowPositions.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.cellEls[e*this.colCnt+t]},t.prototype._renderEventDrag=function(e){e&&(this.eventRenderer.hideByHash(e.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,e.segs))},t.prototype._unrenderEventDrag=function(e){e&&(this.eventRenderer.showByHash(e.affectedInstances),this.fillRenderer.unrender("highlight",this.context))},t.prototype._renderEventResize=function(e){e&&(this.eventRenderer.hideByHash(e.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,e.segs),this.mirrorRenderer.renderSegs(this.context,e.segs,{isResizing:!0,sourceSeg:e.sourceSeg}))},t.prototype._unrenderEventResize=function(e){e&&(this.eventRenderer.showByHash(e.affectedInstances),this.fillRenderer.unrender("highlight",this.context),this.mirrorRenderer.unrender(this.context,e.segs,{isResizing:!0,sourceSeg:e.sourceSeg}))},t.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},t.prototype.limitRows=function(e){var t,n,r=this.eventRenderer.rowStructs||[];for(t=0;ti)return t;return!1},t.prototype.limitRow=function(e,t){var n,i,o,a,s,l,u,c,p,f,d,h,m,v,g,y=this,b=this.colCnt,_=this.context.isRtl,x=this.eventRenderer.rowStructs[e],w=[],S=0,E=function(n){for(;S"+Object(r.rb)(i.weekLabel)+"":""},t.renderDayGridNumberIntroHtml=function(e,n){var i=t.context,o=i.options,a=i.dateEnv,s=n.props.cells[e][0].date;return t.colWeekNumbersVisible?'"+Object(r.C)(o,a,{date:s,type:"week",forceOff:1===n.colCnt},a.format(s,w))+"":""},t.renderDayGridBgIntroHtml=function(){var e=t.context.theme;return t.colWeekNumbersVisible?'":""},t.renderDayGridIntroHtml=function(){return t.colWeekNumbersVisible?'":""},t}return o(t,e),t.prototype._processOptions=function(e){e.weekNumbers?e.weekNumbersWithinDays?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0):(this.colWeekNumbersVisible=!1,this.cellWeekNumbersVisible=!1)},t.prototype.render=function(t,n){e.prototype.render.call(this,t,n),this.processOptions(n.options),this.renderSkeleton(n)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderSkeleton.unrender()},t.prototype._renderSkeleton=function(e){this.el.classList.add("fc-dayGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new r.n("hidden","auto");var t=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(t),t.classList.add("fc-day-grid-container");var n=Object(r.Q)("div",{className:"fc-day-grid"});t.appendChild(n),this.dayGrid=new x(n,{renderNumberIntroHtml:this.renderDayGridNumberIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:this.colWeekNumbersVisible,cellWeekNumbersVisible:this.cellWeekNumbersVisible})},t.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-dayGrid-view"),this.dayGrid.destroy(),this.scroller.destroy()},t.prototype.renderSkeletonHtml=function(){var e=this.context,t=e.theme,n=e.options;return''+(n.columnHeader?'':"")+'
 
'},t.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},t.prototype.hasRigidRows=function(){var e=this.context.options.eventLimit;return e&&"number"!==typeof e},t.prototype.updateSize=function(t,n,r){e.prototype.updateSize.call(this,t,n,r),this.dayGrid.updateSize(t)},t.prototype.updateBaseSize=function(e,t,n){var i,o,a=this.dayGrid,s=this.context.options.eventLimit,l=this.header?this.header.el:null;a.rowEls?(this.colWeekNumbersVisible&&(this.weekNumberWidth=Object(r.Db)(Object(r.hb)(this.el,".fc-week-number"))),this.scroller.clear(),l&&Object(r.Sb)(l),a.removeSegPopover(),s&&"number"===typeof s&&a.limitRows(s),i=this.computeScrollerHeight(t),this.setGridHeight(i,n),s&&"number"!==typeof s&&a.limitRows(s),n||(this.scroller.setHeight(i),((o=this.scroller.getScrollbarWidths()).left||o.right)&&(l&&Object(r.G)(l,o),i=this.computeScrollerHeight(t),this.scroller.setHeight(i)),this.scroller.lockOverflow(o))):n||(i=this.computeScrollerHeight(t),this.scroller.setHeight(i))},t.prototype.computeScrollerHeight=function(e){return e-Object(r.Rb)(this.el,this.scroller.el)},t.prototype.setGridHeight=function(e,t){this.context.options.monthMode?(t&&(e*=this.dayGrid.rowCnt/6),Object(r.bb)(this.dayGrid.rowEls,e,!t)):t?Object(r.Tb)(this.dayGrid.rowEls):Object(r.bb)(this.dayGrid.rowEls,e,!0)},t.prototype.computeDateScroll=function(e){return{top:0}},t.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},t.prototype.applyDateScroll=function(e){void 0!==e.top&&this.scroller.setScrollTop(e.top)},t}(r.r);S.prototype.dateProfileGeneratorClass=s;var E=function(e){function t(t){var n=e.call(this,t.el)||this;return n.slicer=new k,n.dayGrid=t,n}return o(t,e),t.prototype.firstContext=function(e){e.calendar.registerInteractiveComponent(this,{el:this.dayGrid.el})},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.context.calendar.unregisterInteractiveComponent(this)},t.prototype.render=function(e,t){var n=this.dayGrid,r=e.dateProfile,i=e.dayTable;n.receiveContext(t),n.receiveProps(a({},this.slicer.sliceProps(e,r,e.nextDayThreshold,t.calendar,n,i),{dateProfile:r,cells:i.cells,isRigid:e.isRigid}),t)},t.prototype.buildPositionCaches=function(){this.dayGrid.buildPositionCaches()},t.prototype.queryHit=function(e,t){var n=this.dayGrid.positionToHit(e,t);if(n)return{component:this.dayGrid,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(r.a),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(r.p),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTable=Object(r.Eb)(T),t}return o(t,e),t.prototype.render=function(t,n){e.prototype.render.call(this,t,n);var r=this.props.dateProfile,i=this.dayTable=this.buildDayTable(r,t.dateProfileGenerator);this.header&&this.header.receiveProps({dateProfile:r,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt,renderIntroHtml:this.renderHeadIntroHtml},n),this.simpleDayGrid.receiveProps({dateProfile:r,dayTable:i,businessHours:t.businessHours,dateSelection:t.dateSelection,eventStore:t.eventStore,eventUiBases:t.eventUiBases,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,isRigid:this.hasRigidRows(),nextDayThreshold:this.context.nextDayThreshold},n)},t.prototype._renderSkeleton=function(t){e.prototype._renderSkeleton.call(this,t),t.options.columnHeader&&(this.header=new r.c(this.el.querySelector(".fc-head-container"))),this.simpleDayGrid=new E(this.dayGrid)},t.prototype._unrenderSkeleton=function(){e.prototype._unrenderSkeleton.call(this),this.header&&this.header.destroy(),this.simpleDayGrid.destroy()},t}(S);function T(e,t){var n=new r.d(e.renderRange,t);return new r.e(n,/year|month|week/.test(e.currentRangeUnit))}var C=Object(r.U)({defaultView:"dayGridMonth",views:{dayGrid:O,dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});t.a=C},function(e,t,n){"use strict";var r=n(4),i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(v()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&u>=0&&c>=0&&p>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"top",distance:c}),p<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>p)&&(r={scrollCache:a,name:"bottom",distance:p}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),u<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map(function(e){return e===window?new m(!1):new h(e,!1)})},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t=t*t&&n.handleDistanceSurpassed(e)}n.isDragging&&("scroll"!==e.origEvent.type&&(n.mirror.handleMove(e.pageX,e.pageY),n.autoScroller.handleMove(e.pageX,e.pageY)),n.emitter.trigger("dragmove",e))}},n.onPointerUp=function(e){n.isInteracting&&(n.isInteracting=!1,Object(r.x)(document.body),Object(r.w)(document.body),n.emitter.trigger("pointerup",e),n.isDragging&&(n.autoScroller.stop(),n.tryStopDrag(e)),n.delayTimeoutId&&(clearTimeout(n.delayTimeoutId),n.delayTimeoutId=null))};var i=n.pointer=new c(t);return i.emitter.on("pointerdown",n.onPointerDown),i.emitter.on("pointermove",n.onPointerMove),i.emitter.on("pointerup",n.onPointerUp),n.mirror=new f,n.autoScroller=new g,n}return o(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.startDelay=function(e){var t=this;"number"===typeof this.delay?this.delayTimeoutId=setTimeout(function(){t.delayTimeoutId=null,t.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(r.f),b=function(){function e(e){this.origRect=Object(r.M)(e),this.scrollCaches=Object(r.kb)(e).map(function(e){return new h(e,!0)})}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&p=0&&fo.layer)||(v.rect.left+=u,v.rect.right+=u,v.rect.top+=c,v.rect.bottom+=c,o=v)}}}return o},e}();function w(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Object(r.yb)(e.dateSpan,t.dateSpan)}var S=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging;t.setIgnoreMove(!n.component.isValidDateDownEl(t.pointer.downEl))},n.handleDragEnd=function(e){var t=n.component.context,r=t.calendar,i=t.view;if(!n.dragging.pointer.wasTouchScroll){var o=n.hitDragging,a=o.initialHit,s=o.finalHit;a&&s&&w(a,s)&&r.triggerDateClick(a.dateSpan,a.dayEl,i,e.origEvent)}};var i=t.component;n.dragging=new y(i.el),n.dragging.autoScroller.isEnabled=!1;var o=n.hitDragging=new x(n.dragging,Object(r.vb)(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragend",n.handleDragEnd),n}return o(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(r.l),E=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;null==n&&(n=t.longPressDelay);return n}(r):null},n.handleDragStart=function(e){n.component.context.calendar.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context.calendar,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(r.F);for(var l={},u=0,c=n;ui.start)return p.endDelta=c,p;return null}(l,e,i.subjectEl.classList.contains("fc-start-resizer"),u.range,o.pluginSystem.hooks.eventResizeJoinTransforms)),c&&(p=Object(r.z)(s,o.eventUiBases,c,o),d.mutatedEvents=p,n.component.isInteractionValid(d)||(f=!0,c=null,p=null,d.mutatedEvents=null)),p?o.dispatch({type:"SET_EVENT_RESIZE",state:d}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),f?Object(r.ab)():Object(r.eb)(),t||(c&&w(l,e)&&(c=null),n.validMutation=c,n.mutatedRelevantEvents=p)},n.handleDragEnd=function(e){var t=n.component.context,i=t.calendar,o=t.view,a=n.eventRange.def,s=n.eventRange.instance,l=new r.i(i,a,s),u=n.relevantEvents,c=n.mutatedRelevantEvents;i.publiclyTrigger("eventResizeStop",[{el:n.draggingSeg.el,event:l,jsEvent:e.origEvent,view:o}]),n.validMutation?(i.dispatch({type:"MERGE_EVENTS",eventStore:c}),i.publiclyTrigger("eventResize",[{el:n.draggingSeg.el,startDelta:n.validMutation.startDelta||Object(r.P)(0),endDelta:n.validMutation.endDelta||Object(r.P)(0),prevEvent:l,event:new r.i(i,c.defs[a.defId],s?c.instances[s.instanceId]:null),revert:function(){i.dispatch({type:"MERGE_EVENTS",eventStore:u})},jsEvent:e.origEvent,view:o}])):i.publiclyTrigger("_noEventResize"),n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new y(i.el);o.pointer.selector=".fc-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new x(n.dragging,Object(r.vb)(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("dragend",n.handleDragEnd),n}return o(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySeg=function(e){return Object(r.mb)(Object(r.cb)(e.subjectEl,this.component.fgSegSelector))},t}(r.l);var T=function(){function e(e){var t=this;this.isRecentPointerDateSelect=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerUp=function(e){var n=t,i=n.calendar,o=n.documentPointer,a=i.state;if(!o.wasTouchScroll){if(a.dateSelection&&!t.isRecentPointerDateSelect){var s=i.viewOpt("unselectAuto"),l=i.viewOpt("unselectCancel");!s||s&&Object(r.cb)(o.downEl,l)||i.unselect(e)}a.eventSelection&&!Object(r.cb)(o.downEl,k.SELECTOR)&&i.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1},this.calendar=e;var n=this.documentPointer=new c(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerup",this.onDocumentPointerUp),e.on("select",this.onSelect)}return e.prototype.destroy=function(){this.calendar.off("select",this.onSelect),this.documentPointer.destroy()},e}(),C=function(){function e(e,t){var n=this;this.receivingCalendar=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,i){var o=n.hitDragging.dragging,s=null,l=null,u=!1,c={affectedEvents:Object(r.R)(),mutatedEvents:Object(r.R)(),isEvent:n.dragMeta.create,origSeg:null};e&&(s=e.component.context.calendar,n.canDropElOnCalendar(i.subjectEl,s)&&(l=function(e,t,n){for(var i=a({},t.leftoverProps),o=0,s=n.pluginSystem.hooks.externalDefTransforms;o div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=e.head||e.getElementsByTagName("head")[0],i=e.createElement("style");i.id="detectElementResize",i.type="text/css",null!=t&&i.setAttribute("nonce",t),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(e.createTextNode(n)),r.appendChild(i)}}(o),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=o.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='
',e.appendChild(e.__resizeTriggers__),a(e),e.addEventListener("scroll",s,!0),c&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==m&&a(e)},e.__resizeTriggers__.addEventListener(c,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(i)}},removeResizeListener:function(e,t){if(r)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(c,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)(Object(a.a)({paddingLeft:t(2),paddingRight:t(2)},n),{},Object(r.a)({},e.up("sm"),Object(a.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var u={black:"#000",white:"#fff"},c={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},p={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},f={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},d={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},h={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},m={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},g=n(30),y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.white,default:c[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},b={text:{primary:u.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:c[800],default:"#303030"},action:{active:u.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function _(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(g.e)(e.main,i):"dark"===t&&(e.dark=Object(g.a)(e.main,o)))}function x(e){return Math.round(1e5*e)/1e5}var w={textTransform:"uppercase"},S='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,s=void 0===r?S:r,l=n.fontSize,u=void 0===l?14:l,c=n.fontWeightLight,p=void 0===c?300:c,f=n.fontWeightRegular,d=void 0===f?400:f,h=n.fontWeightMedium,m=void 0===h?500:h,v=n.fontWeightBold,g=void 0===v?700:v,y=n.htmlFontSize,b=void 0===y?16:y,_=n.allVariants,E=n.pxToRem,k=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var O=u/14,T=E||function(e){return"".concat(e/b*O,"rem")},C=function(e,t,n,r,i){return Object(a.a)(Object(a.a)(Object(a.a)({fontFamily:s,fontWeight:e,fontSize:T(t),lineHeight:n},s===S?{letterSpacing:"".concat(x(r/t),"em")}:{}),i),_)},P={h1:C(p,96,1.167,-1.5),h2:C(p,60,1.2,-.5),h3:C(d,48,1.167,0),h4:C(d,34,1.235,.25),h5:C(d,24,1.334,0),h6:C(m,20,1.6,.15),subtitle1:C(d,16,1.75,.15),subtitle2:C(m,14,1.57,.1),body1:C(d,16,1.5,.15),body2:C(d,14,1.43,.15),button:C(m,14,1.75,.4,w),caption:C(d,12,1.66,.4),overline:C(d,12,2.66,1,w)};return Object(o.a)(Object(a.a)({htmlFontSize:b,pxToRem:T,round:x,fontFamily:s,fontSize:u,fontWeightLight:p,fontWeightRegular:d,fontWeightMedium:m,fontWeightBold:g},P),k,{clone:!1})}var k=.2,O=.14,T=.12;function C(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(k,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(O,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(T,")")].join(",")}var P=["none",C(0,2,1,-1,0,1,1,0,0,1,3,0),C(0,3,1,-2,0,2,2,0,0,1,5,0),C(0,3,3,-2,0,3,4,0,0,1,8,0),C(0,2,4,-1,0,4,5,0,0,1,10,0),C(0,3,5,-1,0,5,8,0,0,1,14,0),C(0,3,5,-1,0,6,10,0,0,1,18,0),C(0,4,5,-2,0,7,10,1,0,2,16,1),C(0,5,5,-3,0,8,10,1,0,3,14,2),C(0,5,6,-3,0,9,12,1,0,3,16,2),C(0,6,6,-3,0,10,14,1,0,4,18,3),C(0,6,7,-4,0,11,15,1,0,4,20,3),C(0,7,8,-4,0,12,17,2,0,5,22,4),C(0,7,8,-4,0,13,19,2,0,5,24,4),C(0,7,9,-4,0,14,21,2,0,5,26,4),C(0,8,9,-5,0,15,22,2,0,6,28,5),C(0,8,10,-5,0,16,24,2,0,6,30,5),C(0,8,11,-5,0,17,26,2,0,6,32,5),C(0,9,11,-5,0,18,28,2,0,7,34,6),C(0,9,12,-6,0,19,29,2,0,7,36,6),C(0,10,13,-6,0,20,31,3,0,8,38,7),C(0,10,13,-6,0,21,33,3,0,8,40,7),C(0,10,14,-6,0,22,35,3,0,8,42,7),C(0,11,14,-7,0,23,36,3,0,9,44,8),C(0,11,15,-7,0,24,38,3,0,9,46,8)],A={borderRadius:4},M=n(39),I=(n(36),n(44));n(5);var j=function(e,t){return t?Object(o.a)(e,t,{clone:!1}):e},D={xs:0,sm:600,md:960,lg:1280,xl:1920},R={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(D[e],"px)")}};var L={m:"margin",p:"padding"},N={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},z={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},B=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}(function(e){if(e.length>2){if(!z[e])return[e];e=z[e]}var t=e.split(""),n=Object(M.a)(t,2),r=n[0],i=n[1],o=L[r],a=N[i]||"";return Array.isArray(a)?a.map(function(e){return o+e}):[o+a]}),F=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function U(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function V(e,t){return function(n){return e.reduce(function(e,r){return e[r]=function(e,t){if("string"===typeof t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e},{})}}function H(e){var t=U(e.theme);return Object.keys(e).map(function(n){if(-1===F.indexOf(n))return null;var r=V(B(n),t),i=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||R;return t.reduce(function(e,i,o){return e[r.up(r.keys[o])]=n(t[o]),e},{})}if("object"===Object(I.a)(t)){var i=e.theme.breakpoints||R;return Object.keys(t).reduce(function(e,r){return e[i.up(r)]=n(t[r]),e},{})}return n(t)}(e,i,r)}).reduce(j,{})}H.propTypes={},H.filterProps=F;var q=n(54),G=n(120);t.a=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,x=void 0===r?{}:r,w=e.palette,S=void 0===w?{}:w,k=e.spacing,O=e.typography,T=void 0===O?{}:O,C=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),M=function(e){var t=e.primary,n=void 0===t?{light:p[300],main:p[500],dark:p[700]}:t,r=e.secondary,s=void 0===r?{light:f.A200,main:f.A400,dark:f.A700}:r,l=e.error,x=void 0===l?{light:d[300],main:d[500],dark:d[700]}:l,w=e.warning,S=void 0===w?{light:h[300],main:h[500],dark:h[700]}:w,E=e.info,k=void 0===E?{light:m[300],main:m[500],dark:m[700]}:E,O=e.success,T=void 0===O?{light:v[300],main:v[500],dark:v[700]}:O,C=e.type,P=void 0===C?"light":C,A=e.contrastThreshold,M=void 0===A?3:A,I=e.tonalOffset,j=void 0===I?.2:I,D=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function R(e){return Object(g.d)(e,b.text.primary)>=M?b.text.primary:y.text.primary}var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(a.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(["Material-UI: The color provided to augmentColor(color) is invalid.","The color object needs to have a `main` property or a `".concat(t,"` property.")].join("\n"));if("string"!==typeof e.main)throw new Error(["Material-UI: The color provided to augmentColor(color) is invalid.","`color.main` should be a string, but `".concat(JSON.stringify(e.main),"` was provided instead."),"","Did you intend to use one of the following approaches?","",'import {\xa0green } from "@material-ui/core/colors";',"","const theme1 = createMuiTheme({ palette: {"," primary: green,","} });","","const theme2 = createMuiTheme({ palette: {"," primary: { main: green[500] },","} });"].join("\n"));return _(e,"light",n,j),_(e,"dark",r,j),e.contrastText||(e.contrastText=R(e.main)),e},N={dark:b,light:y};return Object(o.a)(Object(a.a)({common:u,type:P,primary:L(n),secondary:L(s,"A400","A200","A700"),error:L(x),warning:L(S),info:L(k),success:L(T),grey:c,contrastThreshold:M,getContrastText:R,augmentColor:L,tonalOffset:j},N[P]),D)}(S),I=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,l=e.step,u=void 0===l?5:l,c=Object(i.a)(e,["values","unit","step"]);function p(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function f(e,t){var r=s.indexOf(t);return r===s.length-1?p(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[s[r+1]]?n[s[r+1]]:t)-u/100).concat(o,")")}return Object(a.a)({keys:s,values:n,up:p,down:function(e){var t=s.indexOf(e)+1,r=n[s[t]];return t===s.length?p("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-u/100).concat(o,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},c)}(n),j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=U({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r1?R-1:0),N=1;N=0||(i[n]=e[n]);return i}(n,["context","channel","sagaMonitor"]);function f(e){var n=e.getState,r=e.dispatch;return t=function(e,t){for(var n=e.channel,r=void 0===n?T():n,i=e.dispatch,o=e.getState,l=e.context,u=void 0===l?{}:l,c=e.sagaMonitor,p=e.effectMiddlewares,f=e.onError,d=void 0===f?a.b:f,m=arguments.length,v=new Array(m>2?m-2:0),g=2;g1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:E(e,q.vertical)+t,horizontal:k(e,q.horizontal)}},[q.horizontal,q.vertical]),ne=o.useCallback(function(e){var t=ee(e),n={width:e.offsetWidth,height:e.offsetHeight},r=te(n,t);if("none"===y)return{top:null,left:null,transformOrigin:O(r)};var i=Q(t),o=i.top-r.vertical,a=i.left-r.horizontal,l=o+n.height,u=a+n.width,c=Object(p.a)(T(s)),f=c.innerHeight-j,d=c.innerWidth-j;if(of){var m=l-f;o-=m,r.vertical+=m}if(ad){var g=u-d;a-=g,r.horizontal+=g}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:O(r)}},[s,y,Q,ee,te,j]),re=o.useCallback(function(){var e=$.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}},[ne]),ie=o.useCallback(function(e){$.current=l.findDOMNode(e)},[]);o.useEffect(function(){F&&re()}),o.useImperativeHandle(n,function(){return F?{updatePosition:function(){re()}}:null},[F,re]),o.useEffect(function(){if(F){var e=Object(u.a)(function(){re()});return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}},[F,re]);var oe=Z;"auto"!==Z||W.muiSupportAuto||(oe=void 0);var ae=C||(s?Object(c.a)(T(s)).body:void 0);return o.createElement(d.a,Object(r.a)({container:ae,open:F,ref:t,BackdropProps:{invisible:!0},className:Object(a.a)(_.root,x)},J),o.createElement(W,Object(r.a)({appear:!0,in:F,onEnter:D,onEntered:R,onExit:N,onExited:z,onExiting:B,timeout:oe},X,{onEntering:Object(f.a)(function(e,t){L&&L(e,t),re()},X.onEntering)}),o.createElement(S.a,Object(r.a)({elevation:A,ref:ie},V,{className:Object(a.a)(_.paper,V.className)}),b)))}),P=Object(s.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(C),A=n(425),M=n(126);function I(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function j(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function D(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function R(e,t,n,r,i,o){for(var a=!1,s=i(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&D(s,o)&&!l)return void s.focus();s=i(e,s,n)}}var L="undefined"===typeof window?o.useEffect:o.useLayoutEffect,N=o.forwardRef(function(e,t){var n=e.actions,a=e.autoFocus,s=void 0!==a&&a,u=e.autoFocusItem,p=void 0!==u&&u,f=e.children,d=e.className,h=e.disabledItemsFocusable,m=void 0!==h&&h,v=e.disableListWrap,g=void 0!==v&&v,b=e.onKeyDown,_=e.variant,x=void 0===_?"selectedMenu":_,w=Object(i.a)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),S=o.useRef(null),E=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});L(function(){s&&S.current.focus()},[s]),o.useImperativeHandle(n,function(){return{adjustStyleForScrollbar:function(e,t){var n=!S.current.style.width;if(e.clientHeight0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);var s=r&&!i.repeating&&D(r,i);i.previousKeyMatched&&(s||R(t,r,!1,m,I,i))?e.preventDefault():i.previousKeyMatched=!1}b&&b(e)},tabIndex:s?0:-1},w),C)}),z=n(66),B={vertical:"top",horizontal:"right"},F={vertical:"top",horizontal:"left"},U=o.forwardRef(function(e,t){var n=e.autoFocus,s=void 0===n||n,u=e.children,c=e.classes,p=e.disableAutoFocusItem,f=void 0!==p&&p,d=e.MenuListProps,h=void 0===d?{}:d,m=e.onClose,g=e.onEntering,y=e.open,b=e.PaperProps,_=void 0===b?{}:b,x=e.PopoverClasses,w=e.transitionDuration,S=void 0===w?"auto":w,E=e.variant,k=void 0===E?"selectedMenu":E,O=Object(i.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),T=Object(v.a)(),C=s&&!f&&y,A=o.useRef(null),M=o.useRef(null),I=-1;o.Children.map(u,function(e,t){o.isValidElement(e)&&(e.props.disabled||("menu"!==k&&e.props.selected?I=t:-1===I&&(I=t)))});var j=o.Children.map(u,function(e,t){return t===I?o.cloneElement(e,{ref:function(t){M.current=l.findDOMNode(t),Object(z.a)(e.ref,t)}}):e});return o.createElement(P,Object(r.a)({getContentAnchorEl:function(){return M.current},classes:x,onClose:m,onEntering:function(e,t){A.current&&A.current.adjustStyleForScrollbar(e,T),g&&g(e,t)},anchorOrigin:"rtl"===T.direction?B:F,transformOrigin:"rtl"===T.direction?B:F,PaperProps:Object(r.a)(Object(r.a)({},_),{},{classes:Object(r.a)(Object(r.a)({},_.classes),{},{root:c.paper})}),open:y,ref:t,transitionDuration:S},O),o.createElement(N,Object(r.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:A,autoFocus:s&&(-1===I||f),autoFocusItem:C,variant:k},h,{className:Object(a.a)(c.list,h.className)}),j))});t.a=Object(s.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(U)},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}(function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91});t.a=i},function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Object"===r(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function o(e){return"Array"===r(e)}function a(e){return"Symbol"===r(e)}function s(){for(var e=0,t=0,n=arguments.length;t");document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return m(e),t}()),E}function O(e){return e=Math.max(0,e),e=Math.round(e)}function T(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=O(e.offsetWidth-e.clientWidth-r-i),l={borderLeft:r,borderRight:i,borderTop:o,borderBottom:a,scrollbarBottom:O(e.offsetHeight-e.clientHeight-o-a),scrollbarLeft:0,scrollbarRight:0};return k()&&"rtl"===n.direction?l.scrollbarLeft=s:l.scrollbarRight=s,t&&(l.paddingLeft=parseInt(n.paddingLeft,10)||0,l.paddingRight=parseInt(n.paddingRight,10)||0,l.paddingTop=parseInt(n.paddingTop,10)||0,l.paddingBottom=parseInt(n.paddingBottom,10)||0),l}function C(e){return e.getBoundingClientRect().height+P(e)}function P(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}function A(e,t,n,r){function i(e){var t=y(e.target,n);t&&r.call(t,e,t)}return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var M=["sun","mon","tue","wed","thu","fri","sat"];function I(e,t){var n=U(e);return n[2]+=t,V(n)}function j(e,t){var n=U(e);return n[6]+=t,V(n)}function D(e,t){return(t.valueOf()-e.valueOf())/864e5}function R(e,t){return q(e)===q(t)?Math.round(D(e,t)):null}function L(e){return V([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function N(e,t,n,r){var i=V([t,0,1+z(t,n,r)]),o=L(e),a=Math.round(D(i,o));return Math.floor(a/7)+1}function z(e,t,n){var r=7+t-n;return-((7+V([e,0,r]).getUTCDay()-t)%7)+r-1}function B(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function F(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function U(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function V(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function H(e){return!isNaN(e.valueOf())}function q(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}var G=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function W(e,t){var n;return"string"===typeof e?function(e){var t=G.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"===typeof e&&e?K(e):"number"===typeof e?K(((n={})[t||"milliseconds"]=e,n)):null}function K(e){return{years:e.years||e.year||0,months:e.months||e.month||0,days:(e.days||e.day||0)+7*Z(e),milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)}}function Z(e){return e.weeks||e.week||0}function Y(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function X(e){return J(e)/864e5}function J(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function $(e,t){var n=e.milliseconds;if(n){if(n%1e3!==0)return{unit:"millisecond",value:n};if(n%6e4!==0)return{unit:"second",value:n/1e3};if(n%36e5!==0)return{unit:"minute",value:n/6e4};if(n)return{unit:"hour",value:n/36e5}}return e.days?t||e.days%7!==0?{unit:"day",value:e.days}:{unit:"week",value:e.days/7}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function Q(e,t,n){return n.func?n.func(e,t):function(e,t){if(!e&&!t)return 0;if(null==t)return-1;if(null==e)return 1;if("string"===typeof e||"string"===typeof t)return String(e).localeCompare(String(t));return e-t}(e[n.field],t[n.field])*(n.order||1)}function ee(e){return e.charAt(0).toUpperCase()+e.slice(1)}function te(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ne(e){return e%1===0}function re(e,t,n){if("function"===typeof e&&(e=[e]),e){var r=void 0,i=void 0;for(r=0;r=J(t)&&(r=I(r,1))}return e.start&&(n=L(e.start),r&&r<=n&&(r=I(n,1))),{start:n,end:r}}function ue(e,t,n,r){return"year"===r?W(n.diffWholeYears(e,t),"year"):"month"===r?W(n.diffWholeMonths(e,t),"month"):function(e,t){var n=L(e),r=L(t);return{years:0,months:0,days:Math.round(D(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}var ce=function(e,t){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function pe(e,t){function n(){this.constructor=e}ce(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var fe=function(){return(fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;o--)if("object"===typeof(a=e[o][r])&&a)i.unshift(a);else if(void 0!==a){l[r]=a;break}i.length&&(l[r]=me(i))}for(n=e.length-1;n>=0;n--)for(r in s=e[n])r in l||(l[r]=s[r]);return l}function ve(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function ge(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function ye(e){for(var t={},n=0,r=e;no&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return ot.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function De(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t1)||"numeric"!==r.year&&"2-digit"!==r.year||"numeric"!==r.month&&"2-digit"!==r.month||"numeric"!==r.day&&"2-digit"!==r.day||(a=1);var s=this.format(e,n),l=this.format(t,n);if(s===l)return s;var u=Ge(function(e,t){var n={};for(var r in e)r in ze&&!(ze[r]<=t)||(n[r]=e[r]);return n}(r,a),i,n),c=u(e),p=u(t),f=function(e,t,n,r){var i=0;for(;i/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function bt(e){return Array.isArray(e)?e:"string"===typeof e?e.split(/\s+/):[]}var _t={editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:null,overlap:null,allow:null,className:bt,classNames:bt,color:String,backgroundColor:String,borderColor:String,textColor:String};function xt(e,t,n){var r=ae(e,_t,{},n),i=function(e,t){return Array.isArray(e)?xe(e,"",t,!0):"object"===typeof e&&e?xe([e],"",t,!0):null!=e?String(e):null}(r.constraint,t);return{startEditable:null!=r.startEditable?r.startEditable:r.editable,durationEditable:null!=r.durationEditable?r.durationEditable:r.editable,constraints:null!=i?[i]:[],overlap:r.overlap,allows:null!=r.allow?[r.allow]:[],backgroundColor:r.backgroundColor||r.color,borderColor:r.borderColor||r.color,textColor:r.textColor,classNames:r.classNames.concat(r.className)}}function wt(e,t,n,r){var i={},o={};for(var a in _t){var s=e+ee(a);i[a]=t[s],o[s]=!0}if("event"===e&&(i.editable=t.editable),r)for(var a in t)o[a]||(r[a]=t[a]);return xt(i,n)}var St={startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Et(e){return e.reduce(kt,St)}function kt(e,t){return{startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"===typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Ot={id:String,groupId:String,title:String,url:String,rendering:String,extendedProps:null},Tt={start:null,date:null,end:null,allDay:null},Ct=0;function Pt(e,t,n,r){var i=function(e,t){var n=null;if(e){var r=t.state.eventSources[e];n=r.allDayDefault}null==n&&(n=t.opt("allDayDefault"));return n}(t,n),o={},a=function(e,t,n,r,i){for(var o=0;o'+i+"":""+i+""}var zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pe(t,e),t.prototype.on=function(e,t){return Bt(this._handlers||(this._handlers={}),e,t),this},t.prototype.one=function(e,t){return Bt(this._oneHandlers||(this._oneHandlers={}),e,t),this},t.prototype.off=function(e,t){return this._handlers&&Ft(this._handlers,e,t),this._oneHandlers&&Ft(this._oneHandlers,e,t),this},t.prototype.trigger=function(e){for(var t=[],n=1;n=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=200&&a.status<400)try{var e=JSON.parse(a.responseText);r(e,a)}catch(t){i("Failure parsing JSON",a)}else i("Request failed",a)},a.onerror=function(){i("Request failed",a)},a.send(o)}function en(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var tn=Yt({eventSourceDefs:[{parseMeta:function(e){if("string"===typeof e)e={url:e};else if(!e||"object"!==typeof e||!e.url)return null;return{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}},fetch:function(e,t,n){var r=e.eventSource.meta,i=function(e,t,n){var r,i,o,a,s=n.dateEnv,l={};null==(r=e.startParam)&&(r=n.opt("startParam"));null==(i=e.endParam)&&(i=n.opt("endParam"));null==(o=e.timeZoneParam)&&(o=n.opt("timeZoneParam"));a="function"===typeof e.extraParams?e.extraParams():e.extraParams||{};fe(l,a),l[r]=s.formatIso(t.start),l[i]=s.formatIso(t.end),"local"!==s.timeZone&&(l[o]=s.timeZone);return l}(r,e.range,e.calendar);Qt(r.method,r.url,i,function(e,n){t({rawEvents:e,xhr:n})},function(e,t){n({message:e,xhr:t})})}}]});var nn=Yt({recurringTypes:[{parse:function(e,t,n){var r,i,o=n.createMarker.bind(n),a=ae(e,{daysOfWeek:null,startTime:W,endTime:W,startRecur:o,endRecur:o},{},t),s=!1;for(var l in a)if(null!=a[l]){s=!0;break}if(s){var u=null;return"duration"in t&&(u=W(t.duration),delete t.duration),!u&&a.startTime&&a.endTime&&(r=a.endTime,i=a.startTime,u={years:r.years-i.years,months:r.months-i.months,days:r.days-i.days,milliseconds:r.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!a.startTime&&!a.endTime),duration:u,typeData:a}}return null},expand:function(e,t,n){var r=Ae(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var i=e?ye(e):null,o=L(n.start),a=n.end,s=[];for(;o0?e[0].code:"en",n=window.FullCalendarLocalesAll||[],r=window.FullCalendarLocales||{},i=n.concat(be(r),e),o={en:cn},a=0,s=i;a0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||cn;return dn(e,n,r)}(e,t):dn(e.code,[e.code],e)}function dn(e,t,n){var r=me([cn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var hn=function(){function e(e){this.overrides=fe({},e),this.dynamicOverrides={},this.compute()}return e.prototype.mutate=function(e,t,n){if(Object.keys(e).length||t.length){var r=n?this.dynamicOverrides:this.overrides;fe(r,e);for(var i=0,o=t;i=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=j(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Ye(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?V(B(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?V(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-F(U(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(U(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?F(U(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(U(e))*60):new Date(e.valueOf()-(t||0))},e}(),_n={id:String,allDayDefault:Boolean,eventDataTransform:Function,success:Function,failure:Function},xn=0;function wn(e,t){return!t.pluginSystem.hooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Sn(e,t){for(var n=t.pluginSystem.hooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i){var o=En("object"===typeof e?e:{},i,r,t);return o._raw=e,o}}return null}function En(e,t,n,r){var i={},o=ae(e,_n,{},i),a={},s=xt(i,r,a);return o.isFetching=!1,o.latestFetchId="",o.fetchRange=null,o.publicId=String(e.id||""),o.sourceId=String(xn++),o.sourceDefId=n,o.meta=t,o.ui=s,o.extendedProps=a,o}function kn(e,t,n,r){switch(t.type){case"ADD_EVENT_SOURCES":return function(e,t,n,r){for(var i={},o=0,a=t;oe.fetchRange.end:!e.latestFetchId}(e,t,n)}),t,n)}function Cn(e,t,n,r){var i={};for(var o in e){var a=e[o];t[o]?i[o]=Pn(a,n,r):i[o]=a}return i}function Pn(e,t,n){var r=n.pluginSystem.hooks.eventSourceDefs[e.sourceDefId],i=String(On++);return r.fetch({eventSource:e,calendar:n,range:t},function(r){var o,a,s=r.rawEvents,l=n.opt("eventSourceSuccess");e.success&&(a=e.success(s,r.xhr)),l&&(o=l(s,r.xhr)),s=a||o||s,n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:i,fetchRange:t,rawEvents:s})},function(r){var o=n.opt("eventSourceFailure");console.warn(r.message,r),e.failure&&e.failure(r),o&&o(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:i,fetchRange:t,error:r})}),fe({},e,{isFetching:!0,latestFetchId:i})}var An=function(){function e(e,t){this.viewSpec=e,this.options=e.options,this.dateEnv=t.dateEnv,this.calendar=t,this.initHiddenDays()}return e.prototype.buildPrev=function(e,t){var n=this.dateEnv,r=n.subtract(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(r,-1)},e.prototype.buildNext=function(e,t){var n=this.dateEnv,r=n.add(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(r,1)},e.prototype.build=function(e,t,n){var r;void 0===n&&(n=!1);var i,o,a,s,l,u,c,p,f;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(p=e,e=null!=(f=r).start&&p=f.end?new Date(f.end.valueOf()-1):p),a=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(a.unit),l=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,s),u=l=this.trimHiddenDays(l),this.options.showNonCurrentDates||(u=Ae(u,a.range)),i=W(this.options.minTime),o=W(this.options.maxTime),u=Ae(u=this.adjustActiveRange(u,i,o),r),c=Ie(a.range,r),{validRange:r,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:s,activeRange:u,renderRange:l,minTime:i,maxTime:o,isValid:c,dateIncrement:this.buildDateIncrement(a.duration)}},e.prototype.buildValidRange=function(){return this.getRangeOption("validRange",this.calendar.getNow())||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.viewSpec,i=this.dateEnv,o=null,a=null,s=null;return r.duration?(o=r.duration,a=r.durationUnit,s=this.buildRangeFromDuration(e,t,o,a)):(n=this.options.dayCount)?(a="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?a=i.greatestWholeUnit(s.start,s.end).unit:(a=$(o=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,o,a)),{duration:o,unit:a,range:s}},e.prototype.getFallbackDuration=function(){return W({day:1})},e.prototype.adjustActiveRange=function(e,t,n){var r=this.dateEnv,i=e.start,o=e.end;return this.viewSpec.class.prototype.usesMinMaxTime&&(X(t)<0&&(i=L(i),i=r.add(i,t)),X(n)>1&&(o=I(o=L(o),-1),o=r.add(o,n))),{start:i,end:o}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,a,s,l,u=this.dateEnv,c=this.options.dateAlignment;function p(){a=u.startOf(e,c),s=u.add(a,n),l={start:a,end:s}}return c||((i=this.options.dateIncrement)?(o=W(i),c=J(o) ")),l=!1):((r=p[e])?(f=function(e){r.click&&r.click.call(b,e)},(m=i.getCustomButtonIconClass(r))||(m=i.getIconClass(e))||(v=r.text)):(c=s[e])?(n.viewsWithButtons.push(e),f=function(){o.changeView(e)},(v=c.buttonTextOverride)||(m=i.getIconClass(e))||(v=c.buttonTextDefault)):o[e]&&(f=function(){o[e]()},(v=d[e])||(m=i.getIconClass(e))||(v=h[e])),f&&(y=["fc-"+e+"-button",i.getClass("button")],v?(g=yt(v),_=""):m&&(g="",_=' aria-label="'+e+'"'),(b=u('")).addEventListener("click",f),a.push(b)))}),a.length>1){r=document.createElement("div");var m=i.getClass("buttonGroup");l&&m&&r.classList.add(m),f(r,a),c.appendChild(r)}else f(c,a)}),c},t.prototype.updateToday=function(e){this.toggleButtonEnabled("today",e)},t.prototype.updatePrev=function(e){this.toggleButtonEnabled("prev",e)},t.prototype.updateNext=function(e){this.toggleButtonEnabled("next",e)},t.prototype.updateTitle=function(e){_(this.el,"h2").forEach(function(t){t.innerText=e})},t.prototype.updateActiveButton=function(e){var t=this.context.theme.getClass("buttonActive");_(this.el,"button").forEach(function(n){e&&n.classList.contains("fc-"+e+"-button")?n.classList.add(t):n.classList.remove(t)})},t.prototype.toggleButtonEnabled=function(e,t){_(this.el,".fc-"+e+"-button").forEach(function(e){e.disabled=!t})},t}(Wt),Kn=function(e){function t(t){var n=e.call(this)||this;return n.elClassNames=[],n.renderSkeleton=Dt(n._renderSkeleton,n._unrenderSkeleton),n.renderToolbars=Dt(n._renderToolbars,n._unrenderToolbars,[n.renderSkeleton]),n.buildComponentContext=Le(Yn),n.buildViewPropTransformers=Le(Xn),n.el=t,n.computeTitle=Le(Zn),n.parseBusinessHours=Le(function(e){return jt(e,n.context.calendar)}),n}return pe(t,e),t.prototype.render=function(e,t){this.freezeHeight();var n=this.computeTitle(e.dateProfile,e.viewSpec.options);this.renderSkeleton(t),this.renderToolbars(e.viewSpec,e.dateProfile,e.currentDate,n),this.renderView(e,n),this.updateSize(),this.thawHeight()},t.prototype.destroy=function(){this.header&&this.header.destroy(),this.footer&&this.footer.destroy(),this.renderSkeleton.unrender(),e.prototype.destroy.call(this)},t.prototype._renderSkeleton=function(e){this.updateElClassNames(e),d(this.el,this.contentEl=l("div",{className:"fc-view-container"}));for(var t=e.calendar,n=0,r=t.pluginSystem.hooks.viewContainerModifiers;n1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e),t.titleRangeSeparator),{isEndExclusive:e.isRangeAllDay})}function Yn(e,t,n){return e.extend(t.options,n)}function Xn(e){return e.map(function(e){return new e})}var Jn=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();var $n={},Qn=function(e){function t(t){var n=e.call(this,t)||this;n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=i.calendar,a=i.view,s=rt(t);if(s&&r.isValidSegDownEl(e.target)){var l=y(e.target,".fc-has-url"),u=l?l.querySelector("a[href]").href:"";o.publiclyTrigger("eventClick",[{el:t,event:new Qe(r.context.calendar,s.eventRange.def,s.eventRange.instance),jsEvent:e,view:a}]),u&&!e.defaultPrevented&&(window.location.href=u)}};var r=t.component;return n.destroy=A(r.el,"click",r.fgSegSelector+","+r.bgSegSelector,n.handleSegClick),n}return pe(t,e),t}(Jn),er=function(e){function t(t){var n=e.call(this,t)||this;n.handleEventElRemove=function(e){e===n.currentSegEl&&n.handleSegLeave(null,n.currentSegEl)},n.handleSegEnter=function(e,t){rt(t)&&(t.classList.add("fc-allow-mouse-resize"),n.currentSegEl=t,n.triggerEvent("eventMouseEnter",e,t))},n.handleSegLeave=function(e,t){n.currentSegEl&&(t.classList.remove("fc-allow-mouse-resize"),n.currentSegEl=null,n.triggerEvent("eventMouseLeave",e,t))};var r=t.component;return n.removeHoverListeners=function(e,t,n,r){var i;return A(e,"mouseover",t,function(e,t){t!==i&&(i=t,n(e,t),t.addEventListener("mouseleave",function e(n){i=null,r(n,t),t.removeEventListener("mouseleave",e)}))})}(r.el,r.fgSegSelector+","+r.bgSegSelector,n.handleSegEnter,n.handleSegLeave),r.context.calendar.on("eventElRemove",n.handleEventElRemove),n}return pe(t,e),t.prototype.destroy=function(){this.removeHoverListeners(),this.component.context.calendar.off("eventElRemove",this.handleEventElRemove)},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=i.calendar,a=i.view,s=rt(n);t&&!r.isValidSegDownEl(t.target)||o.publiclyTrigger(e,[{el:n,event:new Qe(o,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:a}])},t}(Jn),tr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pe(t,e),t}(Ht);tr.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},tr.prototype.baseIconClass="fc-icon",tr.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},tr.prototype.iconOverrideOption="buttonIcons",tr.prototype.iconOverrideCustomButtonOption="icon",tr.prototype.iconOverridePrefix="fc-icon-";var nr=function(){function e(e,t){var n=this;this.buildComponentContext=Le(rr),this.parseRawLocales=Le(pn),this.buildLocale=Le(fn),this.buildDateEnv=Le(ir),this.buildTheme=Le(or),this.buildEventUiSingleBase=Le(this._buildEventUiSingleBase),this.buildSelectionConfig=Le(this._buildSelectionConfig),this.buildEventUiBySource=function(e,t){var n=null;return function(){var r=e.apply(this,arguments);return(null===n||n!==r&&!t(n,r))&&(n=r),n}}(sr,_e),this.buildEventUiBases=Le(lr),this.interactionsStore={},this.actionQueue=[],this.isReducing=!1,this.needsRerender=!1,this.isRendering=!1,this.renderingPauseDepth=0,this.buildDelayedRerender=Le(ar),this.afterSizingTriggers={},this.isViewUpdated=!1,this.isDatesUpdated=!1,this.isEventsUpdated=!1,this.el=e,this.optionsManager=new hn(t||{}),this.pluginSystem=new Xt,this.addPluginInputs(this.optionsManager.computed.plugins||[]),this.handleOptions(this.optionsManager.computed),this.publiclyTrigger("_init"),this.hydrate(),this.calendarInteractions=this.pluginSystem.hooks.calendarInteractions.map(function(e){return new e(n)})}return e.prototype.addPluginInputs=function(e){for(var t=function(e){for(var t=[],n=0,r=e;n"},e.prototype.detachSegs=function(e,t){var n=this.containerElsByType[e];n&&(n.forEach(m),delete this.containerElsByType[e])},e.prototype.computeSizes=function(e){for(var t in this.segsByType)(e||this.dirtySizeFlags[t])&&this.computeSegSizes(this.segsByType[t])},e.prototype.assignSizes=function(e){for(var t in this.segsByType)(e||this.dirtySizeFlags[t])&&this.assignSegSizes(this.segsByType[t]);this.dirtySizeFlags={}},e.prototype.computeSegSizes=function(e){},e.prototype.assignSegSizes=function(e){}})(),function(){function e(e){this.emitter=new zt}e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){}}();Boolean,String;function pr(e,t,n,r,i,o,a,s){var l,u=o.dateEnv,c=o.theme,p=o.options,f=De(t.activeRange,e),d=["fc-day-header",c.getClass("widgetHeader")];return l="function"===typeof p.columnHeaderHtml?p.columnHeaderHtml(u.toDate(e)):"function"===typeof p.columnHeaderText?yt(p.columnHeaderText(u.toDate(e))):yt(u.format(e,i)),n?d=d.concat(function(e,t,n,r){var i,o,a=n.calendar,s=n.options,l=n.theme,u=n.dateEnv,c=[];return De(t.activeRange,e)?(c.push("fc-"+M[e.getUTCDay()]),s.monthMode&&u.getMonth(e)!==u.getMonth(t.currentRange.start)&&c.push("fc-other-month"),o=I(i=L(a.getNow()),1),e=o?c.push("fc-future"):(c.push("fc-today"),!0!==r&&c.push(l.getClass("today")))):c.push("fc-disabled-day"),c}(e,t,o,!0)):d.push("fc-"+M[e.getUTCDay()]),'1?' colspan="'+a+'"':"")+(s?" "+s:"")+">"+(f?Nt(p,u,{date:e,forceOff:!n||1===r},l):l)+""}(function(e){function t(t){var n=e.call(this)||this;return n.renderSkeleton=Dt(n._renderSkeleton,n._unrenderSkeleton),n.parentEl=t,n}pe(t,e),t.prototype.render=function(e,t){var n=e.dates,r=e.datesRepDistinctDays,i=[];this.renderSkeleton(t),e.renderIntroHtml&&i.push(e.renderIntroHtml());for(var o=Ze(t.options.columnHeaderFormat||function(e,t){return!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"}}(r,n.length)),a=0,s=n;a"+i.join("")+""},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderSkeleton.unrender()},t.prototype._renderSkeleton=function(e){var t=e.theme,n=this.parentEl;n.innerHTML="",n.appendChild(this.el=u('
')),this.thead=this.el.querySelector("thead")},t.prototype._unrenderSkeleton=function(){m(this.el)}})(Wt),function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],a=-1;n=t.length?t[t.length-1]+1:t[n]}}(),function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n'+Object(r.rb)(n)+""),i=''+(Object(r.rb)(s.title||"")||" ")+"",'
'+("rtl"===o.options.dir?i+" "+m:m+" "+i)+"
"+(p?'
':"")+(f?'
':"")+"
"},t.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"}},t.prototype.computeDisplayEventEnd=function(){return!1},t}(r.j),c=function(e){function t(t){var n=e.call(this)||this;return n.dayGrid=t,n}return o(t,e),t.prototype.attachSegs=function(e,t){var n=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.forEach(function(e,t){e.querySelector(".fc-content-skeleton > table").appendChild(n[t].tbodyEl)}),t||this.dayGrid.removeSegPopover()},t.prototype.detachSegs=function(){for(var e,t=this.rowStructs||[];e=t.pop();)Object(r.Pb)(e.tbodyEl);this.rowStructs=null},t.prototype.renderSegRows=function(e){var t,n,r=[];for(t=this.groupSegRows(e),n=0;n=e.firstCol)return!0;return!1}function f(e,t){return e.leftCol-t.leftCol}var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.attachSegs=function(e,t){var n=t.sourceSeg,i=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.forEach(function(e,t){var o,a,s=Object(r.sb)('
');n&&n.row===t?o=n.el:(o=e.querySelector(".fc-content-skeleton tbody"))||(o=e.querySelector(".fc-content-skeleton table")),a=o.getBoundingClientRect().top-e.getBoundingClientRect().top,s.style.top=a+"px",s.querySelector("table").appendChild(i[t].tbodyEl),e.appendChild(s)})},t}(c),h=function(e){function t(t){var n=e.call(this)||this;return n.fillSegTag="td",n.dayGrid=t,n}return o(t,e),t.prototype.renderSegs=function(t,n,r){"bgEvent"===t&&(r=r.filter(function(e){return e.eventRange.def.allDay})),e.prototype.renderSegs.call(this,t,n,r)},t.prototype.attachSegs=function(e,t){var n,r,i,o=[];for(n=0;n
')).getElementsByTagName("tr")[0],u>0&&Object(r.y)(o,new Array(u+1).join('')),t.el.colSpan=c-u,o.appendChild(t.el),c'));var p=a.renderProps.renderIntroHtml();return p&&(s?Object(r.y)(o,p):Object(r.Kb)(o,p)),i},t}(r.k),m=function(e){function t(t){var n=e.call(this,t)||this,i=n.eventRenderer=new v(n),o=n.renderFrame=Object(r.Fb)(n._renderFrame);return n.renderFgEvents=Object(r.Fb)(i.renderSegs.bind(i),i.unrender.bind(i),[o]),n.renderEventSelection=Object(r.Fb)(i.selectByInstanceId.bind(i),i.unselectByInstanceId.bind(i),[n.renderFgEvents]),n.renderEventDrag=Object(r.Fb)(i.hideByHash.bind(i),i.showByHash.bind(i),[o]),n.renderEventResize=Object(r.Fb)(i.hideByHash.bind(i),i.showByHash.bind(i),[o]),n}return o(t,e),t.prototype.firstContext=function(e){e.calendar.registerInteractiveComponent(this,{el:this.el,useEventCenter:!1})},t.prototype.render=function(e,t){this.renderFrame(e.date),this.renderFgEvents(t,e.fgSegs),this.renderEventSelection(e.eventSelection),this.renderEventDrag(e.eventDragInstances),this.renderEventResize(e.eventResizeInstances)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderFrame.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},t.prototype._renderFrame=function(e){var t=this.context,n=t.theme,i=t.dateEnv,o=t.options,a=i.format(e,Object(r.T)(o.dayPopoverFormat));this.el.innerHTML='
'+Object(r.rb)(a)+'
',this.segContainerEl=this.el.querySelector(".fc-event-container")},t.prototype.queryHit=function(e,t,n,i){var o=this.props.date;if(e'),"rtl"===this.context.options.dir&&t.reverse(),""+t.join("")+""},e}();function y(e,t,n,i){var o=n.dateEnv,a=n.theme,s=Object(r.Nb)(t.activeRange,e),l=Object(r.lb)(e,t,n);return l.unshift("fc-day",a.getClass("widgetContent")),'"}var b=Object(r.T)({day:"numeric"}),_=Object(r.T)({week:"numeric"}),x=function(e){function t(t,n){var i=e.call(this,t)||this;i.bottomCoordPadding=0,i.isCellSizesDirty=!1,i.renderProps=n;var o=i.eventRenderer=new c(i),a=i.fillRenderer=new h(i);i.mirrorRenderer=new d(i);var s=i.renderCells=Object(r.Fb)(i._renderCells,i._unrenderCells);return i.renderBusinessHours=Object(r.Fb)(a.renderSegs.bind(a,"businessHours"),a.unrender.bind(a,"businessHours"),[s]),i.renderDateSelection=Object(r.Fb)(a.renderSegs.bind(a,"highlight"),a.unrender.bind(a,"highlight"),[s]),i.renderBgEvents=Object(r.Fb)(a.renderSegs.bind(a,"bgEvent"),a.unrender.bind(a,"bgEvent"),[s]),i.renderFgEvents=Object(r.Fb)(o.renderSegs.bind(o),o.unrender.bind(o),[s]),i.renderEventSelection=Object(r.Fb)(o.selectByInstanceId.bind(o),o.unselectByInstanceId.bind(o),[i.renderFgEvents]),i.renderEventDrag=Object(r.Fb)(i._renderEventDrag,i._unrenderEventDrag,[s]),i.renderEventResize=Object(r.Fb)(i._renderEventResize,i._unrenderEventResize,[s]),i}return o(t,e),t.prototype.render=function(e,t){var n=e.cells;this.rowCnt=n.length,this.colCnt=n[0].length,this.renderCells(n,e.isRigid),this.renderBusinessHours(t,e.businessHourSegs),this.renderDateSelection(t,e.dateSelectionSegs),this.renderBgEvents(t,e.bgEventSegs),this.renderFgEvents(t,e.fgEventSegs),this.renderEventSelection(e.eventSelection),this.renderEventDrag(e.eventDrag),this.renderEventResize(e.eventResize),this.segPopoverTile&&this.updateSegPopoverTile()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderCells.unrender()},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:Object(r.t)(n,1)}},t.prototype.updateSegPopoverTile=function(e,t){var n=this.props;this.segPopoverTile.receiveProps({date:e||this.segPopoverTile.props.date,fgSegs:t||this.segPopoverTile.props.fgSegs,eventSelection:n.eventSelection,eventDragInstances:n.eventDrag?n.eventDrag.affectedInstances:null,eventResizeInstances:n.eventResize?n.eventResize.affectedInstances:null},this.context)},t.prototype._renderCells=function(e,t){var n,i,o=this.context,a=o.calendar,s=o.view,l=o.isRtl,u=o.dateEnv,c=this.rowCnt,p=this.colCnt,f="";for(n=0;n
'+i.renderHtml({cells:this.props.cells[e],dateProfile:this.props.dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+'
'+(this.getIsNumbersVisible()?""+this.renderNumberTrHtml(e)+"":"")+"
"},t.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.renderProps.cellWeekNumbersVisible||this.renderProps.colWeekNumbersVisible},t.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},t.prototype.renderNumberTrHtml=function(e){var t=this.context.isRtl,n=this.renderProps.renderNumberIntroHtml(e,this);return""+(t?"":n)+this.renderNumberCellsHtml(e)+(t?n:"")+""},t.prototype.renderNumberCellsHtml=function(e){var t,n,r=[];for(t=0;t",this.renderProps.cellWeekNumbersVisible&&e.getUTCDay()===n&&(s+=Object(r.C)(a,o,{date:e,type:"week"},{class:"fc-week-number"},o.format(e,_))),u&&(s+=Object(r.C)(a,o,e,{class:"fc-day-number"},o.format(e,b))),s+=""):""},t.prototype.updateSize=function(e){var t=this.context.calendar,n=this.fillRenderer,r=this.eventRenderer,i=this.mirrorRenderer;(e||this.isCellSizesDirty||t.isEventsUpdated)&&(this.buildPositionCaches(),this.isCellSizesDirty=!1),n.computeSizes(e),r.computeSizes(e),i.computeSizes(e),n.assignSizes(e),r.assignSizes(e),i.assignSizes(e)},t.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildRowPositions()},t.prototype.buildColPositions=function(){this.colPositions.build()},t.prototype.buildRowPositions=function(){this.rowPositions.build(),this.rowPositions.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.cellEls[e*this.colCnt+t]},t.prototype._renderEventDrag=function(e){e&&(this.eventRenderer.hideByHash(e.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,e.segs))},t.prototype._unrenderEventDrag=function(e){e&&(this.eventRenderer.showByHash(e.affectedInstances),this.fillRenderer.unrender("highlight",this.context))},t.prototype._renderEventResize=function(e){e&&(this.eventRenderer.hideByHash(e.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,e.segs),this.mirrorRenderer.renderSegs(this.context,e.segs,{isResizing:!0,sourceSeg:e.sourceSeg}))},t.prototype._unrenderEventResize=function(e){e&&(this.eventRenderer.showByHash(e.affectedInstances),this.fillRenderer.unrender("highlight",this.context),this.mirrorRenderer.unrender(this.context,e.segs,{isResizing:!0,sourceSeg:e.sourceSeg}))},t.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},t.prototype.limitRows=function(e){var t,n,r=this.eventRenderer.rowStructs||[];for(t=0;ti)return t;return!1},t.prototype.limitRow=function(e,t){var n,i,o,a,s,l,u,c,p,f,d,h,m,v,g,y=this,b=this.colCnt,_=this.context.isRtl,x=this.eventRenderer.rowStructs[e],w=[],S=0,E=function(n){for(;S"+Object(r.rb)(i.weekLabel)+"":""},t.renderDayGridNumberIntroHtml=function(e,n){var i=t.context,o=i.options,a=i.dateEnv,s=n.props.cells[e][0].date;return t.colWeekNumbersVisible?'"+Object(r.C)(o,a,{date:s,type:"week",forceOff:1===n.colCnt},a.format(s,w))+"":""},t.renderDayGridBgIntroHtml=function(){var e=t.context.theme;return t.colWeekNumbersVisible?'":""},t.renderDayGridIntroHtml=function(){return t.colWeekNumbersVisible?'":""},t}return o(t,e),t.prototype._processOptions=function(e){e.weekNumbers?e.weekNumbersWithinDays?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0):(this.colWeekNumbersVisible=!1,this.cellWeekNumbersVisible=!1)},t.prototype.render=function(t,n){e.prototype.render.call(this,t,n),this.processOptions(n.options),this.renderSkeleton(n)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderSkeleton.unrender()},t.prototype._renderSkeleton=function(e){this.el.classList.add("fc-dayGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new r.n("hidden","auto");var t=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(t),t.classList.add("fc-day-grid-container");var n=Object(r.Q)("div",{className:"fc-day-grid"});t.appendChild(n),this.dayGrid=new x(n,{renderNumberIntroHtml:this.renderDayGridNumberIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:this.colWeekNumbersVisible,cellWeekNumbersVisible:this.cellWeekNumbersVisible})},t.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-dayGrid-view"),this.dayGrid.destroy(),this.scroller.destroy()},t.prototype.renderSkeletonHtml=function(){var e=this.context,t=e.theme,n=e.options;return''+(n.columnHeader?'':"")+'
 
'},t.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},t.prototype.hasRigidRows=function(){var e=this.context.options.eventLimit;return e&&"number"!==typeof e},t.prototype.updateSize=function(t,n,r){e.prototype.updateSize.call(this,t,n,r),this.dayGrid.updateSize(t)},t.prototype.updateBaseSize=function(e,t,n){var i,o,a=this.dayGrid,s=this.context.options.eventLimit,l=this.header?this.header.el:null;a.rowEls?(this.colWeekNumbersVisible&&(this.weekNumberWidth=Object(r.Db)(Object(r.hb)(this.el,".fc-week-number"))),this.scroller.clear(),l&&Object(r.Sb)(l),a.removeSegPopover(),s&&"number"===typeof s&&a.limitRows(s),i=this.computeScrollerHeight(t),this.setGridHeight(i,n),s&&"number"!==typeof s&&a.limitRows(s),n||(this.scroller.setHeight(i),((o=this.scroller.getScrollbarWidths()).left||o.right)&&(l&&Object(r.G)(l,o),i=this.computeScrollerHeight(t),this.scroller.setHeight(i)),this.scroller.lockOverflow(o))):n||(i=this.computeScrollerHeight(t),this.scroller.setHeight(i))},t.prototype.computeScrollerHeight=function(e){return e-Object(r.Rb)(this.el,this.scroller.el)},t.prototype.setGridHeight=function(e,t){this.context.options.monthMode?(t&&(e*=this.dayGrid.rowCnt/6),Object(r.bb)(this.dayGrid.rowEls,e,!t)):t?Object(r.Tb)(this.dayGrid.rowEls):Object(r.bb)(this.dayGrid.rowEls,e,!0)},t.prototype.computeDateScroll=function(e){return{top:0}},t.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},t.prototype.applyDateScroll=function(e){void 0!==e.top&&this.scroller.setScrollTop(e.top)},t}(r.r);S.prototype.dateProfileGeneratorClass=s;var E=function(e){function t(t){var n=e.call(this,t.el)||this;return n.slicer=new k,n.dayGrid=t,n}return o(t,e),t.prototype.firstContext=function(e){e.calendar.registerInteractiveComponent(this,{el:this.dayGrid.el})},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.context.calendar.unregisterInteractiveComponent(this)},t.prototype.render=function(e,t){var n=this.dayGrid,r=e.dateProfile,i=e.dayTable;n.receiveProps(a({},this.slicer.sliceProps(e,r,e.nextDayThreshold,t.calendar,n,i),{dateProfile:r,cells:i.cells,isRigid:e.isRigid}),t)},t.prototype.buildPositionCaches=function(){this.dayGrid.buildPositionCaches()},t.prototype.queryHit=function(e,t){var n=this.dayGrid.positionToHit(e,t);if(n)return{component:this.dayGrid,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(r.a),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(r.p),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTable=Object(r.Eb)(T),t}return o(t,e),t.prototype.render=function(t,n){e.prototype.render.call(this,t,n);var r=this.props.dateProfile,i=this.dayTable=this.buildDayTable(r,t.dateProfileGenerator);this.header&&this.header.receiveProps({dateProfile:r,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt,renderIntroHtml:this.renderHeadIntroHtml},n),this.simpleDayGrid.receiveProps({dateProfile:r,dayTable:i,businessHours:t.businessHours,dateSelection:t.dateSelection,eventStore:t.eventStore,eventUiBases:t.eventUiBases,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,isRigid:this.hasRigidRows(),nextDayThreshold:this.context.nextDayThreshold},n)},t.prototype._renderSkeleton=function(t){e.prototype._renderSkeleton.call(this,t),t.options.columnHeader&&(this.header=new r.c(this.el.querySelector(".fc-head-container"))),this.simpleDayGrid=new E(this.dayGrid)},t.prototype._unrenderSkeleton=function(){e.prototype._unrenderSkeleton.call(this),this.header&&this.header.destroy(),this.simpleDayGrid.destroy()},t}(S);function T(e,t){var n=new r.d(e.renderRange,t);return new r.e(n,/year|month|week/.test(e.currentRangeUnit))}Object(r.U)({defaultView:"dayGridMonth",views:{dayGrid:O,dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});var C=function(e,t){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function P(e,t){function n(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var A=function(){return(A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n
'+(n?'
'+Object(r.rb)(n)+"
":"")+(s.title?'
'+Object(r.rb)(s.title)+"
":"")+"
"+(f?'
':"")+""},t.prototype.computeSegHorizontals=function(e){var t,n,r;if(function(e){var t,n,r,i,o;for(t=0;t0&&i.el.classList.add("fc-time-grid-event-inset"),i.eventRange.def.title&&i.bottom-i.top<30&&i.el.classList.add("fc-short")}},t.prototype.generateSegCss=function(e){var t,n,r=this.context.options.slotEventOverlap,i=e.backwardCoord,o=e.forwardCoord,a=this.timeGrid.generateSegVerticalCss(e),s=this.context.isRtl;return r&&(o=Math.min(1,i+2*(o-i))),s?(t=1-o,n=i):(t=i,n=1-o),a.zIndex=e.level+1,a.left=100*t+"%",a.right=100*n+"%",r&&e.forwardPressure&&(a[s?"marginLeft":"marginRight"]=20),a},t}(r.j);function I(e){var t,n,r=e.forwardSegs,i=0;if(void 0===e.forwardPressure){for(t=0;to.top&&i.top=0;t--)if(n=Object(r.P)(N[t]),null!==(i=Object(r.Vb)(n,e))&&i>1)return n;return e},t.prototype.render=function(e,t){this.processOptions(t.options);var n=e.cells;this.colCnt=n.length,this.renderSkeleton(t.theme),this.renderSlats(e.dateProfile),this.renderColumns(e.cells,e.dateProfile),this.renderBusinessHours(t,e.businessHourSegs),this.renderDateSelection(e.dateSelectionSegs),this.renderFgEvents(t,e.fgEventSegs),this.renderBgEvents(t,e.bgEventSegs),this.renderEventSelection(e.eventSelection),this.renderEventDrag(e.eventDrag),this.renderEventResize(e.eventResize)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderSlats.unrender(),this.renderColumns.unrender(),this.renderSkeleton.unrender()},t.prototype.updateSize=function(e){var t=this.fillRenderer,n=this.eventRenderer,r=this.mirrorRenderer;(e||this.isSlatSizesDirty)&&(this.buildSlatPositions(),this.isSlatSizesDirty=!1),(e||this.isColSizesDirty)&&(this.buildColPositions(),this.isColSizesDirty=!1),t.computeSizes(e),n.computeSizes(e),r.computeSizes(e),t.assignSizes(e),n.assignSizes(e),r.assignSizes(e)},t.prototype._renderSkeleton=function(e){var t=this.el;t.innerHTML='
',this.rootBgContainerEl=t.querySelector(".fc-bg"),this.slatContainerEl=t.querySelector(".fc-slats"),this.bottomRuleEl=t.querySelector(".fc-divider")},t.prototype._renderSlats=function(e){var t=this.context.theme;this.slatContainerEl.innerHTML=''+this.renderSlatRowHtml(e)+"
",this.slatEls=Object(r.hb)(this.slatContainerEl,"tr"),this.slatPositions=new r.m(this.el,this.slatEls,!1,!0),this.isSlatSizesDirty=!0},t.prototype.renderSlatRowHtml=function(e){for(var t,n,i,o=this.context,a=o.dateEnv,s=o.theme,l=o.isRtl,u="",c=Object(r.Qb)(e.renderRange.start),p=e.minTime,f=Object(r.P)(0);Object(r.B)(p)'+(n?""+Object(r.rb)(a.format(t,this.labelFormat))+"":"")+"",u+='"+(l?"":i)+''+(l?i:"")+"",p=Object(r.u)(p,this.slotDuration),f=Object(r.u)(f,this.slotDuration);return u},t.prototype._renderColumns=function(e,t){var n=this.context,i=n.calendar,o=n.view,a=n.isRtl,s=n.theme,l=n.dateEnv,u=new g(this.context);this.rootBgContainerEl.innerHTML=''+u.renderHtml({cells:e,dateProfile:t,renderIntroHtml:this.renderProps.renderBgIntroHtml})+"
",this.colEls=Object(r.hb)(this.el,".fc-day, .fc-disabled-day");for(var c=0;c
');t&&n.reverse(),e=this.contentSkeletonEl=Object(r.sb)('
'+n.join("")+"
"),this.colContainerEls=Object(r.hb)(e,".fc-content-col"),this.mirrorContainerEls=Object(r.hb)(e,".fc-mirror-container"),this.fgContainerEls=Object(r.hb)(e,".fc-event-container:not(.fc-mirror-container)"),this.bgContainerEls=Object(r.hb)(e,".fc-bgevent-container"),this.highlightContainerEls=Object(r.hb)(e,".fc-highlight-container"),this.businessContainerEls=Object(r.hb)(e,".fc-business-container"),t&&(this.colContainerEls.reverse(),this.mirrorContainerEls.reverse(),this.fgContainerEls.reverse(),this.bgContainerEls.reverse(),this.highlightContainerEls.reverse(),this.businessContainerEls.reverse()),this.el.appendChild(e)},t.prototype.unrenderContentSkeleton=function(){Object(r.Pb)(this.contentSkeletonEl)},t.prototype.groupSegsByCol=function(e){var t,n=[];for(t=0;t0){var s=Object(r.Q)("div",{className:"fc-now-indicator fc-now-indicator-arrow"});s.style.top=i+"px",this.contentSkeletonEl.appendChild(s),o.push(s)}this.nowIndicatorEls=o}},t.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.forEach(r.Pb),this.nowIndicatorEls=null)},t.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.getBoundingClientRect().height},t.prototype.computeDateTop=function(e,t){return t||(t=Object(r.Qb)(e)),this.computeTimeTop(Object(r.P)(e.valueOf()-t.valueOf()))},t.prototype.computeTimeTop=function(e){var t,n,i=this.slatEls.length,o=this.props.dateProfile,a=(e.milliseconds-Object(r.B)(o.minTime))/Object(r.B)(this.slotDuration);return a=Math.max(0,a),a=Math.min(i,a),t=Math.floor(a),n=a-(t=Math.min(t,i-1)),this.slatPositions.tops[t]+this.slatPositions.getHeight(t)*n},t.prototype.computeSegVerticals=function(e){var t,n,r,i=this.context.options.timeGridEventMinHeight;for(t=0;t"+Object(r.C)(a,o,{date:s.start,type:"week",forceOff:l>1},Object(r.rb)(e))+""):'"},t.renderTimeGridBgIntroHtml=function(){return'"},t.renderTimeGridIntroHtml=function(){return'"},t.renderDayGridBgIntroHtml=function(){var e=t.context,n=e.theme,i=e.options;return'"+Object(r.jb)(i)+""},t.renderDayGridIntroHtml=function(){return'"},t}return P(t,e),t.prototype.render=function(t,n){e.prototype.render.call(this,t,n),this.renderSkeleton(n)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderSkeleton.unrender()},t.prototype._renderSkeleton=function(e){this.el.classList.add("fc-timeGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new r.n("hidden","auto");var t=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(t),t.classList.add("fc-time-grid-container");var n=Object(r.Q)("div",{className:"fc-time-grid"});if(t.appendChild(n),this.timeGrid=new z(n,{renderBgIntroHtml:this.renderTimeGridBgIntroHtml,renderIntroHtml:this.renderTimeGridIntroHtml}),e.options.allDaySlot){this.dayGrid=new x(this.el.querySelector(".fc-day-grid"),{renderNumberIntroHtml:this.renderDayGridIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:!1,cellWeekNumbersVisible:!1});var i=this.el.querySelector(".fc-divider");this.dayGrid.bottomCoordPadding=i.getBoundingClientRect().height}},t.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-timeGrid-view"),this.timeGrid.destroy(),this.dayGrid&&this.dayGrid.destroy(),this.scroller.destroy()},t.prototype.renderSkeletonHtml=function(){var e=this.context,t=e.theme,n=e.options;return''+(n.columnHeader?'':"")+'
 
'+(n.allDaySlot?'

':"")+"
"},t.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},t.prototype.unrenderNowIndicator=function(){this.timeGrid.unrenderNowIndicator()},t.prototype.updateSize=function(t,n,r){e.prototype.updateSize.call(this,t,n,r),this.timeGrid.updateSize(t),this.dayGrid&&this.dayGrid.updateSize(t)},t.prototype.updateBaseSize=function(e,t,n){var i,o,a,s=this;if(this.axisWidth=Object(r.Db)(Object(r.hb)(this.el,".fc-axis")),this.timeGrid.colEls){var l=Object(r.hb)(this.el,".fc-row").filter(function(e){return!s.scroller.el.contains(e)});this.timeGrid.bottomRuleEl.style.display="none",this.scroller.clear(),l.forEach(r.Sb),this.dayGrid&&(this.dayGrid.removeSegPopover(),(i=this.context.options.eventLimit)&&"number"!==typeof i&&(i=5),i&&this.dayGrid.limitRows(i)),n||(o=this.computeScrollerHeight(t),this.scroller.setHeight(o),((a=this.scroller.getScrollbarWidths()).left||a.right)&&(l.forEach(function(e){Object(r.G)(e,a)}),o=this.computeScrollerHeight(t),this.scroller.setHeight(o)),this.scroller.lockOverflow(a),this.timeGrid.getTotalSlatHeight()0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,s=void 0===o?a||t.pulsate:o,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&g.current)g.current=!1;else{"touchstart"===e.type&&(g.current=!0);var c,p,f,d=u?null:_.current,h=d?d.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(h.width/2),p=Math.round(h.height/2);else{var m=e.touches?e.touches[0]:e,v=m.clientX,w=m.clientY;c=Math.round(v-h.left),p=Math.round(w-h.top)}if(s)(f=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(f+=1);else{var S=2*Math.max(Math.abs((d?d.clientWidth:0)-c),c)+2,E=2*Math.max(Math.abs((d?d.clientHeight:0)-p),p)+2;f=Math.sqrt(Math.pow(S,2)+Math.pow(E,2))}e.touches?null===b.current&&(b.current=function(){x({pulsate:i,rippleX:c,rippleY:p,rippleSize:f,cb:n})},y.current=setTimeout(function(){b.current&&(b.current(),b.current=null)},80)):x({pulsate:i,rippleX:c,rippleY:p,rippleSize:f,cb:n})}},[a,x]),E=o.useCallback(function(){w({},{pulsate:!0})},[w]),O=o.useCallback(function(e,t){if(clearTimeout(y.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(y.current=setTimeout(function(){O(e,t)}));b.current=null,h(function(e){return e.length>0?e.slice(1):e}),v.current=t},[]);return o.useImperativeHandle(t,function(){return{pulsate:E,start:w,stop:O}},[E,w,O]),o.createElement("span",Object(r.a)({className:Object(l.a)(s.root,u),ref:_},c),o.createElement(S,{component:null,exit:!0},f))}),T=Object(p.a)(function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},{flip:!1,name:"MuiTouchRipple"})(o.memo(O)),C=o.forwardRef(function(e,t){var n=e.action,a=e.buttonRef,p=e.centerRipple,d=void 0!==p&&p,h=e.children,m=e.classes,v=e.className,g=e.component,y=void 0===g?"button":g,b=e.disabled,_=void 0!==b&&b,x=e.disableRipple,w=void 0!==x&&x,S=e.disableTouchRipple,E=void 0!==S&&S,k=e.focusRipple,O=void 0!==k&&k,C=e.focusVisibleClassName,P=e.onBlur,A=e.onClick,M=e.onFocus,I=e.onFocusVisible,j=e.onKeyDown,D=e.onKeyUp,R=e.onMouseDown,L=e.onMouseLeave,N=e.onMouseUp,z=e.onTouchEnd,B=e.onTouchMove,F=e.onTouchStart,U=e.onDragLeave,V=e.tabIndex,H=void 0===V?0:V,q=e.TouchRippleProps,G=e.type,W=void 0===G?"button":G,K=Object(i.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Z=o.useRef(null);var Y=o.useRef(null),X=o.useState(!1),J=X[0],$=X[1];_&&J&&$(!1);var Q=Object(f.a)(),ee=Q.isFocusVisible,te=Q.onBlurVisible,ne=Q.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;return Object(c.a)(function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0})}o.useImperativeHandle(n,function(){return{focusVisible:function(){$(!0),Z.current.focus()}}},[]),o.useEffect(function(){J&&O&&!w&&Y.current.pulsate()},[w,O,J]);var ie=re("start",R),oe=re("stop",U),ae=re("stop",N),se=re("stop",function(e){J&&e.preventDefault(),L&&L(e)}),le=re("start",F),ue=re("stop",z),ce=re("stop",B),pe=re("stop",function(e){J&&(te(e),$(!1)),P&&P(e)},!1),fe=Object(c.a)(function(e){Z.current||(Z.current=e.currentTarget),ee(e)&&($(!0),I&&I(e)),M&&M(e)}),de=function(){var e=s.findDOMNode(Z.current);return y&&"button"!==y&&!("A"===e.tagName&&e.href)},he=o.useRef(!1),me=Object(c.a)(function(e){O&&!he.current&&J&&Y.current&&" "===e.key&&(he.current=!0,e.persist(),Y.current.stop(e,function(){Y.current.start(e)})),e.target===e.currentTarget&&de()&&" "===e.key&&e.preventDefault(),j&&j(e),e.target===e.currentTarget&&de()&&"Enter"===e.key&&!_&&(e.preventDefault(),A&&A(e))}),ve=Object(c.a)(function(e){O&&" "===e.key&&Y.current&&J&&!e.defaultPrevented&&(he.current=!1,e.persist(),Y.current.stop(e,function(){Y.current.pulsate(e)})),D&&D(e),A&&e.target===e.currentTarget&&de()&&" "===e.key&&!e.defaultPrevented&&A(e)}),ge=y;"button"===ge&&K.href&&(ge="a");var ye={};"button"===ge?(ye.type=W,ye.disabled=_):("a"===ge&&K.href||(ye.role="button"),ye["aria-disabled"]=_);var be=Object(u.a)(a,t),_e=Object(u.a)(ne,Z),xe=Object(u.a)(be,_e),we=o.useState(!1),Se=we[0],Ee=we[1];o.useEffect(function(){Ee(!0)},[]);var ke=Se&&!w&&!_;return o.createElement(ge,Object(r.a)({className:Object(l.a)(m.root,v,J&&[m.focusVisible,C],_&&m.disabled),onBlur:pe,onClick:A,onFocus:fe,onKeyDown:me,onKeyUp:ve,onMouseDown:ie,onMouseLeave:se,onMouseUp:ae,onDragLeave:oe,onTouchEnd:ue,onTouchMove:ce,onTouchStart:le,ref:xe,tabIndex:_?-1:H},ye,K),h,ke?o.createElement(T,Object(r.a)({ref:Y,center:d},q)):null)});t.a=Object(p.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(C)},,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(162),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,u=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,p=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nA.length&&A.push(e)}function j(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case a:l=!0}}if(l)return r(i,t,""===n?"."+D(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u