From 65b70d26a226561d9395786122f7e21e67273056 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 14:40:04 +0100 Subject: [PATCH 1/3] ci: bump docker/setup-buildx-action from 2.9.1 to 2.10.0 (#4701) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.9.1 to 2.10.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2.9.1...v2.10.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-build-ontop.yml | 2 +- .github/workflows/docker-build-ubi.yml | 2 +- .github/workflows/docker-build.yml | 2 +- .github/workflows/docker-release-promote.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-ontop.yml b/.github/workflows/docker-build-ontop.yml index 5dc75c0bc30f..fc9cc3889fa5 100644 --- a/.github/workflows/docker-build-ontop.yml +++ b/.github/workflows/docker-build-ontop.yml @@ -82,7 +82,7 @@ jobs: cat "${DOCKERFILE_PATH}" - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v2.10.0 - name: Login to DockerHub uses: docker/login-action@v2.2.0 diff --git a/.github/workflows/docker-build-ubi.yml b/.github/workflows/docker-build-ubi.yml index 73c985fdd9ec..c7c40d8fc06a 100644 --- a/.github/workflows/docker-build-ubi.yml +++ b/.github/workflows/docker-build-ubi.yml @@ -32,7 +32,7 @@ jobs: fetch-depth: 0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v2.10.0 - name: Login to RedHat Registry uses: docker/login-action@v2.2.0 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 190a96e840cd..79589c56f6ad 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -66,7 +66,7 @@ jobs: echo "build_version=$version" >> $GITHUB_OUTPUT - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v2.10.0 - name: Login to DockerHub uses: docker/login-action@v2.2.0 diff --git a/.github/workflows/docker-release-promote.yml b/.github/workflows/docker-release-promote.yml index b74b937852ad..57079219ef6a 100644 --- a/.github/workflows/docker-release-promote.yml +++ b/.github/workflows/docker-release-promote.yml @@ -170,7 +170,7 @@ jobs: fi - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v2.10.0 - name: Login to DockerHub uses: docker/login-action@v2.2.0 From 691769693500303e61f8d5153d12f8d1d664fb65 Mon Sep 17 00:00:00 2001 From: Sergey Zhuk Date: Mon, 28 Aug 2023 16:38:02 +0100 Subject: [PATCH 2/3] Update CODEOWNERS --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 569cf44f9fe3..65c62231bd68 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,4 @@ .github/ @farioas +docs/.npmignore @hlomzik @Gondragos @nicholasrq +docs/package.json @hlomzik @Gondragos @nicholasrq +docs/yarn.lock @hlomzik @Gondragos @nicholasrq From 5e4bc3dbddf66d2823f96a3ff0e1e8b1d2a233d1 Mon Sep 17 00:00:00 2001 From: Nick Skriabin <767890+nicholasrq@users.noreply.github.com> Date: Mon, 28 Aug 2023 16:52:41 +0100 Subject: [PATCH 3/3] fix: LEAP-34: Driving OSS-to-Enterprise Adoption Minor UI Enhancements (#4691) * Fix minor visual issues * ci: Build frontend Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/5974948286 * Remove unused code * ci: Build frontend Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/5977688606 * Fix styling conflicts * Update build --------- Co-authored-by: robot-ci-heartex --- label_studio/frontend/dist/react-app/index.js | 2 +- .../frontend/dist/react-app/index.js.map | 2 +- label_studio/frontend/dist/react-app/main.css | 2 +- .../frontend/dist/react-app/main.css.map | 2 +- .../src/components/Caption/Caption.styl | 8 +++- .../components/Form/Elements/Label/Label.js | 6 ++- .../components/Form/Elements/Label/Label.styl | 18 ++++++++- .../Form/Elements/RadioGroup/RadioGroup.js | 20 +++++++--- .../src/components/HeidiTips/HeidiTip.styl | 6 +++ .../src/pages/Settings/GeneralSettings.js | 39 ++++++++++--------- .../frontend/src/pages/Settings/settings.styl | 8 ++-- 11 files changed, 75 insertions(+), 38 deletions(-) diff --git a/label_studio/frontend/dist/react-app/index.js b/label_studio/frontend/dist/react-app/index.js index f8dc86f80225..891c497f8c02 100644 --- a/label_studio/frontend/dist/react-app/index.js +++ b/label_studio/frontend/dist/react-app/index.js @@ -1,3 +1,3 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{var e={8554:(e,t,n)=>{"use strict";n.d(t,{Xb:()=>p,Gd:()=>g,cu:()=>h});var r=n(655),i=n(7199),o=n(2844),a=n(1170),s=n(2343),l=n(1422),u=n(6769),c=n(7482),d=function(){function e(e){this.errors=0,this.sid=(0,o.DM)(),this.duration=0,this.status=i.$.Ok,this.init=!0,this.ignoreDuration=!1;var t=(0,a.ph)();this.timestamp=t,this.started=t,e&&this.update(e)}return e.prototype.update=function(e){if(void 0===e&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),this.did||e.did||(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||(0,a.ph)(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=32===e.sid.length?e.sid:(0,o.DM)()),void 0!==e.init&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),"number"==typeof e.started&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof e.duration)this.duration=e.duration;else{var t=this.timestamp-this.started;this.duration=t>=0?t:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),"number"==typeof e.errors&&(this.errors=e.errors),e.status&&(this.status=e.status)},e.prototype.close=function(e){e?this.update({status:e}):this.status===i.$.Ok?this.update({status:i.$.Exited}):this.update()},e.prototype.toJSON=function(){return(0,c.Jr)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:(0,c.Jr)({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},e}(),f=4,p=function(){function e(e,t,n){void 0===t&&(t=new u.s),void 0===n&&(n=f),this._version=n,this._stack=[{}],this.getStackTop().scope=t,this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._version{"use strict";n.d(t,{c:()=>c,s:()=>l});var r=n(655),i=n(7597),o=n(1170),a=n(6893),s=n(2844),l=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return e.clone=function(t){var n=new e;return t&&(n._breadcrumbs=(0,r.fl)(t._breadcrumbs),n._tags=(0,r.pi)({},t._tags),n._extra=(0,r.pi)({},t._extra),n._contexts=(0,r.pi)({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=(0,r.fl)(t._eventProcessors),n._requestSession=t._requestSession),n},e.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},e.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},e.prototype.setUser=function(e){return this._user=e||{},this._session&&this._session.update({user:e}),this._notifyScopeListeners(),this},e.prototype.getUser=function(){return this._user},e.prototype.getRequestSession=function(){return this._requestSession},e.prototype.setRequestSession=function(e){return this._requestSession=e,this},e.prototype.setTags=function(e){return this._tags=(0,r.pi)((0,r.pi)({},this._tags),e),this._notifyScopeListeners(),this},e.prototype.setTag=function(e,t){var n;return this._tags=(0,r.pi)((0,r.pi)({},this._tags),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(e){return this._extra=(0,r.pi)((0,r.pi)({},this._extra),e),this._notifyScopeListeners(),this},e.prototype.setExtra=function(e,t){var n;return this._extra=(0,r.pi)((0,r.pi)({},this._extra),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},e.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},e.prototype.setTransactionName=function(e){return this._transactionName=e,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(e){return this.setTransactionName(e)},e.prototype.setContext=function(e,t){var n;return null===t?delete this._contexts[e]:this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.prototype.getTransaction=function(){var e,t,n,r,i=this.getSpan();return(null===(e=i)||void 0===e?void 0:e.transaction)?null===(t=i)||void 0===t?void 0:t.transaction:(null===(r=null===(n=i)||void 0===n?void 0:n.spanRecorder)||void 0===r?void 0:r.spans[0])?i.spanRecorder.spans[0]:void 0},e.prototype.setSession=function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this},e.prototype.getSession=function(){return this._session},e.prototype.update=function(t){if(!t)return this;if("function"==typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=(0,r.pi)((0,r.pi)({},this._tags),t._tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),t._extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):(0,i.PO)(t)&&(this._tags=(0,r.pi)((0,r.pi)({},this._tags),t.tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),t.extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(e,t){var n="number"==typeof t?Math.min(t,100):100;if(n<=0)return this;var i=(0,r.pi)({timestamp:(0,o.yW)()},e);return this._breadcrumbs=(0,r.fl)(this._breadcrumbs,[i]).slice(-n),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype.applyToEvent=function(e,t){var n;if(this._extra&&Object.keys(this._extra).length&&(e.extra=(0,r.pi)((0,r.pi)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=(0,r.pi)((0,r.pi)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=(0,r.pi)((0,r.pi)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=(0,r.pi)((0,r.pi)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=(0,r.pi)({trace:this._span.getTraceContext()},e.contexts);var i=null===(n=this._span.transaction)||void 0===n?void 0:n.name;i&&(e.tags=(0,r.pi)({transaction:i},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=(0,r.fl)(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors((0,r.fl)(u(),this._eventProcessors),e,t)},e.prototype._notifyEventProcessors=function(e,t,n,o){var s=this;return void 0===o&&(o=0),new a.c((function(a,l){var u=e[o];if(null===t||"function"!=typeof u)a(t);else{var c=u((0,r.pi)({},t),n);(0,i.J8)(c)?c.then((function(t){return s._notifyEventProcessors(e,t,n,o+1).then(a)})).then(null,l):s._notifyEventProcessors(e,c,n,o+1).then(a).then(null,l)}}))},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function u(){var e=(0,s.Rf)();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function c(e){u().push(e)}},6141:(e,t,n)=>{"use strict";n.d(t,{ro:()=>y,lb:()=>v});var r,i=n(655),o=n(8554);!function(e){e.Explicit="explicitly_set",e.Sampler="client_sampler",e.Rate="client_rate",e.Inheritance="inheritance"}(r||(r={}));var a=n(2343),s=n(1422),l=n(9732),u=n(5734),c=n(3233);function d(){var e=(0,c.x1)();e&&(a.k.log("[Tracing] Transaction: "+u.p.InternalError+" -> Global error occured"),e.setStatus(u.p.InternalError))}var f=n(6458),p=n(3391);function h(){var e=this.getScope();if(e){var t=e.getSpan();if(t)return{"sentry-trace":t.toTraceparent()}}return{}}function m(e,t,n){return(0,c.zu)()?void 0!==e.sampled?(e.setMetadata({transactionSampling:{method:r.Explicit}}),e):("function"==typeof t.tracesSampler?(i=t.tracesSampler(n),e.setMetadata({transactionSampling:{method:r.Sampler,rate:Number(i)}})):void 0!==n.parentSampled?(i=n.parentSampled,e.setMetadata({transactionSampling:{method:r.Inheritance}})):(i=t.tracesSampleRate,e.setMetadata({transactionSampling:{method:r.Rate,rate:Number(i)}})),function(e){if(isNaN(e)||"number"!=typeof e&&"boolean"!=typeof e)return a.k.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got "+JSON.stringify(e)+" of type "+JSON.stringify(typeof e)+"."),!1;if(e<0||e>1)return a.k.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+e+"."),!1;return!0}(i)?i?(e.sampled=Math.random()0&&(t.__SENTRY__.integrations=(0,i.fl)(t.__SENTRY__.integrations||[],r))}}(),(0,l.o)({callback:d,type:"error"}),(0,l.o)({callback:d,type:"unhandledrejection"})}e=n.hmd(e)},6458:(e,t,n)=>{"use strict";n.d(t,{io:()=>d,nT:()=>u});var r=n(655),i=n(1170),o=n(2343),a=n(5334),s=n(5734),l=n(3391),u=1e3,c=function(e){function t(t,n,r,i){void 0===r&&(r="");var o=e.call(this,i)||this;return o._pushActivity=t,o._popActivity=n,o.transactionSpanId=r,o}return(0,r.ZT)(t,e),t.prototype.add=function(t){var n=this;t.spanId!==this.transactionSpanId&&(t.finish=function(e){t.endTimestamp="number"==typeof e?e:(0,i._I)(),n._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),e.prototype.add.call(this,t)},t}(a.g),d=function(e){function t(t,n,r,i){void 0===r&&(r=u),void 0===i&&(i=!1);var a=e.call(this,t,n)||this;return a._idleHub=n,a._idleTimeout=r,a._onScope=i,a.activities={},a._heartbeatTimer=0,a._heartbeatCounter=0,a._finished=!1,a._beforeFinishCallbacks=[],n&&i&&(f(n),o.k.log("Setting idle transaction on scope. Span ID: "+a.spanId),n.configureScope((function(e){return e.setSpan(a)}))),a._initTimeout=setTimeout((function(){a._finished||a.finish()}),a._idleTimeout),a}return(0,r.ZT)(t,e),t.prototype.finish=function(t){var n,a,l=this;if(void 0===t&&(t=(0,i._I)()),this._finished=!0,this.activities={},this.spanRecorder){o.k.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);try{for(var u=(0,r.XA)(this._beforeFinishCallbacks),c=u.next();!c.done;c=u.next()){(0,c.value)(this,t)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}this.spanRecorder.spans=this.spanRecorder.spans.filter((function(e){if(e.spanId===l.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus(s.p.Cancelled),o.k.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));var n=e.startTimestamp=3?(o.k.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus(s.p.DeadlineExceeded),this.setTag("heartbeat","failed"),this.finish()):this._pingHeartbeat()}},t.prototype._pingHeartbeat=function(){var e=this;o.k.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),this._heartbeatTimer=setTimeout((function(){e._beat()}),5e3)},t}(l.Y);function f(e){if(e){var t=e.getScope();if(t)t.getTransaction()&&t.setSpan(void 0)}}},5334:(e,t,n)=>{"use strict";n.d(t,{D:()=>u,g:()=>l});var r=n(655),i=n(2844),o=n(1170),a=n(7482),s=n(5734),l=function(){function e(e){void 0===e&&(e=1e3),this.spans=[],this._maxlen=e}return e.prototype.add=function(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)},e}(),u=function(){function e(e){if(this.traceId=(0,i.DM)(),this.spanId=(0,i.DM)().substring(16),this.startTimestamp=(0,o._I)(),this.tags={},this.data={},!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}return e.prototype.child=function(e){return this.startChild(e)},e.prototype.startChild=function(t){var n=new e((0,r.pi)((0,r.pi)({},t),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));return n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,n},e.prototype.setTag=function(e,t){var n;return this.tags=(0,r.pi)((0,r.pi)({},this.tags),((n={})[e]=t,n)),this},e.prototype.setData=function(e,t){var n;return this.data=(0,r.pi)((0,r.pi)({},this.data),((n={})[e]=t,n)),this},e.prototype.setStatus=function(e){return this.status=e,this},e.prototype.setHttpStatus=function(e){this.setTag("http.status_code",String(e));var t=s.p.fromHttpCode(e);return t!==s.p.UnknownError&&this.setStatus(t),this},e.prototype.isSuccess=function(){return this.status===s.p.Ok},e.prototype.finish=function(e){this.endTimestamp="number"==typeof e?e:(0,o._I)()},e.prototype.toTraceparent=function(){var e="";return void 0!==this.sampled&&(e=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+e},e.prototype.toContext=function(){return(0,a.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},e.prototype.updateWithContext=function(e){var t,n,r,i,o;return this.data=null!=(t=e.data)?t:{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=null!=(n=e.spanId)?n:this.spanId,this.startTimestamp=null!=(r=e.startTimestamp)?r:this.startTimestamp,this.status=e.status,this.tags=null!=(i=e.tags)?i:{},this.traceId=null!=(o=e.traceId)?o:this.traceId,this},e.prototype.getTraceContext=function(){return(0,a.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},e.prototype.toJSON=function(){return(0,a.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},e}()},5734:(e,t,n)=>{"use strict";var r;n.d(t,{p:()=>r}),function(e){e.Ok="ok",e.DeadlineExceeded="deadline_exceeded",e.Unauthenticated="unauthenticated",e.PermissionDenied="permission_denied",e.NotFound="not_found",e.ResourceExhausted="resource_exhausted",e.InvalidArgument="invalid_argument",e.Unimplemented="unimplemented",e.Unavailable="unavailable",e.InternalError="internal_error",e.UnknownError="unknown_error",e.Cancelled="cancelled",e.AlreadyExists="already_exists",e.FailedPrecondition="failed_precondition",e.Aborted="aborted",e.OutOfRange="out_of_range",e.DataLoss="data_loss"}(r||(r={})),function(e){e.fromHttpCode=function(t){if(t<400)return e.Ok;if(t>=400&&t<500)switch(t){case 401:return e.Unauthenticated;case 403:return e.PermissionDenied;case 404:return e.NotFound;case 409:return e.AlreadyExists;case 413:return e.FailedPrecondition;case 429:return e.ResourceExhausted;default:return e.InvalidArgument}if(t>=500&&t<600)switch(t){case 501:return e.Unimplemented;case 503:return e.Unavailable;case 504:return e.DeadlineExceeded;default:return e.InternalError}return e.UnknownError}}(r||(r={}))},3391:(e,t,n)=>{"use strict";n.d(t,{Y:()=>u});var r=n(655),i=n(8554),o=n(7597),a=n(2343),s=n(7482),l=n(5334),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r._measurements={},r._hub=(0,i.Gd)(),(0,o.V9)(n,i.Xb)&&(r._hub=n),r.name=t.name||"",r.metadata=t.metadata||{},r._trimEnd=t.trimEnd,r.transaction=r,r}return(0,r.ZT)(t,e),t.prototype.setName=function(e){this.name=e},t.prototype.initSpanRecorder=function(e){void 0===e&&(e=1e3),this.spanRecorder||(this.spanRecorder=new l.g(e)),this.spanRecorder.add(this)},t.prototype.setMeasurements=function(e){this._measurements=(0,r.pi)({},e)},t.prototype.setMetadata=function(e){this.metadata=(0,r.pi)((0,r.pi)({},this.metadata),e)},t.prototype.finish=function(t){var n=this;if(void 0===this.endTimestamp){if(this.name||(a.k.warn("Transaction has no name, falling back to ``."),this.name=""),e.prototype.finish.call(this,t),!0===this.sampled){var r=this.spanRecorder?this.spanRecorder.spans.filter((function(e){return e!==n&&e.endTimestamp})):[];this._trimEnd&&r.length>0&&(this.endTimestamp=r.reduce((function(e,t){return e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e})).endTimestamp);var i={contexts:{trace:this.getTraceContext()},spans:r,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",debug_meta:this.metadata};return Object.keys(this._measurements).length>0&&(a.k.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),a.k.log("[Tracing] Finishing "+this.op+" transaction: "+this.name+"."),this._hub.captureEvent(i)}a.k.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.")}},t.prototype.toContext=function(){var t=e.prototype.toContext.call(this);return(0,s.Jr)((0,r.pi)((0,r.pi)({},t),{name:this.name,trimEnd:this._trimEnd}))},t.prototype.updateWithContext=function(t){var n;return e.prototype.updateWithContext.call(this,t),this.name=null!=(n=t.name)?n:"",this._trimEnd=t.trimEnd,this},t}(l.D)},3233:(e,t,n)=>{"use strict";n.d(t,{WB:()=>u,XL:()=>l,qG:()=>a,x1:()=>s,zu:()=>o});var r=n(8554),i=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function o(e){var t;return void 0===e&&(e=null===(t=(0,r.Gd)().getClient())||void 0===t?void 0:t.getOptions()),!!e&&("tracesSampleRate"in e||"tracesSampler"in e)}function a(e){var t=e.match(i);if(t){var n=void 0;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}}function s(e){var t,n;return void 0===e&&(e=(0,r.Gd)()),null===(n=null===(t=e)||void 0===t?void 0:t.getScope())||void 0===n?void 0:n.getTransaction()}function l(e){return e/1e3}function u(e){return 1e3*e}},7199:(e,t,n)=>{"use strict";var r,i;n.d(t,{$:()=>r}),function(e){e.Ok="ok",e.Exited="exited",e.Crashed="crashed",e.Abnormal="abnormal"}(r||(r={})),function(e){e.Ok="ok",e.Errored="errored",e.Crashed="crashed"}(i||(i={}))},8464:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(7597);function i(e,t){try{for(var n=e,r=[],i=0,a=0,s=void 0;n&&i++<5&&!("html"===(s=o(n,t))||i>1&&a+3*r.length+s.length>=80);)r.push(s),a+=s.length,n=n.parentNode;return r.reverse().join(" > ")}catch(e){return""}}function o(e,t){var n,i,o,a,s,l,u,c=e,d=[];if(!c||!c.tagName)return"";d.push(c.tagName.toLowerCase());var f=(null===(n=t)||void 0===n?void 0:n.length)?t.filter((function(e){return c.getAttribute(e)})).map((function(e){return[e,c.getAttribute(e)]})):null;if(null===(i=f)||void 0===i?void 0:i.length)f.forEach((function(e){d.push("["+e[0]+'="'+e[1]+'"]')}));else if(c.id&&d.push("#"+c.id),(o=c.className)&&(0,r.HD)(o))for(a=o.split(/\s+/),u=0;u{"use strict";n.d(t,{o:()=>m});var r,i=n(655),o=n(7597),a=n(2343),s=n(2844),l=n(7482),u=n(360),c=n(8823),d=(0,s.Rf)(),f={},p={};function h(e){if(!p[e])switch(p[e]=!0,e){case"console":!function(){if(!("console"in d))return;["debug","info","warn","error","log","assert"].forEach((function(e){e in d.console&&(0,l.hl)(d.console,e,(function(t){return function(){for(var n=[],r=0;r2?t[2]:void 0;if(i){var o=r,a=String(i);r=a,g("history",{from:o,to:a})}return e.apply(this,t)}}d.onpopstate=function(){for(var t=[],n=0;n{"use strict";function r(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return m(e,Error)}}function i(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)}function o(e){return"[object DOMError]"===Object.prototype.toString.call(e)}function a(e){return"[object DOMException]"===Object.prototype.toString.call(e)}function s(e){return"[object String]"===Object.prototype.toString.call(e)}function l(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function c(e){return"undefined"!=typeof Event&&m(e,Event)}function d(e){return"undefined"!=typeof Element&&m(e,Element)}function f(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function p(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function h(e){return u(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function m(e,t){try{return e instanceof t}catch(e){return!1}}n.d(t,{Cy:()=>h,HD:()=>s,J8:()=>p,Kj:()=>f,PO:()=>u,TX:()=>o,V9:()=>m,VW:()=>i,VZ:()=>r,cO:()=>c,fm:()=>a,kK:()=>d,pt:()=>l})},2343:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var r=n(2844),i=(0,r.Rf)(),o="Sentry Logger ",a=function(){function e(){this._enabled=!1}return e.prototype.disable=function(){this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.log=function(){for(var e=[],t=0;t{"use strict";n.d(t,{Cf:()=>u,DM:()=>a,Db:()=>c,EG:()=>d,JY:()=>h,Rf:()=>o,en:()=>s,jH:()=>l,l4:()=>f});var r=n(1422),i={};function o(){return(0,r.KV)()?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function a(){var e=o(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function s(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function l(e){if(e.message)return e.message;if(e.exception&&e.exception.values&&e.exception.values[0]){var t=e.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||e.event_id||""}return e.event_id||""}function u(e){var t=o();if(!("console"in t))return e();var n=t.console,r={};["debug","info","warn","error","log","assert"].forEach((function(e){e in t.console&&n[e].__sentry_original__&&(r[e]=n[e],n[e]=n[e].__sentry_original__)}));var i=e();return Object.keys(r).forEach((function(e){n[e]=r[e]})),i}function c(e,t,n){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].value=e.exception.values[0].value||t||"",e.exception.values[0].type=e.exception.values[0].type||n||"Error"}function d(e,t){void 0===t&&(t={});try{e.exception.values[0].mechanism=e.exception.values[0].mechanism||{},Object.keys(t).forEach((function(n){e.exception.values[0].mechanism[n]=t[n]}))}catch(e){}}function f(){try{return document.location.href}catch(e){return""}}var p=6e4;function h(e,t){if(!t)return p;var n=parseInt(""+t,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(""+t);return isNaN(r)?p:r-e}},1422:(e,t,n)=>{"use strict";function r(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function i(e,t){return e.require(t)}function o(t){var n;try{n=i(e,t)}catch(e){}try{var r=i(e,"process").cwd;n=i(e,r()+"/node_modules/"+t)}catch(e){}return n}n.d(t,{$y:()=>o,KV:()=>r,l$:()=>i}),e=n.hmd(e)},7482:(e,t,n)=>{"use strict";n.d(t,{Jr:()=>y,zf:()=>v,hl:()=>u,Fv:()=>g,Qy:()=>p,_j:()=>c});var r=n(655),i=n(8464),o=n(7597),a=function(){function e(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return e.prototype.memoize=function(e){if(this._hasWeakSet)return!!this._inner.has(e)||(this._inner.add(e),!1);for(var t=0;t"}try{s.currentTarget=(0,o.kK)(a.currentTarget)?(0,i.R)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(e){s.currentTarget=""}for(var r in"undefined"!=typeof CustomEvent&&(0,o.V9)(e,CustomEvent)&&(s.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,r)&&(s[r]=a);return s}return e}function f(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function p(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r=g(e,t);return f(r)>n?p(e,t-1,n):r}function h(e,t){return"domain"===t&&e&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":void 0!==n.g&&e===n.g?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":(0,o.Cy)(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?"[Function: "+(0,s.$)(e)+"]":"symbol"==typeof e?"["+String(e)+"]":"bigint"==typeof e?"[BigInt: "+String(e)+"]":e}function m(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=new a),0===n)return function(e){var t=Object.prototype.toString.call(e);if("string"==typeof e)return e;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=h(e);return(0,o.pt)(n)?n:t}(t);if(null!=t&&"function"==typeof t.toJSON)return t.toJSON();var i=h(t,e);if((0,o.pt)(i))return i;var s=d(t),l=Array.isArray(t)?[]:{};if(r.memoize(t))return"[Circular ~]";for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(l[u]=m(u,s[u],n-1,r));return r.unmemoize(t),l}function g(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return m(e,n,t)})))}catch(e){return"**non-serializable**"}}function v(e,t){void 0===t&&(t=40);var n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return(0,l.$G)(n[0],t);for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:(0,l.$G)(i,t)}return""}function y(e){var t,n;if((0,o.PO)(e)){var i=e,a={};try{for(var s=(0,r.XA)(Object.keys(i)),l=s.next();!l.done;l=s.next()){var u=l.value;void 0!==i[u]&&(a[u]=y(i[u]))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}return Array.isArray(e)?e.map(y):e}},360:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r="";function i(e){try{return e&&"function"==typeof e&&e.name||r}catch(e){return r}}},7321:(e,t,n)=>{"use strict";n.d(t,{$G:()=>i,nK:()=>o,zC:()=>a});var r=n(7597);function i(e,t){return void 0===t&&(t=0),"string"!=typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function o(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r{"use strict";n.d(t,{Ak:()=>o,Bf:()=>u,Du:()=>a,hv:()=>l,t$:()=>s});var r=n(2343),i=n(2844);function o(){if(!("fetch"in(0,i.Rf)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function a(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function s(){if(!o())return!1;var e=(0,i.Rf)();if(a(e.fetch))return!0;var t=!1,n=e.document;if(n&&"function"==typeof n.createElement)try{var s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s),s.contentWindow&&s.contentWindow.fetch&&(t=a(s.contentWindow.fetch)),n.head.removeChild(s)}catch(e){r.k.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}function l(){if(!o())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}}function u(){var e=(0,i.Rf)(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}},6893:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var r,i=n(7597);!function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(r||(r={}));var o=function(){function e(e){var t=this;this._state=r.PENDING,this._handlers=[],this._resolve=function(e){t._setResult(r.RESOLVED,e)},this._reject=function(e){t._setResult(r.REJECTED,e)},this._setResult=function(e,n){t._state===r.PENDING&&((0,i.J8)(n)?n.then(t._resolve,t._reject):(t._state=e,t._value=n,t._executeHandlers()))},this._attachHandler=function(e){t._handlers=t._handlers.concat(e),t._executeHandlers()},this._executeHandlers=function(){if(t._state!==r.PENDING){var e=t._handlers.slice();t._handlers=[],e.forEach((function(e){e.done||(t._state===r.RESOLVED&&e.onfulfilled&&e.onfulfilled(t._value),t._state===r.REJECTED&&e.onrejected&&e.onrejected(t._value),e.done=!0)}))}};try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}return e.resolve=function(t){return new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(n,r){if(Array.isArray(t))if(0!==t.length){var i=t.length,o=[];t.forEach((function(t,a){e.resolve(t).then((function(e){o[a]=e,0===(i-=1)&&n(o)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},e.prototype.then=function(t,n){var r=this;return new e((function(e,i){r._attachHandler({done:!1,onfulfilled:function(n){if(t)try{return void e(t(n))}catch(e){return void i(e)}else e(n)},onrejected:function(t){if(n)try{return void e(n(t))}catch(e){return void i(e)}else i(t)}})}))},e.prototype.catch=function(e){return this.then((function(e){return e}),e)},e.prototype.finally=function(t){var n=this;return new e((function(e,r){var i,o;return n.then((function(e){o=!1,i=e,t&&t()}),(function(e){o=!0,i=e,t&&t()})).then((function(){o?r(i):e(i)}))}))},e.prototype.toString=function(){return"[object SyncPromise]"},e}()},1170:(e,t,n)=>{"use strict";n.d(t,{Z1:()=>d,_I:()=>c,ph:()=>u,yW:()=>l});var r=n(2844),i=n(1422);e=n.hmd(e);var o={nowSeconds:function(){return Date.now()/1e3}};var a=(0,i.KV)()?function(){try{return(0,i.l$)(e,"perf_hooks").performance}catch(e){return}}():function(){var e=(0,r.Rf)().performance;if(e&&e.now)return{now:function(){return e.now()},timeOrigin:Date.now()-e.now()}}(),s=void 0===a?o:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},l=o.nowSeconds.bind(o),u=s.nowSeconds.bind(s),c=u,d=function(){var e=(0,r.Rf)().performance;if(e&&e.now){var t=36e5,n=e.now(),i=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,a=on?n:e},t=function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var n=0;n<=3;n++)n<3?((t[n]<0||t[n]>255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},n={},r=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];r=3?Array.prototype.slice.call(e):"object"==a(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},l=function(e){if(e.length<2)return null;var t=e.length-1;return"string"==a(e[t])?e[t].toLowerCase():null},u=Math.PI,c={clip_rgb:t,limit:e,type:a,unpack:s,last:l,PI:u,TWOPI:2*u,PITHIRD:u/3,DEG2RAD:u/180,RAD2DEG:180/u},d={format:{},autodetect:[]},f=c.last,p=c.clip_rgb,h=c.type,m=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===h(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=f(e),i=!1;if(!r){i=!0,d.sorted||(d.autodetect=d.autodetect.sort((function(e,t){return t.p-e.p})),d.sorted=!0);for(var o=0,a=d.autodetect;o4?e[4]:1;return 1===o?[0,0,0,a]:[n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),i>=1?0:255*(1-i)*(1-o),a]},C=S,j=c.unpack,E=c.type;g.prototype.cmyk=function(){return k(this._rgb)},y.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["cmyk"])))},d.format.cmyk=C,d.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=j(e,"cmyk"),"array"===E(e)&&4===e.length)return"cmyk"}});var T=c.unpack,O=c.last,N=function(e){return Math.round(100*e)/100},M=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=T(e,"hsla"),r=O(e)||"lsa";return n[0]=N(n[0]||0),n[1]=N(100*n[1])+"%",n[2]=N(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},L=M,A=c.unpack,P=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=A(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var o,a,s=Math.min(n,r,i),l=Math.max(n,r,i),u=(l+s)/2;return l===s?(o=0,a=Number.NaN):o=u<.5?(l-s)/(l+s):(l-s)/(2-l-s),n==l?a=(r-i)/(l-s):r==l?a=2+(i-n)/(l-s):i==l&&(a=4+(n-r)/(l-s)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,o,u,e[3]]:[a,o,u]},R=P,D=c.unpack,I=c.last,F=Math.round,q=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=D(e,"rgba"),r=I(e)||"rgb";return"hsl"==r.substr(0,3)?L(R(n),r):(n[0]=F(n[0]),n[1]=F(n[1]),n[2]=F(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},z=q,U=c.unpack,W=Math.round,H=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,o,a=(t=U(t,"hsl"))[0],s=t[1],l=t[2];if(0===s)r=i=o=255*l;else{var u=[0,0,0],c=[0,0,0],d=l<.5?l*(1+s):l+s-l*s,f=2*l-d,p=a/360;u[0]=p+1/3,u[1]=p,u[2]=p-1/3;for(var h=0;h<3;h++)u[h]<0&&(u[h]+=1),u[h]>1&&(u[h]-=1),6*u[h]<1?c[h]=f+6*(d-f)*u[h]:2*u[h]<1?c[h]=d:3*u[h]<2?c[h]=f+(d-f)*(2/3-u[h])*6:c[h]=f;r=(e=[W(255*c[0]),W(255*c[1]),W(255*c[2])])[0],i=e[1],o=e[2]}return t.length>3?[r,i,o,t[3]]:[r,i,o,1]},B=H,V=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,$=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,G=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Y=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,K=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Z=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,X=Math.round,J=function(e){var t;if(e=e.toLowerCase().trim(),d.format.named)try{return d.format.named(e)}catch(e){}if(t=e.match(V)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match($)){for(var i=t.slice(1,5),o=0;o<4;o++)i[o]=+i[o];return i}if(t=e.match(G)){for(var a=t.slice(1,4),s=0;s<3;s++)a[s]=X(2.55*a[s]);return a[3]=1,a}if(t=e.match(Y)){for(var l=t.slice(1,5),u=0;u<3;u++)l[u]=X(2.55*l[u]);return l[3]=+l[3],l}if(t=e.match(K)){var c=t.slice(1,4);c[1]*=.01,c[2]*=.01;var f=B(c);return f[3]=1,f}if(t=e.match(Z)){var p=t.slice(1,4);p[1]*=.01,p[2]*=.01;var h=B(p);return h[3]=+t[4],h}};J.test=function(e){return V.test(e)||$.test(e)||G.test(e)||Y.test(e)||K.test(e)||Z.test(e)};var Q=J,ee=c.type;g.prototype.css=function(e){return z(this._rgb,e)},y.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["css"])))},d.format.css=Q,d.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===ee(e)&&Q.test(e))return"css"}});var te=c.unpack;d.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=te(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},y.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["gl"])))},g.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var ne=c.unpack,re=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=ne(e,"rgb"),i=r[0],o=r[1],a=r[2],s=Math.min(i,o,a),l=Math.max(i,o,a),u=l-s,c=100*u/255,d=s/(255-u)*100;return 0===u?n=Number.NaN:(i===l&&(n=(o-a)/u),o===l&&(n=2+(a-i)/u),a===l&&(n=4+(i-o)/u),(n*=60)<0&&(n+=360)),[n,c,d]},ie=re,oe=c.unpack,ae=Math.floor,se=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var l,u,c,d=(a=oe(a,"hcg"))[0],f=a[1],p=a[2];p*=255;var h=255*f;if(0===f)l=u=c=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var m=ae(d/=60),g=d-m,v=p*(1-f),y=v+h*(1-g),b=v+h*g,w=v+h;switch(m){case 0:l=(e=[w,b,v])[0],u=e[1],c=e[2];break;case 1:l=(t=[y,w,v])[0],u=t[1],c=t[2];break;case 2:l=(n=[v,w,b])[0],u=n[1],c=n[2];break;case 3:l=(r=[v,y,w])[0],u=r[1],c=r[2];break;case 4:l=(i=[b,v,w])[0],u=i[1],c=i[2];break;case 5:l=(o=[w,v,y])[0],u=o[1],c=o[2]}}return[l,u,c,a.length>3?a[3]:1]},le=se,ue=c.unpack,ce=c.type;g.prototype.hcg=function(){return ie(this._rgb)},y.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["hcg"])))},d.format.hcg=le,d.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ue(e,"hcg"),"array"===ce(e)&&3===e.length)return"hcg"}});var de=c.unpack,fe=c.last,pe=Math.round,he=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=de(e,"rgba"),r=n[0],i=n[1],o=n[2],a=n[3],s=fe(e)||"auto";void 0===a&&(a=1),"auto"===s&&(s=a<1?"rgba":"rgb");var l="000000"+((r=pe(r))<<16|(i=pe(i))<<8|(o=pe(o))).toString(16);l=l.substr(l.length-6);var u="0"+pe(255*a).toString(16);switch(u=u.substr(u.length-2),s.toLowerCase()){case"rgba":return"#"+l+u;case"argb":return"#"+u+l;default:return"#"+l}},me=he,ge=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,ve=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,ye=function(e){if(e.match(ge)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(ve)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},be=c.type;g.prototype.hex=function(e){return me(this._rgb,e)},y.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["hex"])))},d.format.hex=ye,d.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===be(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var we=c.unpack,xe=c.TWOPI,ke=Math.min,_e=Math.sqrt,Se=Math.acos,Ce=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=we(e,"rgb"),i=r[0],o=r[1],a=r[2],s=ke(i/=255,o/=255,a/=255),l=(i+o+a)/3,u=l>0?1-s/l:0;return 0===u?n=NaN:(n=(i-o+(i-a))/2,n/=_e((i-o)*(i-o)+(i-a)*(o-a)),n=Se(n),a>o&&(n=xe-n),n/=xe),[360*n,u,l]},je=Ce,Ee=c.unpack,Te=c.limit,Oe=c.TWOPI,Ne=c.PITHIRD,Me=Math.cos,Le=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=Ee(e,"hsi"))[0],a=e[1],s=e[2];return isNaN(o)&&(o=0),isNaN(a)&&(a=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?r=1-((i=(1-a)/3)+(n=(1+a*Me(Oe*o)/Me(Ne-Oe*o))/3)):o<2/3?i=1-((n=(1-a)/3)+(r=(1+a*Me(Oe*(o-=1/3))/Me(Ne-Oe*o))/3)):n=1-((r=(1-a)/3)+(i=(1+a*Me(Oe*(o-=2/3))/Me(Ne-Oe*o))/3)),[255*(n=Te(s*n*3)),255*(r=Te(s*r*3)),255*(i=Te(s*i*3)),e.length>3?e[3]:1]},Ae=Le,Pe=c.unpack,Re=c.type;g.prototype.hsi=function(){return je(this._rgb)},y.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["hsi"])))},d.format.hsi=Ae,d.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Pe(e,"hsi"),"array"===Re(e)&&3===e.length)return"hsi"}});var De=c.unpack,Ie=c.type;g.prototype.hsl=function(){return R(this._rgb)},y.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["hsl"])))},d.format.hsl=B,d.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=De(e,"hsl"),"array"===Ie(e)&&3===e.length)return"hsl"}});var Fe=c.unpack,qe=Math.min,ze=Math.max,Ue=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=Fe(e,"rgb"))[0],a=e[1],s=e[2],l=qe(o,a,s),u=ze(o,a,s),c=u-l;return i=u/255,0===u?(n=Number.NaN,r=0):(r=c/u,o===u&&(n=(a-s)/c),a===u&&(n=2+(s-o)/c),s===u&&(n=4+(o-a)/c),(n*=60)<0&&(n+=360)),[n,r,i]},We=Ue,He=c.unpack,Be=Math.floor,Ve=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var l,u,c,d=(a=He(a,"hsv"))[0],f=a[1],p=a[2];if(p*=255,0===f)l=u=c=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var h=Be(d/=60),m=d-h,g=p*(1-f),v=p*(1-f*m),y=p*(1-f*(1-m));switch(h){case 0:l=(e=[p,y,g])[0],u=e[1],c=e[2];break;case 1:l=(t=[v,p,g])[0],u=t[1],c=t[2];break;case 2:l=(n=[g,p,y])[0],u=n[1],c=n[2];break;case 3:l=(r=[g,v,p])[0],u=r[1],c=r[2];break;case 4:l=(i=[y,g,p])[0],u=i[1],c=i[2];break;case 5:l=(o=[p,g,v])[0],u=o[1],c=o[2]}}return[l,u,c,a.length>3?a[3]:1]},$e=Ve,Ge=c.unpack,Ye=c.type;g.prototype.hsv=function(){return We(this._rgb)},y.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["hsv"])))},d.format.hsv=$e,d.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ge(e,"hsv"),"array"===Ye(e)&&3===e.length)return"hsv"}});var Ke={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ze=c.unpack,Xe=Math.pow,Je=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ze(e,"rgb"),r=n[0],i=n[1],o=n[2],a=tt(r,i,o),s=a[0],l=a[1],u=116*l-16;return[u<0?0:u,500*(s-l),200*(l-a[2])]},Qe=function(e){return(e/=255)<=.04045?e/12.92:Xe((e+.055)/1.055,2.4)},et=function(e){return e>Ke.t3?Xe(e,1/3):e/Ke.t2+Ke.t0},tt=function(e,t,n){return e=Qe(e),t=Qe(t),n=Qe(n),[et((.4124564*e+.3575761*t+.1804375*n)/Ke.Xn),et((.2126729*e+.7151522*t+.072175*n)/Ke.Yn),et((.0193339*e+.119192*t+.9503041*n)/Ke.Zn)]},nt=Je,rt=c.unpack,it=Math.pow,ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=rt(e,"lab"))[0],a=e[1],s=e[2];return r=(o+16)/116,n=isNaN(a)?r:r+a/500,i=isNaN(s)?r:r-s/200,r=Ke.Yn*st(r),n=Ke.Xn*st(n),i=Ke.Zn*st(i),[at(3.2404542*n-1.5371385*r-.4985314*i),at(-.969266*n+1.8760108*r+.041556*i),at(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},at=function(e){return 255*(e<=.00304?12.92*e:1.055*it(e,1/2.4)-.055)},st=function(e){return e>Ke.t1?e*e*e:Ke.t2*(e-Ke.t0)},lt=ot,ut=c.unpack,ct=c.type;g.prototype.lab=function(){return nt(this._rgb)},y.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["lab"])))},d.format.lab=lt,d.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ut(e,"lab"),"array"===ct(e)&&3===e.length)return"lab"}});var dt=c.unpack,ft=c.RAD2DEG,pt=Math.sqrt,ht=Math.atan2,mt=Math.round,gt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=dt(e,"lab"),r=n[0],i=n[1],o=n[2],a=pt(i*i+o*o),s=(ht(o,i)*ft+360)%360;return 0===mt(1e4*a)&&(s=Number.NaN),[r,a,s]},vt=gt,yt=c.unpack,bt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=yt(e,"rgb"),r=n[0],i=n[1],o=n[2],a=nt(r,i,o),s=a[0],l=a[1],u=a[2];return vt(s,l,u)},wt=bt,xt=c.unpack,kt=c.DEG2RAD,_t=Math.sin,St=Math.cos,Ct=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=xt(e,"lch"),r=n[0],i=n[1],o=n[2];return isNaN(o)&&(o=0),[r,St(o*=kt)*i,_t(o)*i]},jt=Ct,Et=c.unpack,Tt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=Et(e,"lch"))[0],r=e[1],i=e[2],o=jt(n,r,i),a=o[0],s=o[1],l=o[2],u=lt(a,s,l);return[u[0],u[1],u[2],e.length>3?e[3]:1]},Ot=Tt,Nt=c.unpack,Mt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Nt(e,"hcl").reverse();return Ot.apply(void 0,n)},Lt=Mt,At=c.unpack,Pt=c.type;g.prototype.lch=function(){return wt(this._rgb)},g.prototype.hcl=function(){return wt(this._rgb).reverse()},y.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["lch"])))},y.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["hcl"])))},d.format.lch=Ot,d.format.hcl=Lt,["lch","hcl"].forEach((function(e){return d.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=At(t,e),"array"===Pt(t)&&3===t.length)return e}})}));var Rt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Dt=c.type;g.prototype.name=function(){for(var e=me(this._rgb,"rgb"),t=0,n=Object.keys(Rt);t0;)t[n]=arguments[n+1];if(!t.length&&"string"===Dt(e)&&Rt[e.toLowerCase()])return"named"}});var It=c.unpack,Ft=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=It(e,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},qt=Ft,zt=c.type,Ut=function(e){if("number"==zt(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},Wt=c.type;g.prototype.num=function(){return qt(this._rgb)},y.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["num"])))},d.format.num=Ut,d.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Wt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var Ht=c.unpack,Bt=c.type,Vt=Math.round;g.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Vt)},g.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:Vt(t):t}))},y.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["rgb"])))},d.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ht(e,"rgba");return void 0===n[3]&&(n[3]=1),n},d.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ht(e,"rgba"),"array"===Bt(e)&&(3===e.length||4===e.length&&"number"==Bt(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var $t=Math.log,Gt=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*$t(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*$t(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*$t(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*$t(n),r=255),[t,n,r,1]},Yt=c.unpack,Kt=Math.round,Zt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=Yt(e,"rgb"),i=r[0],o=r[2],a=1e3,s=4e4,l=.4;s-a>l;){var u=Gt(n=.5*(s+a));u[2]/u[0]>=o/i?s=n:a=n}return Kt(n)},Xt=Zt;g.prototype.temp=g.prototype.kelvin=g.prototype.temperature=function(){return Xt(this._rgb)},y.temp=y.kelvin=y.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g,[null].concat(e,["temp"])))},d.format.temp=d.format.kelvin=d.format.temperature=Gt;var Jt=c.type;g.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Jt(e)?t?(this._rgb[3]=e,this):new g([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},g.prototype.clipped=function(){return this._rgb._clipped||!1},g.prototype.darken=function(e){void 0===e&&(e=1);var t=this,n=t.lab();return n[0]-=Ke.Kn*e,new g(n,"lab").alpha(t.alpha(),!0)},g.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},g.prototype.darker=g.prototype.darken,g.prototype.brighter=g.prototype.brighten,g.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var o=n.indexOf(r);if(o>-1)return i[o];throw new Error("unknown channel "+r+" in mode "+n)}return i};var Qt=c.type,en=Math.pow,tn=1e-7,nn=20;g.prototype.luminance=function(e){if(void 0!==e&&"number"===Qt(e)){if(0===e)return new g([0,0,0,this._rgb[3]],"rgb");if(1===e)return new g([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n="rgb",r=nn,i=function(t,o){var a=t.interpolate(o,.5,n),s=a.luminance();return Math.abs(e-s)e?i(t,a):i(a,o)},o=(t>e?i(new g([0,0,0]),this):i(this,new g([255,255,255]))).rgb();return new g(o.concat([this._rgb[3]]))}return rn.apply(void 0,this._rgb.slice(0,3))};var rn=function(e,t,n){return.2126*(e=on(e))+.7152*(t=on(t))+.0722*(n=on(n))},on=function(e){return(e/=255)<=.03928?e/12.92:en((e+.055)/1.055,2.4)},an={},sn=c.type,ln=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var o=r[0]||"lrgb";if(an[o]||r.length||(o=Object.keys(an)[0]),!an[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==sn(e)&&(e=new g(e)),"object"!==sn(t)&&(t=new g(t)),an[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};g.prototype.mix=g.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return ln.apply(void 0,[this,e,t].concat(n))},g.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new g([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},g.prototype.saturate=function(e){void 0===e&&(e=1);var t=this,n=t.lch();return n[1]+=Ke.Kn*e,n[1]<0&&(n[1]=0),new g(n,"lch").alpha(t.alpha(),!0)},g.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var un=c.type;g.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],o=r[1],a=this[i]();if(o){var s=i.indexOf(o);if(s>-1){if("string"==un(t))switch(t.charAt(0)){case"+":case"-":a[s]+=+t;break;case"*":a[s]*=+t.substr(1);break;case"/":a[s]/=+t.substr(1);break;default:a[s]=+t}else{if("number"!==un(t))throw new Error("unsupported value for Color.set");a[s]=t}var l=new g(a,i);return n?(this._rgb=l._rgb,this):l}throw new Error("unknown channel "+o+" in mode "+i)}return a};var cn=function(e,t,n){var r=e._rgb,i=t._rgb;return new g(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};an.rgb=cn;var dn=Math.sqrt,fn=Math.pow,pn=function(e,t,n){var r=e._rgb,i=r[0],o=r[1],a=r[2],s=t._rgb,l=s[0],u=s[1],c=s[2];return new g(dn(fn(i,2)*(1-n)+fn(l,2)*n),dn(fn(o,2)*(1-n)+fn(u,2)*n),dn(fn(a,2)*(1-n)+fn(c,2)*n),"rgb")};an.lrgb=pn;var hn=function(e,t,n){var r=e.lab(),i=t.lab();return new g(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};an.lab=hn;var mn=function(e,t,n,r){var i,o,a,s,l,u,c,d,f,p,h,m;return"hsl"===r?(a=e.hsl(),s=t.hsl()):"hsv"===r?(a=e.hsv(),s=t.hsv()):"hcg"===r?(a=e.hcg(),s=t.hcg()):"hsi"===r?(a=e.hsi(),s=t.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",a=e.hcl(),s=t.hcl()),"h"===r.substr(0,1)&&(l=(i=a)[0],c=i[1],f=i[2],u=(o=s)[0],d=o[1],p=o[2]),isNaN(l)||isNaN(u)?isNaN(l)?isNaN(u)?m=Number.NaN:(m=u,1!=f&&0!=f||"hsv"==r||(h=d)):(m=l,1!=p&&0!=p||"hsv"==r||(h=c)):m=l+n*(u>l&&u-l>180?u-(l+360):u180?u+360-l:u-l),void 0===h&&(h=c+n*(d-c)),new g([m,h,f+n*(p-f)],r)},gn=function(e,t,n){return mn(e,t,n,"lch")};an.lch=gn,an.hcl=gn;var vn=function(e,t,n){var r=e.num(),i=t.num();return new g(r+n*(i-r),"num")};an.num=vn;var yn=function(e,t,n){return mn(e,t,n,"hcg")};an.hcg=yn;var bn=function(e,t,n){return mn(e,t,n,"hsi")};an.hsi=bn;var wn=function(e,t,n){return mn(e,t,n,"hsl")};an.hsl=wn;var xn=function(e,t,n){return mn(e,t,n,"hsv")};an.hsv=xn;var kn=c.clip_rgb,_n=Math.pow,Sn=Math.sqrt,Cn=Math.PI,jn=Math.cos,En=Math.sin,Tn=Math.atan2,On=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var r=e.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var i=r/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=i})),e=e.map((function(e){return new g(e)})),"lrgb"===t)return Nn(e,n);for(var o=e.shift(),a=o.get(t),s=[],l=0,u=0,c=0;c=360;)h-=360;a[p]=h}else a[p]=a[p]/s[p];return f/=r,new g(a,t).alpha(f>.99999?1:f,!0)},Nn=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new g(kn(r))},Mn=c.type,Ln=Math.pow,An=function(e){var t="rgb",n=y("#ccc"),r=0,i=[0,1],o=[],a=[0,0],s=!1,l=[],u=!1,c=0,d=1,f=!1,p={},h=!0,m=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===Mn(e)&&y.brewer&&y.brewer[e.toLowerCase()]&&(e=y.brewer[e.toLowerCase()]),"array"===Mn(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t=s[n];)n++;return n-1}return 0},b=function(e){return e},w=function(e){return e},x=function(e,r){var i,u;if(null==r&&(r=!1),isNaN(e)||null===e)return n;u=r?e:s&&s.length>2?v(e)/(s.length-2):d!==c?(e-c)/(d-c):1,u=w(u),r||(u=b(u)),1!==m&&(u=Ln(u,m)),u=a[0]+u*(1-a[0]-a[1]),u=Math.min(1,Math.max(0,u));var f=Math.floor(1e4*u);if(h&&p[f])i=p[f];else{if("array"===Mn(l))for(var g=0;g=x&&g===o.length-1){i=l[g];break}if(u>x&&u2){var u=e.map((function(t,n){return n/(e.length-1)})),f=e.map((function(e){return(e-c)/(d-c)}));f.every((function(e,t){return u[t]===e}))||(w=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=f[t+1];)t++;var n=(e-f[t])/(f[t+1]-f[t]);return u[t]+n*(u[t+1]-u[t])})}}return i=[c,d],_},_.mode=function(e){return arguments.length?(t=e,k(),_):t},_.range=function(e,t){return g(e,t),_},_.out=function(e){return u=e,_},_.spread=function(e){return arguments.length?(r=e,_):r},_.correctLightness=function(e){return null==e&&(e=!0),f=e,k(),b=f?function(e){for(var t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(e,!0).lab()[0],o=t+(n-t)*e,a=i-o,s=0,l=1,u=20;Math.abs(a)>.01&&u-- >0;)r&&(a*=-1),a<0?(s=e,e+=.5*(l-e)):(l=e,e+=.5*(s-e)),i=x(e,!0).lab()[0],a=i-o;return e}:function(e){return e},_},_.padding=function(e){return null!=e?("number"===Mn(e)&&(e=[e,e]),a=e,_):a},_.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=l.slice(0);else if(1===t)r=[_(.5)];else if(t>1){var o=i[0],a=i[1]-o;r=Pn(0,t,!1).map((function(e){return _(o+e/(t-1)*a)}))}else{e=[];var u=[];if(s&&s.length>2)for(var c=1,d=s.length,f=1<=d;f?cd;f?c++:c--)u.push(.5*(s[c-1]+s[c]));else u=i;r=u.map((function(e){return _(e)}))}return y[n]&&(r=r.map((function(e){return e[n]()}))),r},_.cache=function(e){return null!=e?(h=e,_):h},_.gamma=function(e){return null!=e?(m=e,_):m},_.nodata=function(e){return null!=e?(n=y(e),_):n},_};function Pn(e,t,n){for(var r=[],i=eo;i?a++:a--)r.push(a);return r}var Rn=function(e){var t,n,r,i,o,a,s;if(2===(e=e.map((function(e){return new g(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],a=t[1],i=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(a[t]-o[t])}));return new g(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),o=n[0],a=n[1],s=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*a[t]+e*e*s[t]}));return new g(t,"lab")};else if(4===e.length){var l;r=e.map((function(e){return e.lab()})),o=r[0],a=r[1],s=r[2],l=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*a[t]+3*(1-e)*e*e*s[t]+e*e*e*l[t]}));return new g(t,"lab")}}else if(5===e.length){var u=Rn(e.slice(0,3)),c=Rn(e.slice(2,5));i=function(e){return e<.5?u(2*e):c(2*(e-.5))}}return i},Dn=function(e){var t=Rn(e);return t.scale=function(){return An(t)},t},In=function(e,t,n){if(!In[n])throw new Error("unknown blend mode "+n);return In[n](e,t)},Fn=function(e){return function(t,n){var r=y(n).rgb(),i=y(t).rgb();return y.rgb(e(r,i))}},qn=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}},zn=function(e){return e},Un=function(e,t){return e*t/255},Wn=function(e,t){return e>t?t:e},Hn=function(e,t){return e>t?e:t},Bn=function(e,t){return 255*(1-(1-e/255)*(1-t/255))},Vn=function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))},$n=function(e,t){return 255*(1-(1-t/255)/(e/255))},Gn=function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e};In.normal=Fn(qn(zn)),In.multiply=Fn(qn(Un)),In.screen=Fn(qn(Bn)),In.overlay=Fn(qn(Vn)),In.darken=Fn(qn(Wn)),In.lighten=Fn(qn(Hn)),In.dodge=Fn(qn(Gn)),In.burn=Fn(qn($n));for(var Yn=In,Kn=c.type,Zn=c.clip_rgb,Xn=c.TWOPI,Jn=Math.pow,Qn=Math.sin,er=Math.cos,tr=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var o,a=0;"array"===Kn(i)?o=i[1]-i[0]:(o=0,i=[i,i]);var s=function(s){var l=Xn*((e+120)/360+t*s),u=Jn(i[0]+o*s,r),c=(0!==a?n[0]+s*a:n)*u*(1-u)/2,d=er(l),f=Qn(l);return y(Zn([255*(u+c*(-.14861*d+1.78277*f)),255*(u+c*(-.29227*d-.90649*f)),255*(u+c*(1.97294*d)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?r:(r=e,s)},s.hue=function(e){return null==e?n:("array"===Kn(n=e)?0==(a=n[1]-n[0])&&(n=n[1]):a=0,s)},s.lightness=function(e){return null==e?i:("array"===Kn(e)?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=function(){return y.scale(s)},s.hue(n),s},nr="0123456789abcdef",rr=Math.floor,ir=Math.random,or=function(){for(var e="#",t=0;t<6;t++)e+=nr.charAt(rr(16*ir()));return new g(e,"hex")},ar=Math.log,sr=Math.pow,lr=Math.floor,ur=Math.abs,cr=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===a(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===a(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,en.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return dr(n,e,t)},n},dr=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==a(e)&&(e=cr(e));var r=e.min,i=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var s=[];if("c"===t.substr(0,1)&&(s.push(r),s.push(i)),"e"===t.substr(0,1)){s.push(r);for(var l=1;l 0");var u=Math.LOG10E*ar(r),c=Math.LOG10E*ar(i);s.push(r);for(var d=1;d200&&(w=!1)}for(var D={},I=0;Ir?(n+.05)/(r+.05):(r+.05)/(n+.05)},hr=Math.sqrt,mr=Math.atan2,gr=Math.abs,vr=Math.cos,yr=Math.PI,br=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1),e=new g(e),t=new g(t);for(var i=Array.from(e.lab()),o=i[0],a=i[1],s=i[2],l=Array.from(t.lab()),u=l[0],c=l[1],d=l[2],f=hr(a*a+s*s),p=hr(c*c+d*d),h=o<16?.511:.040975*o/(1+.01765*o),m=.0638*f/(1+.0131*f)+.638,v=f<1e-6?0:180*mr(s,a)/yr;v<0;)v+=360;for(;v>=360;)v-=360;var y=v>=164&&v<=345?.56+gr(.2*vr(yr*(v+168)/180)):.36+gr(.4*vr(yr*(v+35)/180)),b=f*f*f*f,w=hr(b/(b+1900)),x=m*(w*y+1-w),k=f-p,_=a-c,S=s-d,C=(o-u)/(n*h),j=k/(r*m);return hr(C*C+j*j+(_*_+S*S-k*k)/(x*x))},wr=function(e,t,n){void 0===n&&(n="lab"),e=new g(e),t=new g(t);var r=e.get(n),i=t.get(n),o=0;for(var a in r){var s=(r[a]||0)-(i[a]||0);o+=s*s}return Math.sqrt(o)},xr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(g,[null].concat(e))),!0}catch(e){return!1}},kr={cool:function(){return An([y.hsl(180,1,.9),y.hsl(250,.7,.4)])},hot:function(){return An(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")}},_r={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Sr=0,Cr=Object.keys(_r);Sr{!function(e){"use strict";var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;if.clientHeight+1;if(setTimeout((function(){M=a.getScrollInfo()})),L.bottom-N>0){var P=L.bottom-L.top;if(w.top-(w.bottom-L.top)-P>0)f.style.top=(k=w.top-P-C)+"px",_=!1;else if(P>N){f.style.height=N-5+"px",f.style.top=(k=w.bottom-L.top-C)+"px";var R=a.getCursor();i.from.ch!=R.ch&&(w=a.cursorCoords(R),f.style.left=(x=w.left-S)+"px",L=f.getBoundingClientRect())}}var D,I=L.right-O;if(I>0&&(L.right-L.left>O&&(f.style.width=O-5+"px",I-=L.right-L.left-O),f.style.left=(x=w.left-I-S)+"px"),A)for(var F=f.firstChild;F;F=F.nextSibling)F.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=l(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){D=setTimeout((function(){r.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(D)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect(),n=k+M.top-e.top,i=n-(d.pageYOffset||(c.documentElement||c.body).scrollTop);if(_||(i+=f.offsetHeight),i<=t.top||i>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=x+M.left-e.left+"px"}),e.on(f,"dblclick",(function(e){var t=u(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(f,"click",(function(e){var t=u(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())})),e.on(f,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var q=this.getSelectedHintRange();return 0===q.from&&0===q.to||this.scrollToActive(),e.signal(i,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):o(i+1)}))}o(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(s(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,"")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(4631))},4631:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),u=l&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var k=y&&(u||d&&(null==x||x<12.11)),_=n||a&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C,j=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return E(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(R=function(e){try{e.select()}catch(e){}});var q=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function z(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var G=[""];function Y(e){for(;G.length<=e;)G.push(K(G)+" ");return G[e]}function K(e){return e[e.length-1]}function Z(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ue=null;function ce(e,t,n){var r;ue=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ue=i)}return null!=r?r:ue}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,d=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){ke(e),_e(e)}function je(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Te,Oe,Ne=function(){if(a&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Me(e){if(null==Te){var t=O("span","​");T(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Te?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Le(e){if(null!=Oe)return Oe;var t=T(e,document.createTextNode("AخA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return E(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var Ae,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},De="oncopy"in(Ae=O("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Ie=null;function Fe(e){if(null!=Ie)return Ie;var t=T(e,O("span","x")),n=t.getBoundingClientRect(),r=C(t,0,1).getBoundingClientRect();return Ie=Math.abs(n.left-r.left)>1}var qe={},ze={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),qe[e]=t}function We(e,t){ze[e]=t}function He(e){if("string"==typeof e&&ze.hasOwnProperty(e))e=ze[e];else if(e&&"string"==typeof e.name&&ze.hasOwnProperty(e.name)){var t=ze[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return He("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return He("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=He(t);var n=qe[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(Ve.hasOwnProperty(t.name)){var i=Ve[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ve={};function $e(e,t){I(t,Ve.hasOwnProperty(e)?Ve[e]:Ve[e]={})}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ye(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}var Ze=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?ot(n,Xe(e,n).text.length):pt(t,Xe(e,t.line).text.length)}function pt(e,t){var n=e.ch;return null==n||n>t?ot(e.line,t):n<0?ot(e.line,0):e}function ht(e,t){for(var n=[],r=0;r=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.post},Ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},gt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function vt(e,t,n,r){var i=[e.state.modeGen],o={};jt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,u=0;n.state=!0,jt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ge(e.doc.mode,r.state),o=vt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new gt(r,!0,t);var o=Et(e,t,n),a=o>r.first&&Xe(r,o-1).stateAfter,s=a?gt.fromSaved(r,a,o):new gt(r,Ke(r.mode),o);return r.iter(o,t,(function(n){wt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},gt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gt.fromSaved=function(e,t,n){return t instanceof mt?new gt(e,Ge(e.mode,t.state),n,t.lookAhead):new gt(e,Ge(e.mode,t),n)},gt.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var _t=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function St(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Xe(a,(t=ft(a,t)).line),u=bt(e,t.line,n),c=new Ze(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&wt(e,t,r,d.pos),d.pos=t.length,l=null):l=Ct(kt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;ua;--s){if(s<=o.first)return o.first;var l=Xe(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof mt?u.lookAhead:0)<=o.modeFrontier))return s;var c=F(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function Tt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Xe(e,r).stateAfter;if(i&&(!(i instanceof mt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new At(a,o.from,s?null:o.to))}}return r}function Ft(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;b0)){var c=[l,1],d=at(u.from,s.from),f=at(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}function Wt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||$t(n,o.marker)<0)&&(n=o.marker)}return n}function Xt(e,t,n,r,i){var o=Xe(e,t),a=Nt&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?at(u.to,n)>=0:at(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?at(u.from,r)<=0:at(u.from,r)<0)))return!0}}}function Jt(e){for(var t;t=Yt(e);)e=t.find(-1,!0).line;return e}function Qt(e){for(var t;t=Kt(e);)e=t.find(1,!0).line;return e}function en(e){for(var t,n;t=Kt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function tn(e,t){var n=Xe(e,t),r=Jt(n);return n==r?t:tt(r)}function nn(e,t){if(t>e.lastLine())return t;var n,r=Xe(e,t);if(!rn(e,r))return t;for(;n=Kt(r);)r=n.find(1,!0).line;return tt(r)+1}function rn(e,t){var n=Nt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var un=function(e,t,n){this.text=e,Ht(this,t),this.height=n?n(this):1};function cn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Wt(e),Ht(e,n);var i=r?r(e):1;i!=e.height&&et(e,i)}function dn(e){e.parent=null,Wt(e)}un.prototype.lineNo=function(){return tt(this)},xe(un);var fn={},pn={};function hn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?pn:fn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function mn(e,t){var n=N("span",null,null,l?"padding-right: .1px":null),r={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=vn,Le(e.display.measure)&&(a=fe(o,e.doc.direction))&&(r.addToken=bn(r.addToken,a)),r.map=[],xn(o,r,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=P(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=P(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Me(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=P(r.pre.className,r.textClass||"")),r}function gn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vn(e,t,n,r,i,o,l){if(t){var u,c=e.splitSpaces?yn(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){u=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),m=h?h.index-p:t.length-p;if(m){var g=document.createTextNode(c.slice(p,p+m));a&&s<9?u.appendChild(O("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=u.appendChild(O("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=u.appendChild(O("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?u.appendChild(O("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||f||o||l){var w=n||"";r&&(w+=r),i&&(w+=i);var x=O("span",[u],w,o);if(l)for(var k in l)l.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&x.setAttribute(k,l[k]);return e.content.appendChild(x)}e.content.appendChild(u)}}function yn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&d.from<=u);f++);if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function wn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function xn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=s="",f=null,d=null,v=1/0;for(var y=[],b=void 0,w=0;wh||k.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&v>x.to&&(v=x.to,u=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&x.from==h&&(c+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&((f||(f={})).title=k.title),k.attributes)for(var _ in k.attributes)(f||(f={}))[_]=k.attributes[_];k.collapsed&&(!d||$t(d.marker,k)<0)&&(d=x)}else x.from>h&&v>x.from&&(v=x.from)}if(b)for(var S=0;S=p)break;for(var j=Math.min(p,v);;){if(g){var E=h+g.length;if(!d){var T=E>j?g.slice(0,j-h):g;t.addToken(t,T,a?a+l:l,c,h+T.length==v?u:"",s,f)}if(E>=j){g=g.slice(j-h),h=j;break}h=E,c=""}g=i.slice(o,o=n[m++]),a=hn(n[m++],t.cm.options)}}else for(var O=1;O2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Jn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Qn(e,t){var n=tt(t=Jt(t)),r=e.display.externalMeasured=new kn(e.doc,t,n);r.lineN=n;var i=r.built=mn(e,r);return r.text=i.pre,T(e.display.lineMeasure,i.pre),r}function er(e,t,n,r){return rr(e,nr(e,t),n,r)}function tr(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==l-s)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function lr(e,t,n,r){var i,o=ar(t.map,n,r),l=o.node,u=o.start,c=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;u&&oe(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Nr(e.display),top:h.top,bottom:h.bottom}:or}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=ce(s,l,u),f=ue,p=c(l,d,"before"==u);return null!=f&&(p.other=c(l,f,"before"!=u)),p}function wr(e,t){var n=0;t=ft(e.doc,t),e.options.lineWrapping||(n=Nr(e.display)*t.ch);var r=Xe(e.doc,t.line),i=an(r)+Vn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function xr(e,t,n,r,i){var o=ot(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function kr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return xr(r.first,0,null,-1,-1);var i=nt(r,n),o=r.first+r.size-1;if(i>o)return xr(r.first+r.size-1,Xe(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Xe(r,i);;){var s=jr(e,a,i,t,n),l=Zt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;a=Xe(r,i=u.line)}}function _r(e,t,n,r){r-=mr(t);var i=t.text.length,o=se((function(t){return rr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=se((function(t){return rr(e,n,t).top>r}),o,i)}}function Sr(e,t,n,r){return n||(n=nr(e,t)),_r(e,t,n,gr(e,t,rr(e,n,r),"line").top)}function Cr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function jr(e,t,n,r,i){i-=an(t);var o=nr(e,t),a=mr(t),s=0,l=t.text.length,u=!0,c=fe(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?Tr:Er)(e,t,n,o,c,r,i);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var f,p,h=null,m=null,g=se((function(t){var n=rr(e,o,t);return n.top+=a,n.bottom+=a,!!Cr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=w.bottom?1:0}return xr(n,g=ae(t.text,g,1),p,v,r-f)}function Er(e,t,n,r,i,o,a){var s=se((function(s){var l=i[s],u=1!=l.level;return Cr(br(e,ot(n,u?l.to:l.from,u?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var u=1!=l.level,c=br(e,ot(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Cr(c,o,a,!0)&&c.top>a&&(l=i[s-1])}return l}function Tr(e,t,n,r,i,o,a){var s=_r(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,f=0;f=u||p.to<=l)){var h=rr(e,r,1!=p.level?Math.min(u,p.to)-1:Math.max(l,p.from)).right,m=hm)&&(c=p,d=m)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Or(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ir){ir=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ir.appendChild(document.createTextNode("x")),ir.appendChild(O("br"));ir.appendChild(document.createTextNode("x"))}T(e.measure,ir);var n=ir.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),E(e.measure),n||1}function Nr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Mr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Lr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Lr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ar(e){var t=Or(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Nr(e.display)-3);return function(i){if(rn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Xe(e.doc,u.line).text).length==u.ch){var c=F(l,l.length,e.options.tabSize)-l.length;u=ot(u.line,Math.max(0,Math.round((o-Gn(e.display).left)/Nr(e.display))-c))}return u}function Dr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Nt&&tn(e.doc,t)i.viewFrom?qr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)qr(e);else if(t<=i.viewFrom){var o=zr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):qr(e)}else if(n>=i.viewTo){var a=zr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):qr(e)}else{var s=zr(e,t,t,-1),l=zr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(_n(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):qr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Dr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==z(a,n)&&a.push(n)}}}function qr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function zr(e,t,n,r){var i,o=Dr(e,t),a=e.display.view;if(!Nt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;tn(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Ur(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=_n(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=_n(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Dr(e,n)))),r.viewTo=n}function Wr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval((function(){e.hasFocus()||Jr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Kr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Xr(e))}function Zr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jr(e))}),100)}function Xr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,A(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Yr(e))}function Jr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,j(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(et(i.line,l),ei(i.line),i.rest))for(var p=0;pe.display.sizerWidth){var h=Math.ceil(u/Nr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function ei(e){if(e.widgets)for(var t=0;t=a&&(o=nt(t,an(Xe(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function ni(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Vn(e.display))+"px;\n height: "+(t.bottom-t.top+Yn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ri(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ot(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=br(e,t),l=n&&n!=t?br(e,n):s,u=oi(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(fi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(hi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ii(e,t){var n=oi(e,t);null!=n.scrollTop&&fi(e,n.scrollTop),null!=n.scrollLeft&&hi(e,n.scrollLeft)}function oi(e,t){var n=e.display,r=Or(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Zn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+$n(n),l=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Kn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function ai(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function si(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function li(e,t,n){null==t&&null==n||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function ui(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,di(e,wr(e,t.from),wr(e,t.to),t.margin))}function di(e,t,n,r){var i=oi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});li(e,i.scrollLeft,i.scrollTop)}function fi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Hi(e,{top:t}),pi(e,t,!0),n&&Hi(e),Ri(e,100))}function pi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function hi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Gi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function mi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+$n(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var gi=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};gi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},gi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},gi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},gi.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},gi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},gi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var vi=function(){};function yi(e,t){t||(t=mi(e));var n=e.display.barWidth,r=e.display.barHeight;bi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Qr(e),bi(e,mi(e)),n=e.display.barWidth,r=e.display.barHeight}function bi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}vi.prototype.update=function(){return{bottom:0,right:0}},vi.prototype.setScrollLeft=function(){},vi.prototype.setScrollTop=function(){},vi.prototype.clear=function(){};var wi={native:gi,null:vi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?hi(e,t):fi(e,t)}),e),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)}var ki=0;function _i(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ki},Cn(e.curOp)}function Si(e){var t=e.curOp;t&&En(t,(function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ei(e){e.updatedDisplay=e.mustUpdate&&Ui(e.cm,e.update)}function Ti(e){var t=e.cm,n=t.display;e.updatedDisplay&&Qr(t),e.barMeasure=mi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=er(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Kn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Oi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=bt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Ge(t.mode,r.state):null,l=vt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!d&&fn)return Ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Mi(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Wr(e))return!1;Yi(e)&&(qr(e),t.dims=Mr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Nt&&(o=tn(e.doc,o),a=nn(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ur(e,o,a),n.viewOffset=an(Xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Wr(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=qi(e);return l>4&&(n.lineDiv.style.display="none"),Bi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,zi(u),E(n.cursorDiv),E(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ri(e,400)),n.updateLineNumbers=null,!0}function Wi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Kn(e))r&&(t.visible=ti(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+$n(e.display)-Zn(e),n.top)}),t.visible=ti(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ui(e,t))break;Qr(e);var i=mi(e);Hr(e),yi(e,i),$i(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Hi(e,t){var n=new Ii(e,t);if(Ui(e,n)){Qr(e),Wi(e,n);var r=mi(e);Hr(e),yi(e,r),$i(e,r),n.finish()}}function Bi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d-1&&(p=!1),Mn(e,f,c,n)),p&&(E(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),a=f.node.nextSibling}else{var h=qn(e,f,c,n);o.insertBefore(h,a)}c+=f.size}for(;a;)a=s(a)}function Vi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function $i(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yn(e)+"px"}function Gi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Lr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&l)e:for(var f=t.target,p=a.view;f!=s;f=f.parentNode)for(var h=0;h=0&&at(e,r.to())<=0)return n}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function ao(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=z(t,i);for(var o=1;o0:l>=0){var u=ct(s.from(),a.from()),c=ut(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new oo(d?c:u,d?u:c))}}return new io(t,n)}function so(e,t){return new io([new oo(e,t||e)],0)}function lo(e){return e.text?ot(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function uo(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return lo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=lo(t).ch-t.to.ch),ot(n,r)}function co(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}On(e,"change",e,t)}function yo(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}function jo(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Co(i,i.lastOp==r)))a=K(o.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=lo(t):o.changes.push(_o(e,t));else{var l=K(i.done);for(l&&l.ranges||Oo(e.sel,i.done),o={changes:[_o(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function Eo(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function To(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Eo(e,o,K(i.done),t))?i.done[i.done.length-1]=t:Oo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&So(i.undone)}function Oo(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function No(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Mo(e){if(!e)return null;for(var t,n=0;n-1&&(K(s)[d]=u[d],delete u[d])}}}return r}function Ro(e,t,n,r){if(r){var i=e.anchor;if(n){var o=at(t,i)<0;o!=at(n,i)<0?(i=t,t=n):o!=at(t,n)<0&&(t=n)}return new oo(i,t)}return new oo(n||t,t)}function Do(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Wo(e,new io([Ro(e.sel.primary(),t,n,i)],0),r)}function Io(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(d=Ko(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=at(d,n))&&(r<0?f<0:f>0))return Go(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?u:c)&&(p=Ko(e,p,r,p.line==t.line?o:null)),p?Go(e,p,t,r,i):null}}return t}function Yo(e,t,n,r,i){var o=r||1,a=Go(e,t,n,o,i)||!i&&Go(e,t,n,o,!0)||Go(e,t,n,-o,i)||!i&&Go(e,t,n,-o,!0);return a||(e.cantEdit=!0,ot(e.first,0))}function Ko(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ft(e,ot(t.line-1)):null:n>0&&t.ch==(r||Xe(e,t.line)).text.length?t.line=0;--i)Qo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Qo(e,t)}}function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=co(e,t);jo(e,t,n,e.cm?e.cm.curOp.id:NaN),na(e,t,n,qt(e,t));var r=[];yo(e,(function(e,n){n||-1!=z(r,e.history)||(sa(e.history,t),r.push(e.history)),na(e,t,null,qt(e,t))}))}}function ea(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,u=0;u=0;--p){var h=f(p);if(h)return h.v}}}}function ta(e,t){if(0!=t&&(e.first+=t,e.sel=new io(Z(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Ir(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ot(o,Xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),n||(n=co(e,t)),e.cm?ra(e.cm,t,r):vo(e,t,r),Ho(e,n,H),e.cantEdit&&Yo(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function ra(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=tt(Jt(Xe(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),vo(r,t,n,Ar(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=sn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Tt(r,o.line),Ri(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?Ir(e):o.line!=a.line||1!=t.text.length||go(e.doc,t)?Ir(e,o.line,a.line+1,u):Fr(e,o.line,"text");var c=we(e,"changes"),d=we(e,"change");if(d||c){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&On(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ia(e,t,n,r,i){var o;r||(r=n),at(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:n,to:r,text:t,origin:i})}function oa(e,t,n,r){n1||!(this.children[0]instanceof ua))){var s=[];this.collapse(s),this.children=[new ua(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Xt(e,t.line,t,n,o)||t.line!=n.line&&Xt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lt()}o.addToHistory&&jo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Jt(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&et(e,0),Dt(e,new At(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){rn(e,t)&&et(t,0)})),o.clearOnEnter&&he(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Mt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ha,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Ir(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Fr(u,c,"text");o.atomic&&Vo(u.doc),On(u,"markerAdded",u,o)}return o}ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&_i(e),we(this,"clear")){var n=this.find();n&&On(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Ir(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vo(e.doc)),e&&On(e,"markerCleared",e,this,r,i),t&&Si(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)Jo(this,r[l]);s?Uo(this,s):this.cm&&si(this.cm)})),undo:Pi((function(){ea(this,"undo")})),redo:Pi((function(){ea(this,"redo")})),undoSelection:Pi((function(){ea(this,"undo",!0)})),redoSelection:Pi((function(){ea(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ft(this,e),t=ft(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),ft(this,ot(n,t))},indexFromPos:function(e){var t=(e=ft(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Ho(t.doc,so(n,n)),f)for(var p=0;p=0;t--)ia(e.doc,"",r[t].from,r[t].to,"+delete");si(e)}))}function Ga(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ya(e,t,n){var r=Ga(e,t.ch,n);return null==r?null:new ot(t.line,r,n<0?"after":"before")}function Ka(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=fe(n,t.doc.direction);if(o){var a,s=i<0?K(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=nr(t,n);a=i<0?n.text.length-1:0;var c=rr(t,u,a).top;a=se((function(e){return rr(t,u,e).top==c}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Ga(n,a,1))}else a=i<0?s.to:s.from;return new ot(r,a,l)}}return new ot(r,i<0?n.text.length:0,i<0?"before":"after")}function Za(e,t,n,r){var i=fe(t,e.doc.direction);if(!i)return Ya(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ce(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=c.begin)){var p=d?"before":"after";return new ot(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new ot(n.line,l(e,1),"before"):new ot(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,u(g)))?null:m}Fa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fa.default=y?Fa.macDefault:Fa.pcDefault;var Xa={selectAll:Zo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return $a(e,(function(t){if(t.empty()){var n=Xe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ot(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ot(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Xe(e.doc,i.line-1).text;a&&(i=new ot(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ot(i.line-1,a.length-1),i,"+transpose"))}n.push(new oo(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Mi(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(at((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(at(i.to(),t)>0||t.xRel<0)?ks(e,r,t,o):Ss(e,r,t,o)}function ks(e,t,n,r){var i=e.display,o=!1,u=Li(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Zr(e)),ge(i.wrapper.ownerDocument,"mouseup",u),ge(i.wrapper.ownerDocument,"mousemove",c),ge(i.scroller,"dragstart",d),ge(i.scroller,"drop",u),o||(ke(t),r.addNew||Do(e.doc,n,null,null,r.extend),l&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,he(i.wrapper.ownerDocument,"mouseup",u),he(i.wrapper.ownerDocument,"mousemove",c),he(i.scroller,"dragstart",d),he(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function _s(e,t,n){if("char"==n)return new oo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new oo(ot(t.line,0),ft(e.doc,ot(t.line+1,0)));var r=n(e,t);return new oo(r.from,r.to)}function Ss(e,t,n,r){a&&Zr(e);var i=e.display,o=e.doc;ke(t);var s,l,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?c[l]:new oo(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new oo(n,n)),n=Rr(e,t,!0,!0),l=-1;else{var d=_s(e,n,r.unit);s=r.extend?Ro(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=c.length,Wo(o,ao(e,c.concat([s]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(Wo(o,ao(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Fo(o,l,s,B):(l=0,Wo(o,new io([s],0),B),u=o.sel);var f=n;function p(t){if(0!=at(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,c=F(Xe(o,n.line).text,n.ch,a),d=F(Xe(o,t.line).text,t.ch,a),p=Math.min(c,d),h=Math.max(c,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Xe(o,m).text,y=$(v,p,a);p==h?i.push(new oo(ot(m,y),ot(m,y))):v.length>y&&i.push(new oo(ot(m,y),ot(m,$(v,h,a))))}i.length||i.push(new oo(n,n)),Wo(o,ao(e,u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=s,x=_s(e,t,r.unit),k=w.anchor;at(x.anchor,k)>0?(b=x.head,k=ct(w.from(),x.anchor)):(b=x.anchor,k=ut(w.to(),x.head));var _=u.ranges.slice(0);_[l]=Cs(e,new oo(ft(o,k),b)),Wo(o,ao(e,_,l),B)}}var h=i.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,a=Rr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=at(a,f)){e.curOp.focus=L(),p(a);var s=ti(i,o);(a.line>=s.to||a.lineh.bottom?20:0;l&&setTimeout(Li(e,(function(){m==n&&(i.scroller.scrollTop+=l,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(ke(t),i.input.focus()),ge(i.wrapper.ownerDocument,"mousemove",y),ge(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Li(e,(function(e){0!==e.buttons&&Ee(e)?g(e):v(e)})),b=Li(e,v);e.state.selectingText=b,he(i.wrapper.ownerDocument,"mousemove",y),he(i.wrapper.ownerDocument,"mouseup",b)}function Cs(e,t){var n=t.anchor,r=t.head,i=Xe(e.doc,n.line);if(0==at(n,r)&&n.sticky==r.sticky)return t;var o=fe(i);if(!o)return t;var a=ce(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,r.ch,r.sticky),d=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?d<0:d>0}var f=o[u+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new oo(new ot(n.line,h,m),r)}function js(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ke(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!we(e,n))return Se(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return ve(e,n,e,nt(e.doc,o),e.display.gutterSpecs[l].className,t),Se(t)}}function Es(e,t){return js(e,t,"gutterClick",!0)}function Ts(e,t){Bn(e.display,t)||Os(e,t)||ye(e,t,"contextmenu")||_||e.display.input.onContextMenu(t)}function Os(e,t){return!!we(e,"gutterContextMenu")&&js(e,t,"gutterContextMenu",!1)}function Ns(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),fr(e)}gs.prototype.compare=function(e,t,n){return this.time+ms>e&&0==at(t,this.pos)&&n==this.button};var Ms={toString:function(){return"CodeMirror.Init"}},Ls={},As={};function Ps(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ms&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ms,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,ho(e)}),!0),n("indentUnit",2,ho,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){mo(e),fr(e),Ir(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ot(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ia(e.doc,t,n[i],ot(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ms&&e.refresh()})),n("specialCharPlaceholder",gn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ns(e),Xi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Va(t),i=n!=Ms&&Va(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ds,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Ki(t,e.options.lineNumbers),Xi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Lr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),n("scrollbarStyle","native",(function(e){xi(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Ki(e.options.gutters,t),Xi(e)}),!0),n("firstLineNumber",1,Xi,!0),n("lineNumberFormatter",(function(e){return e}),Xi,!0),n("showCursorWhenSelecting",!1,Hr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Jr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Rs),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Hr,!0),n("singleCursorHeightPerLine",!0,Hr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,mo,!0),n("addModeClass",!1,mo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,mo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Rs(e,t,n){if(!t!=!(n&&n!=Ms)){var r=e.display.dragFunctions,i=t?he:ge;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Ds(e){e.options.lineWrapping?(A(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(j(e.display.wrapper,"CodeMirror-wrap"),ln(e)),Pr(e),Ir(e),fr(e),setTimeout((function(){return yi(e)}),100)}function Is(e,t){var n=this;if(!(this instanceof Is))return new Is(e,t);this.options=t=t?I(t):{},I(Ls,t,!1);var r=t.value;"string"==typeof r?r=new _a(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Is.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Ns(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new q,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Fs(this),Ma(),_i(this),this.curOp.forceUpdate=!0,bo(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Xr(n)}),20):Jr(this),As)As.hasOwnProperty(u)&&As[u](this,t[u],Ms);Yi(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}he(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Es(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Bn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new oo(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new oo(ot(a.line,0),ft(e.doc,ot(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ke(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(fi(e,t.scroller.scrollTop),hi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return ro(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return ro(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Ce(t)},over:function(t){ye(e,t)||(Ea(e,t),Ce(t))},start:function(t){return ja(e,t)},drop:Li(e,Ca),leave:function(t){ye(e,t)||Ta(e)}};var u=t.input.getField();he(u,"keyup",(function(t){return ds.call(e,t)})),he(u,"keydown",Li(e,us)),he(u,"keypress",Li(e,fs)),he(u,"focus",(function(t){return Xr(e,t)})),he(u,"blur",(function(t){return Jr(e,t)}))}Is.defaults=Ls,Is.optionHandlers=As;var qs=[];function zs(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=bt(e,t).state:n="prev");var a=e.options.tabSize,s=Xe(o,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==W||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?F(Xe(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)f+=a,d+="\t";if(fa,l=Pe(t),u=null;if(s&&r.ranges.length>1)if(Us&&Us.text.join("\n")==t){if(r.ranges.length%Us.text.length==0){u=[];for(var c=0;c=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=ot(h.line,h.ch-n):e.state.overwrite&&!s?m=ot(m.line,Math.min(Xe(o,m.line).text.length,m.ch+K(l).length)):s&&Us&&Us.lineWise&&Us.text.join("\n")==l.join("\n")&&(h=m=ot(h.line,0)));var g={from:h,to:m,text:u?u[f%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Jo(e.doc,g),On(e,"inputRead",e,g)}t&&!s&&Vs(e,t),si(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Bs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Mi(t,(function(){return Hs(t,n,0,null,"paste")})),!0}function Vs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=zs(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=zs(e,i.head.line,"smart"));a&&On(e,"electricInput",e,i.head.line)}}}function $s(e){for(var t=[],n=[],r=0;rn&&(zs(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&si(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Fo(this.doc,r,new oo(o,u[r].to()),H)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=ft(this.doc,e);var t,n=yt(this,Xe(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Xe(this.doc,e)}else r=e;return gr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-an(r):0)},defaultTextHeight:function(){return Or(this.display)},defaultCharWidth:function(){return Nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=br(this,ft(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&ii(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ai(us),triggerOnKeyPress:Ai(fs),triggerOnKeyUp:ds,triggerOnMouseDown:Ai(ys),execCommand:function(e){if(Xa.hasOwnProperty(e))return Xa[e].call(null,this)},triggerElectric:Ai((function(e){Vs(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=ft(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&Pr(this),ve(this,"refresh",this)})),swapDoc:Ai((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),fr(this),this.display.input.reset(),li(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,On(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Zs(e,t,n,r,i){var o=t,a=n,s=Xe(e,t.line),l=i&&"rtl"==e.direction?-n:n;function u(){var n=t.line+l;return!(n=e.first+e.size)&&(t=new ot(n,t.ch,t.sticky),s=Xe(e,n))}function c(o){var a;if("codepoint"==r){var c=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))a=null;else{var d=n>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new ot(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=i?Za(e.cm,s,t,n):Ya(s,t,n);if(null==a){if(o||!u())return!1;t=Ka(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var m=s.text.charAt(t.ch)||"\n",g=ne(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||g||(g="s"),d&&d!=g){n<0&&(n=1,c(),t.sticky="after");break}if(g&&(d=g),n>0&&!c(!h))break}var v=Yo(e,t,o,a,!0);return st(o,v)&&(v.hitSide=!0),v}function Xs(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*Or(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=kr(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Js=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Qs(e,t){var n=tr(e,t.line);if(!n||n.hidden)return null;var r=Xe(e.doc,t.line),i=Jn(n,r,t.line),o=fe(r,e.doc.direction),a="left";o&&(a=ce(o,t.ch)%2?"right":"left");var s=ar(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function el(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function tl(e,t){return t&&(e.bad=!0),e}function nl(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function u(e){return function(t){return t.id==e}}function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function d(e){e&&(c(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(ot(r,0),ot(i+1,0),u(+p));return void(h.length&&(o=h[0].find(0))&&d(Je(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var g=0;g=t.display.viewTo||o.line=t.display.viewFrom&&Qs(t,i)||{node:l[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=ot(a.line-1,Xe(r.doc,a.line-1).length)),s.ch==Xe(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Dr(r,a.line))?(t=tt(i.view[0].line),n=i.view[0].node):(t=tt(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=Dr(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=tt(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(nl(r,n,u,t,l)),f=Je(r.doc,ot(t,0),ot(l,Xe(r.doc,l).text.length));d.length>1&&f.length>1;)if(K(d)==K(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=ot(t,p),k=ot(l,f.length?K(f).length-h:0);return d.length>1||d[0]||at(x,k)?(ia(r.doc,d,x,k,"+input"),!0):void 0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Js.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Mi(this.cm,(function(){return Ir(e.cm)}))},Js.prototype.setUneditable=function(e){e.contentEditable="false"},Js.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Li(this.cm,Hs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Js.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;var ol=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};function al(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=L();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Is((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function sl(e){e.off=ge,e.on=he,e.wheelEventPixels=no,e.Doc=_a,e.splitLines=Pe,e.countColumn=F,e.findColumn=$,e.isWordChar=te,e.Pass=W,e.signal=ve,e.Line=un,e.changeEnd=lo,e.scrollbarModel=wi,e.Pos=ot,e.cmpPos=at,e.modes=qe,e.mimeModes=ze,e.resolveMode=He,e.getMode=Be,e.modeExtensions=Ve,e.extendMode=$e,e.copyState=Ge,e.startState=Ke,e.innerMode=Ye,e.commands=Xa,e.keyMap=Fa,e.keyName=Ba,e.isModifierKey=Wa,e.lookupKey=Ua,e.normalizeKeyMap=za,e.StringStream=Ze,e.SharedTextMarker=va,e.TextMarker=ma,e.LineWidget=da,e.e_preventDefault=ke,e.e_stopPropagation=_e,e.e_stop=Ce,e.addClass=A,e.contains=M,e.rmClass=j,e.keyNames=Pa}ol.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(r,e)){if(r.somethingSelected())Ws({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=$s(r);Ws({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),R(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){ye(r,e)||Bs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",o),he(i,"copy",o),he(e.scroller,"paste",(function(t){if(!Bn(e,t)&&!ye(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),he(e.lineSpace,"selectstart",(function(t){Bn(e,t)||ke(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ol.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},ol.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ol.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Br(e);if(e.options.moveInputWithCursor){var i=br(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},ol.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ol.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&R(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},ol.prototype.getField=function(){return this.textarea},ol.prototype.supportsTouch=function(){return!1},ol.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},ol.prototype.blur=function(){this.textarea.blur()},ol.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ol.prototype.receivedFocus=function(){this.slowPoll()},ol.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ol.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ol.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ol.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ol.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ol.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Rr(n,e),u=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Li(n,Wo)(n.doc,so(o),H);var c,f=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=window.scrollY),r.input.focus(),l&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),_){Ce(e);var m=function(){ge(window,"mouseup",m),setTimeout(v,20)};he(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Li(n,Zo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},ol.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ol.prototype.setUneditable=function(){},ol.prototype.needsContentAttribute=!1,Ps(Is),Ks(Is);var ll="iter insert remove copy getEditor constructor".split(" ");for(var ul in _a.prototype)_a.prototype.hasOwnProperty(ul)&&z(ll,ul)<0&&(Is.prototype[ul]=function(e){return function(){return e.apply(this.doc,arguments)}}(_a.prototype[ul]));return xe(_a),Is.inputStyles={textarea:ol,contenteditable:Js},Is.defineMode=function(e){Is.defaults.mode||"null"==e||(Is.defaults.mode=e),Ue.apply(this,arguments)},Is.defineMIME=We,Is.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Is.defineMIME("text/plain","null"),Is.defineExtension=function(e,t){Is.prototype[e]=t},Is.defineDocExtension=function(e,t){_a.prototype[e]=t},Is.fromTextArea=al,sl(Is),Is.version="5.59.4",Is}()},9589:(e,t,n)=>{!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},u=i.htmlMode?t:n;for(var c in u)l[c]=u[c];for(var c in i)l[c]=i[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=d,t.state=b,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return"string"};return t.isInAttribute=!0,t}function h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function g(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;v(e)}}function b(e,t,n){return"openTag"==e?(n.tagStart=t.column(),w):"closeTag"==e?x:b}function w(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",S):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,n)):(a="error",w)}function x(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&v(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",k):(a="tag error",_)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",k(e,t,n)):(a="error",_)}function k(e,t,n){return"endTag"!=e?(a="error",k):(v(n),b)}function _(e,t,n){return a="error",k(e,t,n)}function S(e,t,n){if("word"==e)return a="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?y(n,r):(y(n,r),n.context=new g(n,r,i==n.indented)),b}return a="error",S}function C(e,t,n){return"equals"==e?j:(l.allowMissing||(a="error"),S(e,t,n))}function j(e,t,n){return"string"==e?E:"word"==e&&l.allowUnquoted?(a="string",S):(a="error",S(e,t,n))}function E(e,t,n){return"string"==e?E:S(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==j&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(4631))},8679:(e,t,n)=>{"use strict";var r=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},8276:(e,t,n)=>{var r="html",i="head",o="body",a=/<([a-zA-Z]+[0-9]?)/,s=//i,l=//i,u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var d=new window.DOMParser;u=c=function(e,t){return t&&(e="<"+t+">"+e+""),d.parseFromString(e,"text/html")}}if(document.implementation){var f=n(1507).isIE,p=document.implementation.createHTMLDocument(f()?"html-dom-parser":void 0);u=function(e,t){return t?(p.documentElement.getElementsByTagName(t)[0].innerHTML=e,p):(p.documentElement.innerHTML=e,p)}}var h,m=document.createElement("template");m.content&&(h=function(e){return m.innerHTML=e,m.content.childNodes}),e.exports=function(e){var t,n,d,f,p=e.match(a);switch(p&&p[1]&&(t=p[1].toLowerCase()),t){case r:return n=c(e),s.test(e)||(d=n.getElementsByTagName(i)[0])&&d.parentNode.removeChild(d),l.test(e)||(d=n.getElementsByTagName(o)[0])&&d.parentNode.removeChild(d),n.getElementsByTagName(r);case i:case o:return f=u(e).getElementsByTagName(t),l.test(e)&&s.test(e)?f[0].parentNode.childNodes:f;default:return h?h(e):u(e,o).getElementsByTagName(o)[0].childNodes}}},4152:(e,t,n)=>{var r=n(8276),i=n(1507).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(o);return n&&n[1]&&(t=n[1]),i(r(e),null,t)}},1507:(e,t,n)=>{for(var r,i=n(885),o=n(1642),a=i.CASE_SENSITIVE_TAG_NAMES,s=o.Comment,l=o.Element,u=o.ProcessingInstruction,c=o.Text,d={},f=0,p=a.length;f0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=d;var f=function(e){function t(t){return e.call(this,"root",t)||this}return r(t,e),t}(d);t.Document=f;var p=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,"script"===t?"script":"style"===t?"style":"tag",r)||this;return i.name=t,i.attribs=n,i.attribs=n,i}return r(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function h(e,t){var n;switch(void 0===t&&(t=!1),e.type){case"text":n=new l(e.data);break;case"directive":var r=e;n=new c(r.name,r.data),null!=r["x-name"]&&(n["x-name"]=r["x-name"],n["x-publicId"]=r["x-publicId"],n["x-systemId"]=r["x-systemId"]);break;case"comment":n=new u(e.data);break;case"tag":case"script":case"style":var o=e,a=t?m(o.children):[],s=new p(o.name,i({},o.attribs),a);a.forEach((function(e){return e.parent=s})),o["x-attribsNamespace"]&&(s["x-attribsNamespace"]=i({},o["x-attribsNamespace"])),o["x-attribsPrefix"]&&(s["x-attribsPrefix"]=i({},o["x-attribsPrefix"])),n=s;break;case"cdata":a=t?m(e.children):[];var h=new d(e.type,a);a.forEach((function(e){return e.parent=h})),n=h;break;case"root":var g=e,v=(a=t?m(g.children):[],new f(a));a.forEach((function(e){return e.parent=v})),g["x-mode"]&&(v["x-mode"]=g["x-mode"]),n=v;break;case"doctype":throw new Error("Not implemented yet: ElementType.Doctype case")}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,n}function m(e){for(var t=e.map((function(e){return h(e,!0)})),n=1;n{var r=n(3670),i=n(484),o=n(4152),a={lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(o(e,(t=t||{}).htmlparser2||a),t)}s.domToReact=r,s.htmlToDOM=o,s.attributesToProps=i,e.exports=s,e.exports.default=s},484:(e,t,n)=>{var r=n(2686),i=n(4606),o=i.setStyleProp,a=r.html,s=r.svg,l=r.isCustomAttribute,u=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n,r,c;e=e||{};var d={};for(t in e)r=e[t],l(t)?d[t]=r:(n=t.toLowerCase(),u.call(a,n)?d[(c=a[n]).propertyName]=!!(c.hasBooleanValue||c.hasOverloadedBooleanValue&&!r)||r:u.call(s,t)?d[(c=s[t]).propertyName]=r:i.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=r));return o(e.style,d),d}},3670:(e,t,n)=>{var r=n(7294),i=n(484),o=n(4606),a=o.setStyleProp;function s(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var o,l,u,c,d=(n=n||{}).library||r,f=d.cloneElement,p=d.createElement,h=d.isValidElement,m=[],g="function"==typeof n.replace,v=n.trim,y=0,b=t.length;y1&&(l=f(l,{key:l.key||y})),m.push(l);else if("text"!==o.type){switch(u=o.attribs,s(o)?a(u.style,u):u&&(u=i(u)),c=null,o.type){case"script":case"style":o.children[0]&&(u.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?u.defaultValue=o.children[0].data:o.children&&o.children.length&&(c=e(o.children,n));break;default:continue}b>1&&(u.key=y),m.push(p(o.name,u,c))}else v?o.data.trim()&&m.push(o.data):m.push(o.data);return 1===m.length?m[0]:m}},4606:(e,t,n)=>{var r=n(7294),i=n(1476).default;var o={reactCompat:!0};var a=r.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,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}},setStyleProp:function(e,t){null!=e&&(t.style=i(e,o))}}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u="";function c(e){return e?e.replace(l,u):u}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=l.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(l.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=f,n.source=e,!l.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function k(){var e=h(),n=y(i);if(n){if(x(),!y(o))return v("property missing ':'");var r=y(a),l=e({type:"declaration",property:c(n[0].replace(t,u)),value:r?c(r[0].replace(t,u)):u});return y(s),l}}return b(),function(){var e,t=[];for(w(t);e=k();)!1!==e&&(t.push(e),w(t));return t}()}},6486:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=16,u=32,c=64,d=128,f=256,p=1/0,h=9007199254740991,m=NaN,g=4294967295,v=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",u],["partialRight",c],["rearg",f]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",x="[object Date]",k="[object Error]",_="[object Function]",S="[object GeneratorFunction]",C="[object Map]",j="[object Number]",E="[object Object]",T="[object Promise]",O="[object RegExp]",N="[object Set]",M="[object String]",L="[object Symbol]",A="[object WeakMap]",P="[object ArrayBuffer]",R="[object DataView]",D="[object Float32Array]",I="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",z="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",H="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Z=RegExp(Y.source),X=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ke=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ce="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",je="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Ne="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="['’]",Le="["+Se+"]",Ae="["+Ne+"]",Pe="["+Ce+"]",Re="\\d+",De="["+je+"]",Ie="["+Ee+"]",Fe="[^"+Se+Ne+Re+je+Ee+Te+"]",qe="\\ud83c[\\udffb-\\udfff]",ze="[^"+Se+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Te+"]",Be="\\u200d",Ve="(?:"+Ie+"|"+Fe+")",$e="(?:"+He+"|"+Fe+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",Ye="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Pe+"|"+qe+")"+"?",Ze="["+Oe+"]?",Xe=Ze+Ke+("(?:"+Be+"(?:"+[ze,Ue,We].join("|")+")"+Ze+Ke+")*"),Je="(?:"+[De,Ue,We].join("|")+")"+Xe,Qe="(?:"+[ze+Pe+"?",Pe,Ue,We,Le].join("|")+")",et=RegExp(Me,"g"),tt=RegExp(Pe,"g"),nt=RegExp(qe+"(?="+qe+")|"+Qe+Xe,"g"),rt=RegExp([He+"?"+Ie+"+"+Ge+"(?="+[Ae,He,"$"].join("|")+")",$e+"+"+Ye+"(?="+[Ae,He+Ve,"$"].join("|")+")",He+"?"+Ve+"+"+Ge,He+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Je].join("|"),"g"),it=RegExp("["+Be+Se+Ce+Oe+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,lt={};lt[D]=lt[I]=lt[F]=lt[q]=lt[z]=lt[U]=lt[W]=lt[H]=lt[B]=!0,lt[y]=lt[b]=lt[P]=lt[w]=lt[R]=lt[x]=lt[k]=lt[_]=lt[C]=lt[j]=lt[E]=lt[O]=lt[N]=lt[M]=lt[A]=!1;var ut={};ut[y]=ut[b]=ut[P]=ut[R]=ut[w]=ut[x]=ut[D]=ut[I]=ut[F]=ut[q]=ut[z]=ut[C]=ut[j]=ut[E]=ut[O]=ut[N]=ut[M]=ut[L]=ut[U]=ut[W]=ut[H]=ut[B]=!0,ut[k]=ut[_]=ut[A]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,pt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ht="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||ht||Function("return this")(),gt=t&&!t.nodeType&&t,vt=gt&&e&&!e.nodeType&&e,yt=vt&&vt.exports===gt,bt=yt&&pt.process,wt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(e){}}(),xt=wt&&wt.isArrayBuffer,kt=wt&&wt.isDate,_t=wt&&wt.isMap,St=wt&&wt.isRegExp,Ct=wt&&wt.isSet,jt=wt&&wt.isTypedArray;function Et(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Pt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function rn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}var on=Yt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),an=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+ct[e]}function ln(e){return it.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var yn=function e(t){var n,r=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,at))).Array,se=t.Date,Se=t.Error,Ce=t.Function,je=t.Math,Ee=t.Object,Te=t.RegExp,Oe=t.String,Ne=t.TypeError,Me=r.prototype,Le=Ce.prototype,Ae=Ee.prototype,Pe=t["__core-js_shared__"],Re=Le.toString,De=Ae.hasOwnProperty,Ie=0,Fe=(n=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",qe=Ae.toString,ze=Re.call(Ee),Ue=mt._,We=Te("^"+Re.call(De).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=yt?t.Buffer:i,Be=t.Symbol,Ve=t.Uint8Array,$e=He?He.allocUnsafe:i,Ge=cn(Ee.getPrototypeOf,Ee),Ye=Ee.create,Ke=Ae.propertyIsEnumerable,Ze=Me.splice,Xe=Be?Be.isConcatSpreadable:i,Je=Be?Be.iterator:i,Qe=Be?Be.toStringTag:i,nt=function(){try{var e=po(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ct=se&&se.now!==mt.Date.now&&se.now,pt=t.setTimeout!==mt.setTimeout&&t.setTimeout,ht=je.ceil,gt=je.floor,vt=Ee.getOwnPropertySymbols,bt=He?He.isBuffer:i,wt=t.isFinite,zt=Me.join,Yt=cn(Ee.keys,Ee),bn=je.max,wn=je.min,xn=se.now,kn=t.parseInt,_n=je.random,Sn=Me.reverse,Cn=po(t,"DataView"),jn=po(t,"Map"),En=po(t,"Promise"),Tn=po(t,"Set"),On=po(t,"WeakMap"),Nn=po(Ee,"create"),Mn=On&&new On,Ln={},An=qo(Cn),Pn=qo(jn),Rn=qo(En),Dn=qo(Tn),In=qo(On),Fn=Be?Be.prototype:i,qn=Fn?Fn.valueOf:i,zn=Fn?Fn.toString:i;function Un(e){if(ns(e)&&!Va(e)&&!(e instanceof Vn)){if(e instanceof Bn)return e;if(De.call(e,"__wrapped__"))return zo(e)}return new Bn(e)}var Wn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Hn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ur(e,t,n,r,o,a){var s,l=1&t,u=2&t,c=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!ts(e))return e;var d=Va(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ni(e,s)}else{var f=go(e),p=f==_||f==S;if(Ka(e))return Si(e,l);if(f==E||f==y||p&&!o){if(s=u||p?{}:yo(e),!l)return u?function(e,t){return Mi(e,mo(e),t)}(e,function(e,t){return e&&Mi(t,As(t),e)}(s,e)):function(e,t){return Mi(e,ho(e),t)}(e,or(s,e))}else{if(!ut[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case P:return Ci(e);case w:case x:return new r(+e);case R:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case I:case F:case q:case z:case U:case W:case H:case B:return ji(e,n);case C:return new r;case j:case M:return new r(e);case O:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case N:return new r;case L:return i=e,qn?Ee(qn.call(i)):{}}var i}(e,f,l)}}a||(a=new Zn);var h=a.get(e);if(h)return h;a.set(e,s),ss(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,a))}));var m=d?i:(c?u?oo:io:u?As:Ls)(e);return Ot(m||e,(function(r,i){m&&(r=e[i=r]),nr(s,i,ur(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ee(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Ne(o);return Lo((function(){e.apply(i,n)}),t)}function fr(e,t,n,r){var i=-1,o=At,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Rt(t,Qt(n))),r?(o=Pt,a=!1):t.length>=200&&(o=tn,a=!1,t=new Kn(t));e:for(;++i-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(jn||Gn),string:new $n}},Yn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return co(this,e).get(e)},Yn.prototype.has=function(e){return co(this,e).has(e)},Yn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,a),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!jn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(e,t),this.size=n.size,this};var pr=Pi(xr),hr=Pi(kr,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(e,t,n){for(var r=-1,o=e.length;++r0&&n(s)?t>1?yr(s,t-1,n,r,i):Dt(i,s):r||(i[i.length]=s)}return i}var br=Ri(),wr=Ri(!0);function xr(e,t){return e&&br(e,t,Ls)}function kr(e,t){return e&&wr(e,t,Ls)}function _r(e,t){return Lt(t,(function(t){return Ja(e[t])}))}function Sr(e,t){for(var n=0,r=(t=wi(t,e)).length;null!=e&&nt}function Tr(e,t){return null!=e&&De.call(e,t)}function Or(e,t){return null!=e&&t in Ee(e)}function Nr(e,t,n){for(var o=n?Pt:At,a=e[0].length,s=e.length,l=s,u=r(s),c=1/0,d=[];l--;){var f=e[l];l&&t&&(f=Rt(f,Qt(t))),c=wn(f.length,c),u[l]=!n&&(t||a>=120&&f.length>=120)?new Kn(l&&f):i}f=e[0];var p=-1,h=u[0];e:for(;++p=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function $r(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Ze.call(s,l,1),Ze.call(e,l,1);return e}function Yr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;wo(i)?Ze.call(e,i,1):fi(e,i)}}return e}function Kr(e,t){return e+gt(_n()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Ao(To(e,t,il),e+"")}function Jr(e){return Jn(Us(e))}function Qr(e,t){var n=Us(e);return Do(n,lr(t,0,n.length))}function ei(e,t,n,r){if(!ts(e))return e;for(var o=-1,a=(t=wi(t,e)).length,s=a-1,l=e;null!=l&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a=200){var u=t?null:Zi(e);if(u)return fn(u);a=!1,i=tn,l=new Kn}else l=t?[]:s;e:for(;++r=r?e:ii(e,t,n)}var _i=it||function(e){return mt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=$e?$e(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function ji(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=us(e),s=t!==i,l=null===t,u=t==t,c=us(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||r&&s&&u||!n&&u||!o)return 1;if(!r&&!a&&!c&&e1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&xo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ee(t);++r-1?o[a?t[s]:s]:i}}function zi(e){return ro((function(t){var n=t.length,r=n,a=Bn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ne(o);if(a&&!l&&"wrapper"==so(s))var l=new Bn([],!0)}for(r=l?r:n;++r1&&w.reverse(),p&&cl))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,h=2&n?new Kn:i;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(v,(function(n){var r="_."+n[0];t&n[1]&&!At(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Ro(e){var t=0,n=0;return function(){var r=xn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,aa(e,n)}));function pa(e){var t=Un(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=ro((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&wo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var ga=Li((function(e,t,n){De.call(e,n)?++e[n]:ar(e,n,1)}));var va=qi(Bo),ya=qi(Vo);function ba(e,t){return(Va(e)?Ot:pr)(e,uo(t,3))}function wa(e,t){return(Va(e)?Nt:hr)(e,uo(t,3))}var xa=Li((function(e,t,n){De.call(e,n)?e[n].push(t):ar(e,n,[t])}));var ka=Xr((function(e,t,n){var i=-1,o="function"==typeof t,a=Ga(e)?r(e.length):[];return pr(e,(function(e){a[++i]=o?Et(t,e,n):Mr(e,t,n)})),a})),_a=Li((function(e,t,n){ar(e,n,t)}));function Sa(e,t){return(Va(e)?Rt:zr)(e,uo(t,3))}var Ca=Li((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ja=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&xo(e,t[0],t[1])?t=[]:n>2&&xo(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,yr(t,1),[])})),Ea=ct||function(){return mt.Date.now()};function Ta(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ji(e,d,i,i,i,i,t)}function Oa(e,t){var n;if("function"!=typeof t)throw new Ne(o);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Na=Xr((function(e,t,n){var r=1;if(n.length){var i=dn(n,lo(Na));r|=u}return Ji(e,r,t,n,i)})),Ma=Xr((function(e,t,n){var r=3;if(n.length){var i=dn(n,lo(Ma));r|=u}return Ji(t,r,e,n,i)}));function La(e,t,n){var r,a,s,l,u,c,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Ne(o);function m(t){var n=r,o=a;return r=a=i,d=t,l=e.apply(o,n)}function g(e){var n=e-c;return c===i||n>=t||n<0||p&&e-d>=s}function v(){var e=Ea();if(g(e))return y(e);u=Lo(v,function(e){var n=t-(e-c);return p?wn(n,s-(e-d)):n}(e))}function y(e){return u=i,h&&r?m(e):(r=a=i,l)}function b(){var e=Ea(),n=g(e);if(r=arguments,a=this,c=e,n){if(u===i)return function(e){return d=e,u=Lo(v,t),f?m(e):l}(c);if(p)return _i(u),u=Lo(v,t),m(c)}return u===i&&(u=Lo(v,t)),l}return t=vs(t)||0,ts(n)&&(f=!!n.leading,s=(p="maxWait"in n)?bn(vs(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),b.cancel=function(){u!==i&&_i(u),d=0,r=c=a=u=i},b.flush=function(){return u===i?l:y(Ea())},b}var Aa=Xr((function(e,t){return dr(e,1,t)})),Pa=Xr((function(e,t,n){return dr(e,vs(t)||0,n)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ra.Cache||Yn),n}function Da(e){if("function"!=typeof e)throw new Ne(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Yn;var Ia=xi((function(e,t){var n=(t=1==t.length&&Va(t[0])?Rt(t[0],Qt(uo())):Rt(yr(t,1),Qt(uo()))).length;return Xr((function(r){for(var i=-1,o=wn(r.length,n);++i=t})),Ba=Lr(function(){return arguments}())?Lr:function(e){return ns(e)&&De.call(e,"callee")&&!Ke.call(e,"callee")},Va=r.isArray,$a=xt?Qt(xt):function(e){return ns(e)&&jr(e)==P};function Ga(e){return null!=e&&es(e.length)&&!Ja(e)}function Ya(e){return ns(e)&&Ga(e)}var Ka=bt||vl,Za=kt?Qt(kt):function(e){return ns(e)&&jr(e)==x};function Xa(e){if(!ns(e))return!1;var t=jr(e);return t==k||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Ja(e){if(!ts(e))return!1;var t=jr(e);return t==_||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==ms(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=_t?Qt(_t):function(e){return ns(e)&&go(e)==C};function is(e){return"number"==typeof e||ns(e)&&jr(e)==j}function os(e){if(!ns(e)||jr(e)!=E)return!1;var t=Ge(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==ze}var as=St?Qt(St):function(e){return ns(e)&&jr(e)==O};var ss=Ct?Qt(Ct):function(e){return ns(e)&&go(e)==N};function ls(e){return"string"==typeof e||!Va(e)&&ns(e)&&jr(e)==M}function us(e){return"symbol"==typeof e||ns(e)&&jr(e)==L}var cs=jt?Qt(jt):function(e){return ns(e)&&es(e.length)&&!!lt[jr(e)]};var ds=Gi(qr),fs=Gi((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(Ga(e))return ls(e)?mn(e):Ni(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=go(e);return(t==C?un:t==N?fn:Us)(e)}function hs(e){return e?(e=vs(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?lr(ms(e),0,g):0}function vs(e){if("number"==typeof e)return e;if(us(e))return m;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ve.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):ge.test(e)?m:+e}function ys(e){return Mi(e,As(e))}function bs(e){return null==e?"":ci(e)}var ws=Ai((function(e,t){if(Co(t)||Ga(t))Mi(t,Ls(t),e);else for(var n in t)De.call(t,n)&&nr(e,n,t[n])})),xs=Ai((function(e,t){Mi(t,As(t),e)})),ks=Ai((function(e,t,n,r){Mi(t,As(t),e,r)})),_s=Ai((function(e,t,n,r){Mi(t,Ls(t),e,r)})),Ss=ro(sr);var Cs=Xr((function(e,t){e=Ee(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&xo(t[0],t[1],o)&&(r=1);++n1),t})),Mi(e,oo(e),n),r&&(n=ur(n,7,to));for(var i=t.length;i--;)fi(n,t[i]);return n}));var Is=ro((function(e,t){return null==e?{}:function(e,t){return $r(e,t,(function(t,n){return Ts(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Rt(oo(e),(function(e){return[e]}));return t=uo(t),$r(e,n,(function(e,n){return t(e,n[0])}))}var qs=Xi(Ls),zs=Xi(As);function Us(e){return null==e?[]:en(e,Ls(e))}var Ws=Ii((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Xs(bs(e).toLowerCase())}function Bs(e){return(e=bs(e))&&e.replace(xe,on).replace(tt,"")}var Vs=Ii((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$s=Ii((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Di("toLowerCase");var Ys=Ii((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ks=Ii((function(e,t,n){return e+(n?" ":"")+Xs(t)}));var Zs=Ii((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=Di("toUpperCase");function Js(e,t,n){return e=bs(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Qs=Xr((function(e,t){try{return Et(e,i,t)}catch(e){return Xa(e)?e:new Se(e)}})),el=ro((function(e,t){return Ot(t,(function(t){t=Fo(t),ar(e,t,Na(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=zi(),rl=zi(!0);function il(e){return e}function ol(e){return Dr("function"==typeof e?e:ur(e,1))}var al=Xr((function(e,t){return function(n){return Mr(n,e,t)}})),sl=Xr((function(e,t){return function(n){return Mr(e,n,t)}}));function ll(e,t,n){var r=Ls(t),i=_r(t,r);null!=n||ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=_r(t,Ls(t)));var o=!(ts(n)&&"chain"in n&&!n.chain),a=Ja(e);return Ot(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ni(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function ul(){}var cl=Bi(Rt),dl=Bi(Mt),fl=Bi(qt);function pl(e){return ko(e)?Gt(Fo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var hl=$i(),ml=$i(!0);function gl(){return[]}function vl(){return!1}var yl=Hi((function(e,t){return e+t}),0),bl=Ki("ceil"),wl=Hi((function(e,t){return e/t}),1),xl=Ki("floor");var kl,_l=Hi((function(e,t){return e*t}),1),Sl=Ki("round"),Cl=Hi((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Ne(o);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Ta,Un.assign=ws,Un.assignIn=xs,Un.assignInWith=ks,Un.assignWith=_s,Un.at=Ss,Un.before=Oa,Un.bind=Na,Un.bindAll=el,Un.bindKey=Ma,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Un.chain=pa,Un.chunk=function(e,t,n){t=(n?xo(e,t,n):t===i)?1:bn(ms(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,l=r(ht(o/t));ao?0:o+n),(r=r===i||r>o?o:ms(r))<0&&(r+=o),r=n>r?0:gs(r);n>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=ci(t))&&ln(e)?ki(mn(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Ne(o);return t=null==t?0:bn(ms(t),0),Xr((function(n){var r=n[t],i=ki(n,0,t);return r&&Dt(i,r),Et(e,this,i)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?ii(e,0,(t=n||t===i?1:ms(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,(t=r-(t=n||t===i?1:ms(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?hi(e,uo(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ne(o);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),La(e,t,{leading:r,maxWait:t,trailing:i})},Un.thru=ha,Un.toArray=ps,Un.toPairs=qs,Un.toPairsIn=zs,Un.toPath=function(e){return Va(e)?Rt(e,Fo):us(e)?[e]:Ni(Io(bs(e)))},Un.toPlainObject=ys,Un.transform=function(e,t,n){var r=Va(e),i=r||Ka(e)||cs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ts(e)&&Ja(o)?Wn(Ge(e)):{}}return(i?Ot:xr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Un.unary=function(e){return Ta(e,1)},Un.union=na,Un.unionBy=ra,Un.unionWith=ia,Un.uniq=function(e){return e&&e.length?di(e):[]},Un.uniqBy=function(e,t){return e&&e.length?di(e,uo(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?di(e,i,t):[]},Un.unset=function(e,t){return null==e||fi(e,t)},Un.unzip=oa,Un.unzipWith=aa,Un.update=function(e,t,n){return null==e?e:pi(e,t,bi(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:pi(e,t,bi(n),r)},Un.values=Us,Un.valuesIn=function(e){return null==e?[]:en(e,As(e))},Un.without=sa,Un.words=Js,Un.wrap=function(e,t){return Fa(bi(t),e)},Un.xor=la,Un.xorBy=ua,Un.xorWith=ca,Un.zip=da,Un.zipObject=function(e,t){return vi(e||[],t||[],nr)},Un.zipObjectDeep=function(e,t){return vi(e||[],t||[],ei)},Un.zipWith=fa,Un.entries=qs,Un.entriesIn=zs,Un.extend=xs,Un.extendWith=ks,ll(Un,Un),Un.add=yl,Un.attempt=Qs,Un.camelCase=Ws,Un.capitalize=Hs,Un.ceil=bl,Un.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=vs(n))==n?n:0),t!==i&&(t=(t=vs(t))==t?t:0),lr(vs(e),t,n)},Un.clone=function(e){return ur(e,4)},Un.cloneDeep=function(e){return ur(e,5)},Un.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Un.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Un.conformsTo=function(e,t){return null==t||cr(e,t,Ls(t))},Un.deburr=Bs,Un.defaultTo=function(e,t){return null==e||e!=e?t:e},Un.divide=wl,Un.endsWith=function(e,t,n){e=bs(e),t=ci(t);var r=e.length,o=n=n===i?r:lr(ms(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Un.eq=Ua,Un.escape=function(e){return(e=bs(e))&&X.test(e)?e.replace(K,an):e},Un.escapeRegExp=function(e){return(e=bs(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Un.every=function(e,t,n){var r=Va(e)?Mt:mr;return n&&xo(e,t,n)&&(t=i),r(e,uo(t,3))},Un.find=va,Un.findIndex=Bo,Un.findKey=function(e,t){return Ut(e,uo(t,3),xr)},Un.findLast=ya,Un.findLastIndex=Vo,Un.findLastKey=function(e,t){return Ut(e,uo(t,3),kr)},Un.floor=xl,Un.forEach=ba,Un.forEachRight=wa,Un.forIn=function(e,t){return null==e?e:br(e,uo(t,3),As)},Un.forInRight=function(e,t){return null==e?e:wr(e,uo(t,3),As)},Un.forOwn=function(e,t){return e&&xr(e,uo(t,3))},Un.forOwnRight=function(e,t){return e&&kr(e,uo(t,3))},Un.get=Es,Un.gt=Wa,Un.gte=Ha,Un.has=function(e,t){return null!=e&&vo(e,t,Tr)},Un.hasIn=Ts,Un.head=Go,Un.identity=il,Un.includes=function(e,t,n,r){e=Ga(e)?e:Us(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=bn(i+n,0)),ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ht(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=bn(r+i,0)),Ht(e,t,i)},Un.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=wn(t,n)&&e=-9007199254740991&&e<=h},Un.isSet=ss,Un.isString=ls,Un.isSymbol=us,Un.isTypedArray=cs,Un.isUndefined=function(e){return e===i},Un.isWeakMap=function(e){return ns(e)&&go(e)==A},Un.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==jr(e)},Un.join=function(e,t){return null==e?"":zt.call(e,t)},Un.kebabCase=Vs,Un.last=Xo,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ms(n))<0?bn(r+o,0):wn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Wt(e,Vt,o,!0)},Un.lowerCase=$s,Un.lowerFirst=Gs,Un.lt=ds,Un.lte=fs,Un.max=function(e){return e&&e.length?gr(e,il,Er):i},Un.maxBy=function(e,t){return e&&e.length?gr(e,uo(t,2),Er):i},Un.mean=function(e){return $t(e,il)},Un.meanBy=function(e,t){return $t(e,uo(t,2))},Un.min=function(e){return e&&e.length?gr(e,il,qr):i},Un.minBy=function(e,t){return e&&e.length?gr(e,uo(t,2),qr):i},Un.stubArray=gl,Un.stubFalse=vl,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=_l,Un.nth=function(e,t){return e&&e.length?Br(e,ms(t)):i},Un.noConflict=function(){return mt._===this&&(mt._=Ue),this},Un.noop=ul,Un.now=Ea,Un.pad=function(e,t,n){e=bs(e);var r=(t=ms(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Vi(gt(i),n)+e+Vi(ht(i),n)},Un.padEnd=function(e,t,n){e=bs(e);var r=(t=ms(t))?hn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=_n();return wn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return Kr(e,t)},Un.reduce=function(e,t,n){var r=Va(e)?It:Kt,i=arguments.length<3;return r(e,uo(t,4),n,i,pr)},Un.reduceRight=function(e,t,n){var r=Va(e)?Ft:Kt,i=arguments.length<3;return r(e,uo(t,4),n,i,hr)},Un.repeat=function(e,t,n){return t=(n?xo(e,t,n):t===i)?1:ms(t),Zr(bs(e),t)},Un.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,o=(t=wi(t,e)).length;for(o||(o=1,e=i);++rh)return[];var n=g,r=wn(e,g);t=uo(t),e-=g;for(var i=Xt(r,t);++n=a)return e;var l=n-hn(r);if(l<1)return r;var u=s?ki(s,0,l).join(""):e.slice(0,l);if(o===i)return u+r;if(s&&(l+=u.length-l),as(o)){if(e.slice(l).search(o)){var c,d=u;for(o.global||(o=Te(o.source,bs(me.exec(o))+"g")),o.lastIndex=0;c=o.exec(d);)var f=c.index;u=u.slice(0,f===i?l:f)}}else if(e.indexOf(ci(o),l)!=l){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+r},Un.unescape=function(e){return(e=bs(e))&&Z.test(e)?e.replace(Y,vn):e},Un.uniqueId=function(e){var t=++Ie;return bs(e)+t},Un.upperCase=Zs,Un.upperFirst=Xs,Un.each=ba,Un.eachRight=wa,Un.first=Go,ll(Un,(kl={},xr(Un,(function(e,t){De.call(Un.prototype,t)||(kl[t]=e)})),kl),{chain:!1}),Un.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),Ot(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===i?1:bn(ms(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(n,r.__takeCount__):r.__views__.push({size:wn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ot(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ot(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),Ot(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(il)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return Mr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Da(uo(e)))},Vn.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(g)},xr(Vn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Vn,u=s[0],c=l||Va(t),d=function(e){var t=o.apply(Un,Dt([e],s));return r&&f?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&c){t=m?t:new Vn(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[d],thisArg:i}),new Bn(g,f)}return h&&m?e.apply(this,s):(g=this.thru(d),h?r?g.value()[0]:g.value():g)})})),Ot(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Va(i)?i:[],e)}return this[n]((function(n){return t.apply(Va(n)?n:[],e)}))}})),xr(Vn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";De.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:t,func:n})}})),Ln[Ui(i,2).name]=[{name:"wrapper",func:i}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Ni(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ni(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ni(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Va(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=zo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:i}),new Bn(t,this.__chain__)}return this.thru(ta)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,Je&&(Un.prototype[Je]=function(){return this}),Un}();mt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},7418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{var r=n(6173);e.exports=p,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=f;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,a=0,s="",c=t&&t.delimiter||"/";null!=(n=i.exec(e));){var d=n[0],f=n[1],p=n.index;if(s+=e.slice(a,p),a=p+d.length,f)s+=f[1];else{var h=e[a],m=n[2],g=n[3],v=n[4],y=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var x=null!=m&&null!=h&&h!==m,k="+"===b||"*"===b,_="?"===b||"*"===b,S=n[2]||c,C=v||y;r.push({name:g||o++,prefix:m||"",delimiter:S,optional:_,repeat:k,partial:x,asterisk:!!w,pattern:C?u(C):w?".*":"[^"+l(S)+"]+?"})}}return a{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9656:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t{"use strict";var r=n(7294),i=n(7418),o=n(3840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n